go back

Script Perl: TblToFasta.pl

#!/usr/bin/perl -w

use strict;

while(<>){
    chomp;
    my ($id,$seq) = split;
    
    print ">$id\n";
    my $length = length($seq);
    my $n = int( $length/60) + 1;
    for(my $i=0; $i<$length; $i=$i+60){
	my $s = substr($seq,$i,60);
	print $s,"\n";
    }
}