Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use Matrix library for sparse counts #294

Merged
merged 2 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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 @@ -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
Loading