Filtering single-cell count matrix based on scrublet output
2
0
Entering edit mode
2.3 years ago
ponda • 0

Hi,

I have output files from cell ranger (matrix, barcodes, features) as well as scrublet output files for the count matrix. I want to filter the count matrix based on the scrublet data. Is it wise to convert mtx to csv, manipulate data and convert it back to mtx? Or what is the best way to do this?

Thank you very much!

count-matrix single-cell scrublet • 1.0k views
ADD COMMENT
0
Entering edit mode
22 months ago
aerlaut ▴ 10

Are you using scanpy?

If you are, you can use the wrapper scanpy.pp.external.scrublet function. This function uses the scrublet package. The function adds a new column into the AnnData observation (e.g. adata.obs) dataframe called predicted_doublet. You can subset your AnnData frame using that column, e.g.

adata[adata.obs.['predicted_doublet`]]
ADD COMMENT

Login before adding your answer.

Traffic: 2249 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6