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 |