Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Problems with Variable Scope in Perl

by MadraghRua (Vicar)
on Nov 03, 2008 at 19:00 UTC ( [id://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...

MadraghRua
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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://721176]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-26 05:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found