This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extracting reads from Pacbio Sequel BAM by read name

Hi,

Does anyone know of a good way to filter reads from a Pacbio BAM file (the Sequel data format)? I have identified some contaminant reads which I would like to remove before mapping the BAM file to my draft assembly using pbalign. I want to use Arrow, so I think it is important to keep the original BAM format for mapping (or at least I'm getting errors with Arrow after converting to FASTA and mapping that with pbalign).

Picard FilterSamReads doesn't seem to work with the Pacbio format, neither does pysam.

Cheers!

bam pacbio sequel arrow pbalign

Hello,

Picard FilterSamReads doesn't seem to work with the Pacbio format, neither does pysam.

"doesn't work" is never a good description of the problem. Please give us more details.

fin swimmer

1 answer

Thanks,

On further inspection it is due to the lack of a SM tag in the Pacbio BAM header, which Picard is expecting: https://github.com/PacificBiosciences/blasr/issues/212

The work-around for now looks like running picard with "VALIDATION_STRINGENCY=LENIENT"

Log in to answer this question.