[Bioperl-l] A problem on BioPerl module Bio::DB::Fasta

Chris Fields cjfields at illinois.edu
Thu Oct 28 15:10:25 UTC 2010


Very true, didn't catch that; I was just making the correction you mentioned.  That's what happens when I don't have enough coffee!

chris

On Oct 28, 2010, at 2:38 AM, Tao Zhu wrote:

> Dear Chris,
> 
> Thank you for correcting the HOWTO, but in fact it hasn't been
> completely correct yet. I've made some changes to the passage again like
> this,
> 
> ************************
> use Bio::DB::Fasta; 
> ($file,$id,$start,$end) = ("genome.fa","CHROMOSOME_I",11250,11333);
> $db = Bio::DB::Fasta->new($file);
> $seq = $db->seq($id,$start,$end);
> print $seq,"\n";
> ************************
> 
> The original passage is like this,
> ************************
> use Bio::DB::Fasta;
> ($file,$id,$start,$end) = ("genome.fa","CHROMOSOME_I",11250,11333);
> $db = Bio::DB::Fasta->new($file);
> $seqobj = $db->seq($id,$start,$end); 
> print $seqobj->seq;
> ************************
> 
> We should notice that if method '$db->seq()' is called, then it would
> return a simple string, not a Bio::Seq object.
> 
> 
> 
> 在 2010-10-27三的 13:40 -0500,Chris Fields写道:
>> Tao,
>> 
>> I've made that correction to the HOWTO.  In the future, if you see an error on the wiki you are free to make changes to correct them.  
>> 
>> Thanks!
>> 
>> chris
>> 
>> On Oct 26, 2010, at 8:08 PM, Tao Zhu wrote:
>> 
>>> Hello, everyone!
>>> 
>>> I hope it isn't true, but I really find a problem on BioPerl module
>>> Bio::DB::Fasta. In http://www.bioperl.org/wiki/HOWTO:Beginners Brian
>>> Osborne wrote that we could catch sub-sequences like this,
>>> 
>>> 
>>> use Bio::DB::Fasta;
>>> ($file,$id,$start,$end) = ("genome.fa","CHROMOSOME_I",6,10);
>>> $db = Bio::DB::Fasta->new($file);
>>> $seqobj = $db->get_Seq_by_id($id,$start,$end);
>>> print $seqobj->seq,"\n";
>>> 
>>> 
>>> In fact it didn't work. I only got the whole sequence after running the
>>> script. Therefore I referred to the Pdoc documentation and realized it
>>> should be written as follows,
>>> 
>>> 
>>> use Bio::DB::Fasta;
>>> ($file,$id,$start,$end) = ("genome.fa","CHROMOSOME_I",6,10);
>>> $db = Bio::DB::Fasta->new($file);
>>> $seq = $db->seq($id,$start,$end);
>>> print $seq,"\n";
>>> 
>>> 
>>> Then it would return the sub-sequence from 6 to 10.
>>> 
>>> Probably Dr Osborne had made a mistake when writing the use-guide
>>> HOWTO:Beginners.
>>> 
>>> 
>>> -- 
>>> Tao Zhu, College of Life Sciences, Beijing Normal University, Beijing
>>> 100875, China
>>> email: tzhu at mail.bnu.edu.cn
>>> 
>>> _______________________________________________
>>> 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