Is there support for tag type 'B' in Rsamtools?
2
0
Entering edit mode
obanerjee • 0
@obanerjee-8930
Last seen 7.0 years ago
United States

I searched briefly for this but did not find an answer -- is there a way to access tag type 'B' data using Rsamtools?

rsamtools software error • 1.1k views
ADD COMMENT
0
Entering edit mode
@valerie-obenchain-4275
Last seen 2.3 years ago
United States

See ?ScanBamParam, specifically the section on 'tags' and 'tagFilter' in the examples. If this doesn't answer your question please give an example of what you're trying to do.

Valerie

ADD COMMENT
0
Entering edit mode
obanerjee • 0
@obanerjee-8930
Last seen 7.0 years ago
United States

Thanks for replying so quickly.  


I have custom SAM tags of types i, Z, and B.  For example:

# Tag "MM" of type i
# Tag "NM" of type Z
# Tag "NY" of type B,C
# Tag "CY" of type B,f 

BAM file name stored as bamFile. The following lines are OK:

param = ScanBamParam( what = scanBamWhat(), tag = c("MM", "NM") )
bam = scanBam( bamFile, param = param )

But if I try the following:

param = ScanBamParam( what = scanBamWhat(), tag = c("MM", "NM", "NY") )
bam = scanBam( bamFile, param = param )

or

param = ScanBamParam( what = scanBamWhat(), tag = c("MM", "NM", "CY") )
bam = scanBam( bamFile, param = param )

then I get the following error:

Error in value[[3L]](cond) : unknown tag type 'B'

Is there a simple way to be able to access the tags that are not of type i or Z using Rsamtools?

ADD COMMENT
0
Entering edit mode

The current parser does not support type B, but if you provide a small example sam or bam file (just a few records, to martin.morgan at roswellpark dot org, or point me to a publicly available example) then I'll be happy to implement this.

ADD REPLY
0
Entering edit mode

Thank you so much for your kindness.   I sent a few example files with a few records each.

ADD REPLY

Login before adding your answer.

Traffic: 863 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6