Skip to content

Commit

Permalink
Merge pull request #192 from Artur-man/main
Browse files Browse the repository at this point in the history
update dev, fix bugs update python dependencies
  • Loading branch information
Artur-man authored Jan 16, 2025
2 parents e62246e + 44ad3b9 commit ae1d88d
Show file tree
Hide file tree
Showing 72 changed files with 1,502 additions and 749 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,25 @@ jobs:
# All Other dependencies
- name: Install Suggested dependencies
run: |
install.packages(c('reticulate'))
BiocManager::install(c('basilisk'))
BiocManager::install(c('DelayedArray'))
BiocManager::install(c('HDF5Array'))
remotes::install_github('bnprks/BPCells/[email protected]')
devtools::install_github('BIMSBbioinfo/ImageArray')
devtools::install_github('BIMSBbioinfo/HDF5DataFrame')
devtools::install_github('BIMSBbioinfo/ZarrDataFrame')
install.packages("Seurat")
BiocManager::install("glmGamPoi")
install.packages('hdf5r')
BiocManager::install('RBioFormats')
BiocManager::install('ComplexHeatmap')
devtools::install_github('dmcable/spacexr')
devtools::install_github('xuranw/MuSiC')
BiocManager::install('SingleCellExperiment')
BiocManager::install('SpatialExperiment')
install.packages('dplyr')
BiocManager::install('DESeq2')
shell: Rscript {0}

## R CMD Check
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Publish Docker image

on:
push:
branches:
- main

jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
if: github.repository == 'BIMSBbioinfo/VoltRon'

permissions:
packages: write
contents: read
attestations: write
id-token: write

steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: amanukyan1385/rstudio-voltron

