[Bioperl-l] Newbie question on Bio::SeqIO

JayPea plattj at cardiff.ac.uk
Wed Jan 26 17:00:20 UTC 2011


Hi all.

I recently installed bioperl on my mac (OSX 10.6.6) using fink. And have
been playing around trying to get some really simple things to work. SO what
I'm trying to do is just grab 20bases of the fasta file then print them out. 

This is my script:

#!/usr/bin/perl
use Bio::Perl;
use Bio::SeqIO;


my $seqio_obj = Bio::SeqIO->new(-file => "dna.fa",
                                -format => 'Fasta');
my $output = $seqio_obj->subseq(1,20);
print "$output\n";

fasta file:

>chr1 D_discoideum_Ax4_May_2005 4923596 bp DDB0232428
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN
NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNTATAGTTACTATTGTAAATC
GATAGATAACTTAATTTCATTAATATTATACATAGTAACATTATAAAAAACTTTTAATTT
TTATTTGGGAATTTCAAATTGCTCATTTGGGAAAATTTTTAACTAAGAAAAAATTCAAAA

I get this error:

Can't locate object method "subseq" via package "Bio::SeqIO::fasta" at
./biotester.pl line 16.

Thanks for any help!

James
-- 
View this message in context: http://old.nabble.com/Newbie-question-on-Bio%3A%3ASeqIO-tp30765870p30765870.html
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.




More information about the Bioperl-l mailing list