jdidion / atropos

An NGS read trimming tool that is specific, sensitive, and speedy. (production)
Other
120 stars 15 forks source link

--output-sam sets all SAM flags to 0 #104

Closed plijnzaad closed 4 years ago

plijnzaad commented 4 years ago

When running atropos on (unaligned) SAM input and outputting with SAM format, all SAM flags become 0. This is not a very big deal but can make strict sam/bam format checkers (e.g. picard's ValidateSamFile) object (flag 0 means a read is single-end and mapped, so it should have coordinates).

jdidion commented 4 years ago

Thanks, I missed this subtlety. For right now, the assumption is that running Atropos on your SAM/BAM may invalidate the existing alignment information, which is why all the coordinates are dropped. But you are right the the flags should reflect the unmapped status of the reads. I have update the flags for single-end to be 4 and for paired end to be 77 and 141. This fix is in develop and will be in alpha6.