Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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 snow settles gently...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2017-10-22 14:11 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (273 votes). Check out past polls.