- name: Build and push Docker image
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: ./inst/extdata/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
16 changes: 9 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
Package: VoltRon
Type: Package
Title: VoltRon for Spatial Data Integration and Analysis
Title: VoltRon for Spatial Omics Data Integration and Analysis
Version: 0.2.0
Depends: R (>= 4.3.0)
Author: Artür Manukyan, Ella Bahry, Raj Prateek Rai, Wei-Che Ko, Deborah Schmidt, Markus Landthaler, Altuna Akalin
Maintainer: Artür Manukyan <[email protected]>
Description: VoltRon is a novel spatial omic analysis toolbox for multi-omics integration using spatial image registration. VoltRon is capable of analyzing multiple types and modalities of spatially-aware datasets. VoltRon visualizes and analyzes regions of interests (ROIs), spots, cells and even molecules.
Description: VoltRon is a novel spatial omic analysis toolbox for multi-omics integration using spatial image registration. VoltRon is capable of analyzing multiple types and modalities of spatially-aware datasets. VoltRon visualizes and analyzes regions of interests (ROIs), spots, cells, molecules and event tiles.
License: MIT + file LICENSE
SystemRequirements: OpenCV 4.8 (or higher): libopencv-dev (Debian, Ubuntu) or opencv-devel (Fedora)
Encoding: UTF-8
RoxygenNote: 7.3.2
biocViews:
Imports: methods, S4Arrays, grDevices, data.table, EBImage, RcppAnnoy, RANN,
Matrix, dplyr, ggplot2, ggrepel, igraph, irlba, rjson, magick, ids,
sp, reshape2, rlang, ggpubr, shiny, shinyjs, stringr, uwot, RCDT,
basilisk, reticulate
Imports: methods, grDevices, data.table, Matrix, S4Arrays, ids, RcppAnnoy,
RANN, igraph, dplyr, ggplot2, ggrepel, ggpubr, rjson, magick,
EBImage, sp, rlang, shiny, shinyjs, stringr, irlba, uwot, RCDT
LinkingTo: Rcpp, RcppArmadillo (>= 0.4)
Collate:
'RcppExports.R'
Expand All @@ -41,6 +40,7 @@ Collate:
'spatial.R'
'visualization.R'
Suggests:
testthat (>= 3.0.0),
SpatialExperiment,
SingleCellExperiment,
Seurat,
Expand All @@ -51,12 +51,14 @@ Suggests:
RBioFormats,
XML,
ComplexHeatmap,
basilisk,
reticulate,
xlsx,
reshape2,
tiledb,
tiledbsc,
arrow,
vitessceR,
testthat (>= 3.0.0),
geojsonR,
circlize,
rstudioapi,
Expand Down
14 changes: 5 additions & 9 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ S3method(addAssay,vrMetadata)
S3method(addFeature,VoltRon)
S3method(addFeature,vrAssayV2)
S3method(as.VoltRon,Seurat)
S3method(as.VoltRon,SpatialExperiment)
S3method(as.Zarr,"magick-image")
S3method(as.Zarr,VoltRon)
S3method(combineChannels,VoltRon)
Expand Down Expand Up @@ -191,8 +192,8 @@ export(formAssay)
export(formImage)
export(formVoltRon)
export(generateCosMxImage)
export(generateGeoJSONFromSegments)
export(generateSegmentsFromGeoJSON)
export(generateGeoJSON)
export(generateSegments)
export(generateTileData)
export(generateXeniumImage)
export(getClusters)
Expand Down Expand Up @@ -292,16 +293,13 @@ importFrom(Matrix,t)
importFrom(RANN,nn2)
importFrom(RCDT,delaunay)
importFrom(RcppAnnoy,AnnoyEuclidean)
importFrom(basilisk,BasiliskEnvironment)
importFrom(basilisk,basiliskRun)
importFrom(basilisk,basiliskStart)
importFrom(basilisk,basiliskStop)
importFrom(data.table,alloc.col)
importFrom(data.table,as.data.table)
importFrom(data.table,chmatch)
importFrom(data.table,data.table)
importFrom(data.table,fread)
importFrom(data.table,is.data.table)
importFrom(data.table,melt)
importFrom(data.table,set)
importFrom(data.table,setkey)
importFrom(dplyr,"%>%")
Expand Down Expand Up @@ -351,6 +349,7 @@ importFrom(igraph,E)
importFrom(igraph,V)
importFrom(igraph,add_edges)
importFrom(igraph,as_adjacency_matrix)
importFrom(igraph,as_data_frame)
importFrom(igraph,cluster_leiden)
importFrom(igraph,components)
importFrom(igraph,disjoint_union)
Expand Down Expand Up @@ -390,9 +389,6 @@ importFrom(methods,is)
importFrom(methods,new)
importFrom(methods,slot)
importFrom(methods,slotNames)
importFrom(reshape2,acast)
importFrom(reshape2,melt)
importFrom(reticulate,import)
importFrom(rjson,fromJSON)
importFrom(rlang,"%||%")
importFrom(rlang,'!!')
Expand Down
2 changes: 0 additions & 2 deletions R/annotation.R
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,7 @@ annotateSpatialData <- function(object, label = "annotation", assay = NULL, anno
shiny::runApp(
shiny::shinyApp(ui, server, options = list(host = shiny.options[["host"]], port = shiny.options[["port"]], launch.browser = shiny.options[["launch.browser"]]),
onStart = function() {
cat("Doing application setup\n")
onStop(function() {
cat("Doing application cleanup\n")
})
})
)
Expand Down
31 changes: 20 additions & 11 deletions R/auxiliary.R
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,19 @@ rownames(.dccMetadata[["protocolData"]])[rownames(.dccMetadata[["protocolData"]]
# Basilisk Environment ####
####

#' The Python Basilisk environment
#' get the Python Basilisk environment
#'
#' Defines a conda environment via Basilisk, which is used to convert R objects to Zarr stores.
#'
#' @importFrom basilisk BasiliskEnvironment
#'
#' @keywords internal
#'
#' @noRd
py_env <- basilisk::BasiliskEnvironment(
envname="VoltRon_basilisk_env",
pkgname="VoltRon",
packages=c(
getBasilisk <- function(){

if(!requireNamespace('basilisk'))
stop("Please install basilisk package!: BiocManager::install('basilisk')")

basilisk.packages=c(
"numpy==1.*",
"pandas==1.*",
"anndata==0.7.*",
Expand All @@ -219,11 +219,20 @@ py_env <- basilisk::BasiliskEnvironment(
"zarr==2.*",
"numcodecs==0.*",
"tifffile==2024.2.12"
),
pip=c(
)
basilisk.pip=c(
"ome-zarr==0.2.1"
)
)

py_env <- basilisk::BasiliskEnvironment(
envname="VoltRon_basilisk_env",
pkgname="VoltRon",
packages=basilisk.packages,
pip=basilisk.pip
)

py_env
}

####
# Other Auxiliary tools ####
Expand Down Expand Up @@ -321,7 +330,7 @@ make_css <- function (..., file = NULL)
css_string
}
else {
cat(css_string, file = file)
message(css_string, file = file)
invisible(NULL)
}
}
Expand Down
Loading

0 comments on commit ae1d88d

Please sign in to comment.