timoast / sinto

Tools for single-cell data processing
https://timoast.github.io/sinto/
MIT License
112 stars 24 forks source link

sinto filterbarcodes returning empty bams #24

Closed debbie28 closed 3 years ago

debbie28 commented 3 years ago

Hello Tim,

I am trying to use sinto filterbarcodes for making bam files from my scATAC clusters, and despite running without any error I am getting empty bam files. I saw that this issue had been brought up previously, and updating the sinto version solved the problem. However, I am using the latest 0.7.2.2 version of sinto, so that is probably not the issue. In that post you had also asked the user to ensure that the "cells" file is indeed tab-delimited and I verified that is true for me.

I am running the following code: sinto filterbarcodes -b fragments_10X_sorted.bam -c cells.csv --barcodetag "CB"

This is how the head of my bam file looks: GACCTTCGTTATGCAC-2 0 chr1 10158 255 151M 0 0 TCAAGGTAGTGAACCG-3 0 chr1 10229 255 98M 0 0 ATTGTCTTCGAAGCCC-4 0 chr1 10335 255 219M 0 0 GTAGTACCAAGAAACT-4 0 chr1 10793 255 142M 0 0

And this is the head of my cells file:

AAACGAAAGAACGACC-4 11 AAACGAAAGACCTATC-2 0 AAACGAAAGAGGAATG-3 2 AAACGAAAGCCTATAC-3 11 AAACGAAAGCGTCAAG-4 2 AAACGAAAGCTAGCAG-1 2

Please let me know if I am missing something/what is the potential cause of the issue.

Thanks Debbie

timoast commented 3 years ago

It looks like your cell barcode is in the read name rather than under a tag named "CB". You should use the --barcode_regex parameter rather than --barcodetag

debbie28 commented 3 years ago

Thank you! That worked out perfectly.