SnapATAC2 icon indicating copy to clipboard operation
SnapATAC2 copied to clipboard

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

Open strohstern opened this issue 11 months ago • 2 comments

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.

strohstern avatar Mar 06 '24 11:03 strohstern

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

kaizhang avatar Mar 12 '24 03:03 kaizhang

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

mousepixels avatar Apr 09 '24 16:04 mousepixels