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

View of /FigKernelScripts/similar_to.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Mon May 31 23:03:40 2004 UTC (16 years ago) by overbeek
Branch: MAIN
fix to extract_genomes

use FIG;
my $fig = new FIG;

use Sim;

my $usage = "usage: bbhs [CutOff] < PEG > PEG1-Sc-PEG";

my($cutoff,$pair,$peg);
$cutoff = shift @ARGV;
$cutoff = defined($cutoff) ? $cutoff : 1.0e-10;

my $id;
@pegs = map { chop; $_ =~ /(\S+)$/; 
	      $id = $1;  
	      if ($id =~ /^fig\|/)
	      {
		  $id;
	      }
	      else
	      {
		  if ($peg = $fig->by_alias($id))
		  {
		      $peg;
		  }
		  else
		  {
		      ();
		  }
	      }
            } <STDIN>;

%pegs = map { $_ => 1 } @pegs;

foreach $peg (keys(%pegs))
{
    foreach $sim ($fig->sims($peg,1000,$cutoff,"fig"))
    {
	push(@hits,[$peg,$sim->psc,$sim->id2]);
    }
}

foreach $x (sort { $a->[1] <=> $b->[1] } @hits)
{
    print join("\t",@$x),"\n";
}

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3