Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

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....

Comment on Re: Problems with Variable Scope in Perl
Download Code
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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (5)
As of 2015-11-26 04:42 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (696 votes), past polls