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

View of /FigKernelScripts/clustal_to_fasta.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Wed Nov 3 22:43:28 2004 UTC (15 years, 6 months ago) by overbeek
Branch: MAIN
CVS Tags: merge-trunktag-bobdev_news-2, Root-bobdev_news, merge-bobdev_news-1, caBIG-dataload-0, merge-trunktag-bobdev_news-1, merge-bodev_news-3, efrank-preMakefileToStandardMk, caBIG-00-00-00, merge-bobdev_news-2, merge-trunktag-bodev_news-3
Branch point for: Branch-bobdev_news
add clustal_to_fasta

# -*- perl -*-

# useage: clustal_to_fasta < ClustalAlgn > FastAseqs

$next_id = 0;
while (defined($_ = <STDIN>))
{
    @flds = split(/\s+/,$_);
    if (($#flds == 1) && ($_ =~ /^[A-Za-z0-9]/))
    {
        if (!$line{$flds[0]})
	{
	    $ids[$next_id++] = $flds[0];
        }
	$line{$flds[0]} .= $flds[1];
    }
}

for ($i=0; $i < $next_id; $i++)
{
    print ">$ids[$i]\n$line{$ids[$i]}\n";
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3