Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

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

MadraghRua
yet another biologist hacking perl....


Comment on Re: Problems with Variable Scope in Perl
Download Code
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
Node Status?
node history
Node Type: note [id://721176]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2014-12-26 00:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls