kaizhang / SnapATAC2

Single-cell epigenomics analysis tools
https://kzhang.org/SnapATAC2/
197 stars 20 forks source link

snap.pp.import_data with list of fragment files and list of files containing whitelist barcodes #247

Open strohstern opened 4 months ago

strohstern commented 4 months ago

Thank you for developing this tool.

SnapATAC2 version: 2.5.3

I have a set of fragment files with a matching set of whitelisted barcodes files (the whitelisting was done via other means) which I would like to import with snap.pp.import_data(). However, while the fragment_file and file parameters of the function accept lists of file locations as input the whitelist parameter does not.

Would it be possible to add that functionality?

Would you recommend using a for loop to add the whitelisted barcodes for each sample in the snap.pp.import_data() function or would it be preferable to ignore the whitelist parameter and filter out cells after generating the list of anndata objects? I have over 100 samples, so I am looking for computational efficacy but I am a novice at python coding and have never used Rust.

Thank you very much.

kaizhang commented 4 months ago

whitelist currently doesn't accept a list of files. As a workaround, you can write a parallel loop to process your samples separately.

mousepixels commented 3 months ago

This would be a nice addition! I am running into the same problem