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

Diff of /FigKernelScripts/find_neighbors_using_figfams.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2, Fri Jun 1 04:19:16 2007 UTC revision 1.5, Wed Jan 30 22:50:37 2008 UTC
# Line 25  Line 25 
25  use FigFams;  use FigFams;
26  my $figfams = new FigFams($fig);  my $figfams = new FigFams($fig);
27    
28    print STDERR "$0 using figfams in $figfams->{dir}\n";
29    
30  use ToCall;  use ToCall;
31  use NewGenome;  use NewGenome;
32    
# Line 69  Line 71 
71  # we are doing) you would use ToCall.pm.  # we are doing) you would use ToCall.pm.
72    
73  my $to_call;  my $to_call;
74    my $old;
75    
76  if ((@ARGV > 0) && ($ARGV[0] =~ /^old/i)) {  if ((@ARGV > 0) && ($ARGV[0] =~ /^old/i)) {
77        $old = 1;
78      $to_call = new ToCall($to_call_dir);      $to_call = new ToCall($to_call_dir);
79  }  }
80  else {  else {
# Line 109  Line 114 
114              , " sims)\t$func\n"              , " sims)\t$func\n"
115              if $ENV{VERBOSE};              if $ENV{VERBOSE};
116    
117            my $fid;
118            if (! $old)
119            {
120          my $orf = &NewGenome::ORF::new('NewGenome::ORF', $to_call, $orf_id);          my $orf = &NewGenome::ORF::new('NewGenome::ORF', $to_call, $orf_id);
121          my $fid = $orf->promote_to_peg($sims, $func);              $fid = $orf->promote_to_peg($sims, $func);
122            }
123            else
124            {
125                $fid = $orf_id;
126            }
127    
128          if ($fid) {          if ($fid) {
129              push @peg_ids, $fid;              push @peg_ids, $fid;
130    
# Line 119  Line 133 
133              for ($i=0; ($i < $N) && ($i < @$sims); ++$i) {              for ($i=0; ($i < $N) && ($i < @$sims); ++$i) {
134                  ++$genomes_hit{&FIG::genome_of($sims->[$i]->id2)};                  ++$genomes_hit{&FIG::genome_of($sims->[$i]->id2)};
135                  $weight_of_hits{&FIG::genome_of($sims->[$i]->id2)} +=                  $weight_of_hits{&FIG::genome_of($sims->[$i]->id2)} +=
136                      ($sims->[$i]->bsc / $len_of{$orf_id});                      ($sims->[$i]->bsc / $sims->[$i]->ln2);
137              }              }
138          }          }
139          else {          else {

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3