[Bio] / FigKernelScripts / clustal_to_fasta.pl Repository:
ViewVC logotype

Annotation of /FigKernelScripts/clustal_to_fasta.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download) (as text)

1 : overbeek 1.1 # -*- perl -*-
2 :    
3 :     # useage: clustal_to_fasta < ClustalAlgn > FastAseqs
4 :    
5 :     $next_id = 0;
6 :     while (defined($_ = <STDIN>))
7 :     {
8 :     @flds = split(/\s+/,$_);
9 :     if (($#flds == 1) && ($_ =~ /^[A-Za-z0-9]/))
10 :     {
11 :     if (!$line{$flds[0]})
12 :     {
13 :     $ids[$next_id++] = $flds[0];
14 :     }
15 :     $line{$flds[0]} .= $flds[1];
16 :     }
17 :     }
18 :    
19 :     for ($i=0; $i < $next_id; $i++)
20 :     {
21 :     print ">$ids[$i]\n$line{$ids[$i]}\n";
22 :     }

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3