Entering edit mode
4.7 years ago
dayne.filer
▴
10
I am trying to use samtools view
to filter a bam file. I would ideally like to take a sorted bam with the DT flags set by picard markduplicates
(e.g. DT:Z:SQ for optical/sequencing and DT:Z:LB for PCR/library) and exclude reads with either DT:SQ only OR DT:SQ & DT:LB. As far as I can tell, samtools
only supports filtering by including specific tag:value pairs with the -d
parameter. Is there any workaround here? Or is the only option to write another intermediate file?
This is great -- thanks!!!!!! One quick question, where am I going wrong here?
I get the following error:
you have some reads that don't have the attribute DT.
record.getAttribute("DT")
returns a null value...