Skip to content

Conversation

@zhangguy
Copy link

@zhangguy zhangguy commented Feb 23, 2019

Issue was discussed here:

https://github.com/hemberg-lab/SC3/issues/53

This is a temp fix. The correlation function cor and ED2 also need regular matrix as input, and converting the sparse matrix to regular isn't memory efficient.

@wikiselev
Copy link
Member

Thanks, and sorry for a late reply, I will need to test this first and then merge.

f_data$sc3_gene_filter <- TRUE
if (gene_filter) {
dropouts <- rowSums(counts(object) == 0)/ncol(object)*100
dropouts <- Matrix::rowSums(counts(object) == 0)/ncol(object)*100
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am aware of the discussion in #53 , but I am still not sure if hardcoding it this way without checking the type of counts(object) is a good idea. For hdf5-backed object, the returned matrix can be of class "DelayedMatrix", which is not handled correctly by Matrix::rowSums(), just as an example.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for the comment! That's why I didn't rush to merge it, the issue is quite big and requires some time to think and decide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants