[Bioperl-l] Writing alignment objects read via Bio::DB::Sam
gowtham
ragowthaman at gmail.com
Fri Mar 8 19:41:38 UTC 2013
Hi Every One,
I'm using Bio::DB::Sam->new(-bam='') method to read a bam file. And I am
able to query individual values of each alignment record. For example
'XM','AS', and 'AS' tags, or alignment start end positions etc. After
filtering these records for some values (eg, mismatches), i would like to
write them back into a "SAM" (preferable BAM) format.
I am not able to find a method that writes the record. Can someone help me
with this?
Though, I am able to open a new bam file for writing using
Bio::DB::Bam->open(my.bam, 'w'), I dont know how to convert the SAM
alignment i read from (Bio::DB::SAM) to be written using this.
write1() does not accept alignment object read by Bio::DB::SAM, it accepts
objects read only by Bio::DB::BAM.
Thanks very much in advance,
Gowthaman
--
Gowthaman
Bioinformatics Systems Programmer.
SBRI, 307 West lake Ave N Suite 500
Seattle, WA. 98109-5219
Phone : LAB 206-256-7188 (direct).
More information about the Bioperl-l
mailing list