This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to filter the BAM file using barcode list produced by 10x pipelines?

Hi everyone,

I have a barcode list I want to filter that barcode from my bam file using the below-mentioned tutorial.

https://kb.10xgenomics.com/hc/en-us/articles/360022448251-How-to-filter-the-BAM-file-produced-by-10x-pipelines-with-a-list-of-barcodes-

But if I use CB:Z: tag, as mentioned in the tutorial with barcode i.e. filter.txt file it doesn't work I can't able to generate "filtered_SAM_body" it, seems like 0 bytes.

Any Suggestions will be highly appreciated.

Thank you.

list barcode

1 answer

Hey,

Information is a bit late but incase you still need to know you can use the -d flag from older versions of samtools like v1.17.

samtools view -D CB:filter.txt file.bam -h -b -o new.bam

Log in to answer this question.