Skip to content

Commit

Permalink
use Matrix library for sparse counts
Browse files Browse the repository at this point in the history
  • Loading branch information
stemangiola committed Sep 8, 2023
1 parent 1b4cace commit 14848e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ import(preprocessCore)
import(readr)
import(tibble)
importFrom(GenomicRanges,makeGRangesListFromDataFrame)
importFrom(Matrix,colSums)
importFrom(S4Vectors,metadata)
importFrom(SummarizedExperiment,SummarizedExperiment)
importFrom(SummarizedExperiment,assays)
Expand Down
3 changes: 2 additions & 1 deletion R/methods_SE.R
Original file line number Diff line number Diff line change
Expand Up @@ -1584,6 +1584,7 @@ setMethod("keep_variable",
#'
#' @importFrom purrr map_chr
#' @importFrom tidyr unite
#' @importFrom Matrix colSums
#'
#' @docType methods
#' @rdname keep_variable-methods
Expand Down Expand Up @@ -1711,7 +1712,7 @@ setMethod("keep_variable",
min.count = minimum_counts,
group = string_factor_of_interest,
min.prop = minimum_proportion,
lib.size = colSums(., na.rm=TRUE)
lib.size = Matrix::colSums(., na.rm=TRUE)
) %>%
not() %>%
which %>%
Expand Down

0 comments on commit 14848e8

Please sign in to comment.