[Bioperl-l] reading sam files

Chris Fields cjfields at illinois.edu
Tue Jun 14 17:26:38 UTC 2011


Jonas,

I think you need TAM (aka text-based SAM, which I think most users call SAM output).  It does handle that, look here:

http://search.cpan.org/~lds/Bio-SamTools-1.28/lib/Bio/DB/Sam.pm#TAM_Files

I'm not sure why you would want to do this though, as the BAM file can be manipulated directly as well (would think it is faster working with BAM).  Any reason you are doing this?

chris

On Jun 14, 2011, at 9:29 AM, Scott Cain wrote:

> Hi Jonas,
> 
> Then I think you are correct that there isn't a way to read sam files
> directly.  You could convert to bam, or extend Bio::DB::Sam to do what
> you want (patches welcome!).
> 
> Scott
> 
> 
> On Tue, Jun 14, 2011 at 7:47 AM, Jonas Zierer
> <jonas.zierer at campus.lmu.de> wrote:
>> Hi Scott,
>> 
>> no, i didn't find any way to read sam files in the documentation
>> (http://cpan.uwinnipeg.ca/htdocs/Bio-SamTools/Bio/DB/Sam.html )
>> 
>> the BIO::DB::Sam->new method only takes a -bam argument and give a sam
>> file to this method it says
>> [bam_header_read] EOF marker is
>> absent.
>> [bam_index_load] fail to load BAM
>> index.
>> [bam_header_read] EOF marker is
>> absent.
>> [bam_header_read] EOF marker is absent.
>> 
>> Jonas
>> 
>> 
>> Am Monday, den 13.06.2011, 12:39 -0400 schrieb Scott Cain:
>>> Hello Jonas,
>>> 
>>> When you say it didn't work, what do you mean?  Did you read the
>>> documentation, and it didn't work the way the documentation indicated?
>>>  Could you show the code you used and any error messages you got?
>>> 
>>> Scott
>>> 
>>> 
>>> On Wed, Jun 8, 2011 at 9:10 AM, Jonas Zierer <jonas.zierer at campus.lmu.de> wrote:
>>>> Hi,
>>>> 
>>>> i tried to read a sam file insted of a bam file using DB::BIO::Sam, but
>>>> that didn't work.
>>>> 
>>>> Is there any other possibility to read sam files with bioperl?
>>>> 
>>>> thx, bye
>>>> 
>>>> _______________________________________________
>>>> Bioperl-l mailing list
>>>> Bioperl-l at lists.open-bio.org
>>>> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>>>> 
>>> 
>>> 
>>> 
>> 
>> 
>> 
> 
> 
> 
> -- 
> ------------------------------------------------------------------------
> Scott Cain, Ph. D.                                   scott at scottcain dot net
> GMOD Coordinator (http://gmod.org/)                     216-392-3087
> Ontario Institute for Cancer Research
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l





More information about the Bioperl-l mailing list