Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Problems with Variable Scope in Perl

by MadraghRua (Vicar)
on Nov 03, 2008 at 19:00 UTC ( #721176=note: print w/replies, xml ) Need Help??

in reply to Problems with Variable Scope in Perl

You can actually do a lot of this more efficiently in BioPerl. So go to CPAN and search for Bundle::BioPerl. There are several types of BioPerl bundels available, but you just want this one for now - the core modules.

You can then code something like this:

use Bio::SeqIO; $in = Bio::SeqIO->new(-file => '$inputfile', -format => 'fasta'); while (my $seq = $in->next_seq() ) { print "fasta tag: ", $seq->id(), "sequence: ", $seq->sequence(), "\n"; }

I think you can figure out how to do the rest of your stuff once you have the fasta tag and the sequence.

In case you don't know about it, check out BioPerl for tutorials, How Do I's and script examples.

Hope this helps...

yet another biologist hacking perl....

Replies are listed 'Best First'.
Re^2: Problems with Variable Scope in Perl
by Anonymous Monk on Nov 05, 2008 at 15:56 UTC

    Thank you Graff, Ruzam, and MadraghRua for your comments. I understand things a bit better now :) InfoSeeker

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://721176]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2018-01-23 14:49 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (248 votes). Check out past polls.