Skip to content

Commit

Permalink
Merge pull request #294 from stemangiola/fix-dependency-keep-variable
Browse files Browse the repository at this point in the history
use Matrix library for sparse counts
  • Loading branch information
stemangiola committed Sep 18, 2023
2 parents be98005 + 6386415 commit 749ce37
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ Imports:
GenomicRanges,
methods,
S4Vectors,
crayon
crayon,
Matrix
Suggests:
BiocStyle,
testthat,
Expand Down
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 @@ -1589,6 +1589,7 @@ setMethod("keep_variable",
#'
#' @importFrom purrr map_chr
#' @importFrom tidyr unite
#' @importFrom Matrix colSums
#'
#' @docType methods
#' @rdname keep_variable-methods
Expand Down Expand Up @@ -1716,7 +1717,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 749ce37

Please sign in to comment.