Browse code

Updated Matrix conversion calls to be compatible with Matrix v1.4-2

Joshua D. Campbell authored on 22/10/2022 02:00:54
Showing 6 changed files

... ...
@@ -29,8 +29,8 @@ Suggests: testthat, knitr, roxygen2, rmarkdown, biomaRt, covr,
29 29
 LinkingTo: Rcpp, RcppEigen
30 30
 License: MIT + file LICENSE
31 31
 Encoding: UTF-8
32
-LazyData: false
33
-RoxygenNote: 7.1.2
32
+LazyData: true
33
+RoxygenNote: 7.2.1
34 34
 BugReports: https://github.com/campbio/celda/issues
35 35
 biocViews: SingleCell, GeneExpression, Clustering, Sequencing, Bayesian, ImmunoOncology, DataImport
36 36
 NeedsCompilation: yes
... ...
@@ -1,5 +1,6 @@
1 1
 # celda v1.13.0 (2022-10-20)
2 2
 * Bug fixes related to cluster labels stored as factors and plotting
3
+* Updated sparse matrix conversion to work with Matrix v1.4-2
3 4
 
4 5
 # celda v1.12.0 (2022-04-30)
5 6
 * Update to match Bioconductor 3.15 release version
... ...
@@ -188,7 +188,7 @@ setMethod("celda_C",
188 188
         verbose = TRUE) {
189 189
 
190 190
         # Convert to sparse matrix
191
-        x <- methods::as(x, "dgCMatrix")
191
+        x <- methods::as(x, "CsparseMatrix")
192 192
 
193 193
         ls <- list()
194 194
         ls[[useAssay]] <- x
... ...
@@ -222,7 +222,7 @@ setMethod("celda_CG",
222 222
         verbose = TRUE) {
223 223
 
224 224
         # Convert to sparse matrix
225
-        x <- methods::as(x, "dgCMatrix")
225
+        x <- methods::as(x, "CsparseMatrix")
226 226
 
227 227
         ls <- list()
228 228
         ls[[useAssay]] <- x
... ...
@@ -172,7 +172,7 @@ setMethod("celda_G",
172 172
         verbose = TRUE) {
173 173
 
174 174
         # Convert to sparse matrix
175
-        x <- methods::as(x, "dgCMatrix")
175
+        x <- methods::as(x, "CsparseMatrix")
176 176
 
177 177
         ls <- list()
178 178
         ls[[useAssay]] <- x
... ...
@@ -493,11 +493,11 @@ setMethod(
493 493
         append = TRUE,
494 494
         verbose = verbose
495 495
       )
496
-      countsBat <- methods::as(countsBat, "dgCMatrix")
496
+      countsBat <- methods::as(countsBat, "CsparseMatrix")
497 497
     }
498 498
     if (!is.null(bgBat)) {
499 499
       if (!inherits(bgBat, "dgCMatrix")) {
500
-        bgBat <- methods::as(bgBat, "dgCMatrix")
500
+        bgBat <- methods::as(bgBat, "CsparseMatrix")
501 501
       }
502 502
     }
503 503