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

View of /FigKernelScripts/condense_kmer_output.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (download) (as text) (annotate)
Thu May 8 19:29:37 2014 UTC (5 years, 6 months ago) by overbeek
Branch: MAIN
CVS Tags: rast_rel_2014_0729, rast_rel_2014_0912, HEAD
Changes since 1.1: +1 -1 lines
generalize to kbase

use strict;
use Data::Dumper;

my $last = <STDIN>;
while ($last && ($last =~ /^PROTEIN-ID\s+(\S+)/))
{
    my $peg = $1;
    my @kmers;
    $last = <STDIN>;
    while ($last && ($last !~ /^PROTEIN-ID/))
    {
	if ($last =~ /^HIT\s+\d+\s+(\S+)/)
	{
	    push(@kmers,$1);
	}
	$last = <STDIN>;
    }
    print "$peg\t",join(",",sort { $a <=> $b } @kmers),"\n";
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3