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?