[Bioperl-l] Newbie question on Bio::SeqIO
Joshua Udall
joshua_udall at byu.edu
Wed Jan 26 22:11:46 UTC 2011
Use this bash command to see which libraries are loading in perl.
Ideally, you would make sure the fink library is represented in the list.
A quick fix would be to simply use a 'lib' statement at the beginning of
your script to source your Bioperl path.
perl -e 'for (@INC) { printf "%d %s\n", $i++, $_}'
Josh
On 1/26/11 3:05 PM, "JayPea" <plattj at cardiff.ac.uk> 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
>--
>View this message in context:
>http://old.nabble.com/Newbie-question-on-Bio%3A%3ASeqIO-tp30768204p3076820
>4.html
>Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.
>
>_______________________________________________
>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