[Bioperl-l] A problem on BioPerl module Bio::DB::Fasta
Tao Zhu
bill_zt at sina.com
Wed Oct 27 01:08:11 UTC 2010
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
More information about the Bioperl-l
mailing list