Removing multiple tags with squeeze

52 views
Skip to first unread message

Thomas Keane

unread,
Mar 26, 2014, 11:17:17 AM3/26/14
to bamu...@googlegroups.com
Hi - I'm using the latest version of 'bam' (1.0.11) to strip some extra tags that were added by GATK BQSR (BI, BD, and BQ). However, the squeeze command only seems to be removing the first tag given in the --rmTags command line option. My command is:

bam squeeze --in test.bam --out test.strip.bam --keepDups --rmTags BD:Z;BQ:Z;BI:Z

Do you also see this behaviour?

Thanks,
Thomas

Mary Kate Wing

unread,
Mar 26, 2014, 11:54:56 AM3/26/14
to bamutils
Try:
bam squeeze --in test.bam --out test.strip.bam --keepDups --rmTags "BD:Z;BQ:Z;BI:Z"
-or-
bam squeeze --in test.bam --out test.strip.bam --keepDups --rmTags 'BD:Z;BQ:Z;BI:Z'

Unfortunately I made a poor choice of delimiter, ';', between the rmTags.  If you don't put the tags in quotes, the ';' will be treated as the end of the command.
When I recreated your command without the quotes, I got: 
BQ:Z: command not found
BI:Z: command not found

I will update the wiki documentation to be clear that multiple tags need quotes around them. 
I will also update the command-line help.

Additionally, in a future version, I think I will update the code to also allow ',' delimiters between the tags.  That way they shouldn't have to be in quotes.

Let me know if adding the quotes fixes your problem.
Sorry for the poor documentation on this and the poor choice of delimiter.

Mary Kate




--
You received this message because you are subscribed to the Google Groups "bamUtils" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bamutils+u...@googlegroups.com.
To post to this group, send email to bamu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bamutils/76cee6a7-ef8d-4a2f-b5b3-f2193ee39c85%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thomas Keane

unread,
Mar 26, 2014, 12:03:26 PM3/26/14
to bamu...@googlegroups.com
Ah, yes I should have spotted that too. Thank you!

Thomas

Mary Kate Wing

unread,
Mar 26, 2014, 12:26:43 PM3/26/14
to bamutils
No problem.  Just let me know if you have any other questions or issues regarding bamUtils.

Mary Kate


Reply all
Reply to author
Forward
0 new messages