Skip to content

Commit 68da1a3

Browse files
authored
Merge pull request #243 from BIMSBbioinfo/dev
updates for 0.2.2
2 parents b50cf4d + ad2fdd4 commit 68da1a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+864
-508
lines changed

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ jobs:
152152
BiocManager::install(c('DelayedMatrixStats'))
153153
BiocManager::install(c('HDF5Array'))
154154
remotes::install_github('bnprks/BPCells/r@v0.3.0')
155-
devtools::install_github("Artur-man/Rarr@voltron")
155+
devtools::install_github("Huber-group-EMBL/Rarr")
156156
devtools::install_github('BIMSBbioinfo/ImageArray')
157157
devtools::install_github('BIMSBbioinfo/HDF5DataFrame')
158158
devtools::install_github('BIMSBbioinfo/ZarrDataFrame')

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ License: MIT + file LICENSE
3030
SystemRequirements: OpenCV 4.8 (or higher): libopencv-dev (Debian, Ubuntu) or
3131
opencv-devel (Fedora)
3232
Encoding: UTF-8
33-
RoxygenNote: 7.3.2
33+
RoxygenNote: 7.3.3
3434
biocViews:
3535
Imports: methods, grDevices, data.table, Matrix, S4Arrays, S4Vectors,
3636
ids, RcppAnnoy, RANN, igraph, dplyr, ggplot2, ggrepel, ggpubr,

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ RUN R -e "BiocManager::install(c('EBImage', 'S4Arrays', 'BiocSingular'))"
3333
RUN R -e "BiocManager::install(c('DelayedArray'))"
3434
RUN R -e "BiocManager::install(c('DelayedMatrixStats'))"
3535
RUN R -e "BiocManager::install(c('HDF5Array'))"
36-
RUN R -e "devtools::install_github('Artur-man/Rarr@voltron')"
36+
RUN R -e "devtools::install_github('Huber-group-EMBL/Rarr')"
3737
RUN R -e "options(timeout = 600000000); remotes::install_github('bnprks/BPCells/r@v0.3.0')"
3838
RUN R -e "options(timeout = 600000000); remotes::install_github('BIMSBbioinfo/ImageArray')"
3939
RUN R -e "options(timeout = 600000000); remotes::install_github('BIMSBbioinfo/HDF5DataFrame')"

NAMESPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export(getDiffExp)
5454
export(getFeatures)
5555
export(getHotSpotAnalysis)
5656
export(getNicheAssay)
57+
export(getOmeTiffChannels)
5758
export(getPCA)
5859
export(getProfileNeighbors)
5960
export(getRcppAutomatedRegistration)
@@ -70,6 +71,7 @@ export(importGeoMx)
7071
export(importImageData)
7172
export(importOpenST)
7273
export(importPhenoCycler)
74+
export(importQuPathIF)
7375
export(importSTOmics)
7476
export(importVisium)
7577
export(importVisiumHD)

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@
22

33
* Added 'channels' arguement to `ImportImageData` to parse only requested channels
44
from OME-TIFF files.
5+
6+
* Multi-omic clustering with multiple feature sets and tutorials
7+
8+
* Added `importQuPathIF` function to generate QuPath processed spatial
9+
proteomics data as a VoltRon objects

R/allclasses.R

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ suppressMessages({
2424
members = c(
2525
"matrix",
2626
"data.frame",
27-
"dgRMatrix",
28-
"dgeMatrix",
27+
# "dgRMatrix",
28+
# "dgeMatrix",
29+
"Matrix",
2930
"Array",
3031
"IterableMatrix"
3132
)
@@ -127,9 +128,10 @@ suppressWarnings({
127128
"data_matrix",
128129
members = c(
129130
"matrix",
130-
"dgCMatrix",
131-
"dgRMatrix",
132-
"dgeMatrix",
131+
# "dgCMatrix",
132+
# "dgRMatrix",
133+
# "dgeMatrix",
134+
"Matrix",
133135
"Array",
134136
"IterableMatrix"
135137
)

R/clustering.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,9 @@ getClusters <- function(
195195
embedding_names <- vrEmbeddingNames(object)
196196
if (data.type %in% embedding_names) {
197197
# get data
198-
vrdata <- vrEmbeddings(object, assay = assay, type = data.type, dims = dims)
198+
vrdata <- vrEmbeddings(object, assay = assay_names, type = data.type, dims = dims)
199199
} else if (!is.null(data.type)) {
200-
vrdata <- t(vrData(object_subset, norm = data.type == "norm"))
200+
vrdata <- t(vrData(object_subset, assay = assay_names, norm = data.type == "norm"))
201201
}
202202

203203
# clustering

R/conversion.R

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,11 @@ as.AnnData <- function(
508508
}
509509
}
510510
X <- make_numpy_friendly(t(data))
511-
obsm <- list(
512-
spatial = coords,
513-
spatial_AssayID = coords,
514-
segmentation = segmentations_array
515-
)
511+
# obsm <- list(
512+
# spatial = coords,
513+
# spatial_AssayID = coords,
514+
# segmentation = segmentations_array
515+
# )
516516
adata <- anndata$AnnData(X = X, obs = metadata, obsm = obsm, uns = uns)
517517
adata <- reticulate::r_to_py(adata)
518518
adata$write_zarr(file)
@@ -534,11 +534,11 @@ as.AnnData <- function(
534534
}
535535
}
536536
X <- make_numpy_friendly(t(data))
537-
obsm <- list(
538-
spatial = coords,
539-
spatial_AssayID = coords,
540-
segmentation = segmentations_array
541-
)
537+
# obsm <- list(
538+
# spatial = coords,
539+
# spatial_AssayID = coords,
540+
# segmentation = segmentations_array
541+
# )
542542
adata <- anndata$AnnData(
543543
X = X,
544544
obs = metadata,
@@ -593,11 +593,12 @@ as.AnnData <- function(
593593
var_names = rownames(data),
594594
X = t(data),
595595
obs = metadata,
596-
obsm = list(
597-
spatial = coords,
598-
spatial_AssayID = coords,
599-
segmentation = segmentations_array
600-
),
596+
obsm = osbm,
597+
# obsm = list(
598+
# spatial = coords,
599+
# spatial_AssayID = coords,
600+
# segmentation = segmentations_array
601+
# ),
601602
uns = uns
602603
)
603604

@@ -621,11 +622,12 @@ as.AnnData <- function(
621622
adata <- anndata::AnnData(
622623
X = t(data),
623624
obs = metadata,
624-
obsm = list(
625-
spatial = coords,
626-
spatial_AssayID = coords,
627-
segmentation = segmentations_array
628-
),
625+
obsm = obsm,
626+
# obsm = list(
627+
# spatial = coords,
628+
# spatial_AssayID = coords,
629+
# segmentation = segmentations_array
630+
# ),
629631
uns = uns
630632
)
631633

R/image.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1606,7 +1606,7 @@ demuxVoltRon <- function(
16061606
if (max(imageinfo$height, imageinfo$width) > max.pixel.size) {
16071607
# scale keypoints
16081608
if (inherits(images, "ImgArray")) {
1609-
n.series <- length(images@series)
1609+
n.series <- length(images@levels)
16101610
cur_width <- imageinfo$width
16111611
cur_height <- imageinfo$height
16121612
for (ii in 2:n.series) {

0 commit comments

Comments
 (0)