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

Florent Angly florent.angly at gmail.com
Wed Jan 26 22:24:59 UTC 2011


Hi James,
This should get you started: http://www.bioperl.org/wiki/HOWTO:SeqIO
Best,
Florent

On 26/01/11 17:05, JayPea wrote:
> 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




More information about the Bioperl-l mailing list