Hi Pierre! I found your answer when I was searching for a way to make bam files (~250GB) smaller by removing base qualities and tags and other unwanted information (doing copy number analysis, for me base qualities and tags are somehow unwanted information). Currently, I am using bamUtils squeeze (I don't know yet how good this tool is in making the bam file smaller [This is replacing QNAME to an integer, removing the duplicates, removing the OG tag but not the QUAL field!]) and previously I used cgat bam2bam strip-quality deleting only the QUAL field (which was slow [12 hours for a 160 GB] and didn't gain much: 3GB smaller for a 160GB file). I was wondering if deleting whatever comes after the SEQ will work (i.e QUAL and all other tags)? and if yes, what would be the fastest way to apply that? Thanks in advance for sharing your ideas!
Removing the OQ tag from a BAM file
Hello,
I'd like to remove a tag (not a read) from a BAM file. I would like to remove the OQ tag that keeps original qualities after running BQSR. Any suggestions on how I might do this?
Thanks,
Mark
• 6,091 views
•
link
1 answer
sed 's/\tOQ\:Z\:[^\t]*//' in.sam > out.sam
• 0 views
•
link
• 0 views
•
link
ask this as a new question please.
• 0 views
•
link
Log in to answer this question.