[Bioc-sig-seq] Getting optional fields from BAM file using Rsamtools

Martin Morgan mtmorgan at fhcrc.org
Mon Mar 8 10:12:10 CET 2010


On 03/02/2010 11:05 AM, Martin Morgan wrote:
> On 03/02/2010 10:57 AM, Steve Lianoglou wrote:
>> Hi,
>>
>> I'm referencing the info that's mentioned in section 2.2.4 of the SAM
>> specification:
>> http://samtools.sourceforge.net/SAM1.pdf
>>
>> Is it possible to get the information stored in there from my BAM file
>> using Rsamtools? I can't find any way to do so, sorry if I'm missing
>> something obvious.
>>
>> Bowtie (and I reckon BWA, or whatever) stores the mismatch info of the
>> read-to-reference (eg. MD:Z:5C5C25) from there, and I'd like to be
>> able to get at it
> 
> There is not, but it seems like a reasonable request; it won't happen
> overnight. Martin

In v. 0.1.40, ScanBamParam(tag=c("XX", "YY", "ZZ")) tells scanBam to
parse those fields, if they are encountered. Additional small test cases
welcome -- I do not have access to a very rich set of real tags.

Martin


> 
>>
>> Thanks,
>> -steve
>>
> 
> 


-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioc-sig-sequencing mailing list