Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
1b64c31
Merge pull request #241 from drieslab/dev
jiajic Oct 27, 2024
c603c76
chore: deprecated accessor docs cleanup
jiajic Oct 28, 2024
e4e277e
Merge pull request #242 from drieslab/dev
jiajic Oct 28, 2024
cd55de1
Merge pull request #243 from drieslab/dev
jiajic Oct 30, 2024
23777c1
Merge pull request #244 from drieslab/dev
jiajic Oct 30, 2024
8baf664
Merge pull request #247 from drieslab/dev
jiajic Nov 12, 2024
98b8969
Merge pull request #250 from drieslab/dev
jiajic Nov 14, 2024
52a16ec
Update interoperability.R
cmubioinformatics Nov 29, 2024
381eacc
Update interoperability.R
cmubioinformatics Nov 29, 2024
1d85669
Update interoperability.R
cmubioinformatics Nov 29, 2024
e386f6a
Merge pull request #257 from drieslab/dev
jiajic Dec 9, 2024
003fe85
Merge branch 'dev'
jiajic Dec 10, 2024
a4dfdb9
Merge branch 'dev'
jiajic Dec 10, 2024
0d6c9dc
chore: improve example
jiajic Dec 13, 2024
daa261b
Merge branch 'dev'
jiajic Dec 15, 2024
b8a91ee
Merge pull request #255 from cmubioinformatics/main
jiajic Jan 17, 2025
63b443b
Merge pull request #263 from drieslab/dev
jiajic Jan 18, 2025
2ad48fa
Merge pull request #266 from drieslab/dev
jiajic Feb 4, 2025
402ea0a
chore: remove non-pkg items
jiajic Feb 20, 2025
a8df96e
Merge pull request #283 from drieslab/staging
jiajic Feb 20, 2025
bb5aa14
Merge pull request #286 from drieslab/staging
jiajic Mar 1, 2025
9f7ef9e
Merge branch 'staging'
jiajic Mar 10, 2025
20fe380
Merge pull request #302 from drieslab/dev
jiajic May 6, 2025
7b03a7c
Merge branch 'staging'
jiajic May 6, 2025
835c5e2
Merge branch 'staging'
jiajic May 7, 2025
3f6366f
Merge pull request #303 from drieslab/staging
jiajic May 10, 2025
47f0a74
Merge pull request #306 from drieslab/staging
jiajic May 15, 2025
26d4b98
Merge pull request #307 from drieslab/staging
jiajic May 15, 2025
40f6707
chore: remove .github from main
jiajic May 15, 2025
2c29b4b
Merge branch 'staging'
jiajic Jun 17, 2025
d959009
Merge pull request #318 from drieslab/staging
jiajic Jul 7, 2025
83708df
Merge branch 'staging'
jiajic Jul 17, 2025
aeda9d9
Merge branch 'dev' into db
Ed2uiz Jul 17, 2025
94ab81d
Update data_input.R
Ed2uiz Jul 17, 2025
0d8c170
Merge branch 'dev' into db
Ed2uiz Jul 17, 2025
7e717ac
Merge branch 'main' into db
Ed2uiz Sep 23, 2025
4440ae0
Merge remote-tracking branch 'origin/dev' into db-merge-dev
Ed2uiz Jan 22, 2026
5833e0c
fix: match vector argument `expression_matrix_class` in `readExprMatrix`
Ed2uiz Jan 22, 2026
f8fc025
fix: enhance calculateOverlap to support dbSpatial inputs and prevent…
Ed2uiz Jan 23, 2026
0165e9d
fix: restore missing .github directory from `dev` branch
Ed2uiz Jan 24, 2026
20e8710
chore: tidy up whitespace and char limit
Ed2uiz Jan 24, 2026
a5b838f
fix: check GiottoDB pkg dependency and add to Suggests
Ed2uiz Jan 25, 2026
30c7873
fix: remove .github from .gitignore
Ed2uiz Jan 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ inst/doc
.git_old
.vscode/*
.Rprofile
docs
codecov.yml
pkgdown
cell_rna*
docs
pkgdown
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ Imports:
reticulate (>= 1.25),
stats,
terra (>= 1.8-21)
Suggests:
Suggests:
GiottoDB,
Biobase,
chihaya,
DelayedArray,
Expand Down
55 changes: 55 additions & 0 deletions R/aggregate.R
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,17 @@
feat_subset_ids = deprecated(),
count_info_column = deprecated(),
...) {
is_db_x <- inherits(x@spatVector, "dbSpatial")
is_db_y <- inherits(y@spatVector, "dbSpatial")

if (xor(is_db_x, is_db_y)) {
stop(
"calculateOverlap: dbSpatial-backed and terra-backed inputs ",
"are not both supported",
call. = FALSE
)
}

# deprecations
feat_subset_values <- GiottoUtils::deprecate_param(
feat_subset_ids, feat_subset_values,
Expand All @@ -538,6 +549,50 @@
feat_count_column <- NULL
}

# ------------------------------------------------------------------
# dbSpatial-backed path: keep results dbSpatial-native
# ------------------------------------------------------------------
if (isTRUE(is_db_x)) {
# GiottoDB defines the <dbSpatial,dbSpatial> method for this generic
if (!base::requireNamespace("GiottoDB", quietly = TRUE)) {
stop(
"calculateOverlap: dbSpatial-backed inputs require the ",
"GiottoDB package. Install it, or load it via `library(GiottoDB)`.",
call. = FALSE
)
}

if (!methods::hasMethod(
"calculateOverlap",
signature = signature(x = "dbSpatial", y = "dbSpatial")
)) {
stop(
"calculateOverlap: dbSpatial-backed giottoPolygon or ",
"giottoPoints method missing. Load the GiottoDB package.",
call. = FALSE
)
}

# The <dbSpatial,dbSpatial> method is defined in GiottoDB
res <- calculateOverlap(
x = x@spatVector,
y = y@spatVector,
poly_subset_ids = poly_subset_ids,
feat_subset_column = feat_subset_column,
feat_subset_values = feat_subset_values,
feat_count_column = feat_count_column,
verbose = verbose,
...
)

if (isTRUE(return_gpolygon)) {
if (is.null(name_overlap)) name_overlap <- objName(y)

Check warning

Code scanning / lintr

no visible global function definition for 'objName' Warning

no visible global function definition for 'objName'
x@overlaps[[name_overlap]] <- res
return(x)
}
return(res)
}

# return an overlap info object
res <- calculateOverlap(
x = x[],
Expand Down
13 changes: 11 additions & 2 deletions R/data_input.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,20 @@ readExprMatrix <- function(
cores = determine_cores(),
transpose = FALSE,
feat_type = "rna",
expression_matrix_class = c("dgCMatrix", "DelayedArray"),
...) {
expression_matrix_class = c(
"dgCMatrix",
"DelayedArray",
"dbSparseMatrix"
)) {
# check if path is a character vector and exists
if (!is.character(path)) stop("path needs to be character vector")
if (!file.exists(path)) stop("the path: ", path, " does not exist")

expression_matrix_class <- match.arg(expression_matrix_class)
if (identical(expression_matrix_class, "dbSparseMatrix")) {
stop("File conversion to dbMatrix is not yet supported")
}

data.table::setDTthreads(threads = cores)

# read and convert
Expand Down
Loading