Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: splitting fasta file into individual fasta files

by citromatik (Curate)
on May 07, 2009 at 09:13 UTC ( [id://762534]=note: print w/replies, xml ) Need Help??


in reply to Re^2: splitting fasta file into individual fasta files
in thread splitting fasta file into individual fasta files

You can use Tie::File::AnyData::Bio::Fasta to facilitate this task. This script reads a multi-fasta file and splits it in multiple single-fasta files:

use strict; use warnings; use Tie::File::AnyData::Bio::Fasta; tie my @in,'Tie::File::AnyData::Bio::Fasta', shift @ARGV, or die $!; my $n = 0; for my $seq (@in){ tie my @out, 'Tie::File::AnyData::Bio::Fasta', "$n.fa" or die $!; $n++; @out = ($seq); untie @out; } untie @in;

citromatik

Replies are listed 'Best First'.
Re^4: splitting fasta file into individual fasta files
by lomSpace (Scribe) on May 07, 2009 at 16:06 UTC
    citromatik,
    Thanks. I have installed the files into 'C:\Perl\site\lib' and
    'C:\Perl\lib' on my windows system, but the error keeps stating that
    it 'Can't locate Tie/File/AnyData/Bio/Fasta.pm in @INC (@INC contains: C:/Perl/site/lib C:/Perl/lib .)'
    What could I be doing wrong?

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-20 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found