[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.6, Thu Jan 31 15:31:39 2008 UTC revision 1.7, Wed Feb 13 14:54:27 2008 UTC
# Line 58  Line 58 
58  (  (
59   ($to_call_dir = shift @ARGV) &&   ($to_call_dir = shift @ARGV) &&
60   ($N           = shift @ARGV) &&   ($N           = shift @ARGV) &&
61   ($foundF      = shift @ARGV) && open(FOUNDFAMS, ">>$foundF")   ($foundF      = shift @ARGV)
62  )  )
63      || die "\n   $usage\n\n";      || die "\n   $usage\n\n";
64    
# Line 93  Line 93 
93      }      }
94  }  }
95    
96    open(FOUNDFAMS, ">>$foundF") || die "Could not append-open $foundF";
97    
98    my $called_by_file = "$to_call_dir/called_by";
99    open(CALLED_BY, ">>$called_by_file")
100        || die "Could not append-open $called_by_file";
101    
102  my @peg_ids = ();  my @peg_ids = ();
103  my %genomes_hit;  my %genomes_hit;
104  my %weight_of_hits;  my %weight_of_hits;
# Line 115  Line 121 
121          my $fid;          my $fid;
122          if (! $old)          if (! $old)
123          {          {
124                my $annot = [ qq(RAST),
125                              qq($func\nCalled by "$self" using FIGfam $fam_id.)
126                              ];
127              my $orf = &NewGenome::ORF::new('NewGenome::ORF', $to_call, $orf_id);              my $orf = &NewGenome::ORF::new('NewGenome::ORF', $to_call, $orf_id);
128              $fid = $orf->promote_to_peg($sims, $func);              $fid      = $orf->promote_to_peg($sims, $func, $annot);
129          }          }
130          else          else
131          {          {
# Line 126  Line 135 
135          if ($fid) {          if ($fid) {
136              push @peg_ids, $fid;              push @peg_ids, $fid;
137    
138                print CALLED_BY "$fid\t$self\n";
139              print FOUNDFAMS "$fid\t$fam_id\t$func\n";              print FOUNDFAMS "$fid\t$fam_id\t$func\n";
140    
141              for ($i=0; ($i < $N) && ($i < @$sims); ++$i) {              for ($i=0; ($i < $N) && ($i < @$sims); ++$i) {
# Line 153  Line 163 
163  for ($i=0; ($i < $N) && ($i < @best); ++$i) {  for ($i=0; ($i < $N) && ($i < @best); ++$i) {
164      print "$best[$i]\t$genomes_hit{$best[$i]}\t$weight_of_hits{$best[$i]}\n";      print "$best[$i]\t$genomes_hit{$best[$i]}\t$weight_of_hits{$best[$i]}\n";
165  }  }
166    
167    $to_call->export_features();
168    
169    close(CALLED_BY);
170  close(FOUNDFAMS);  close(FOUNDFAMS);
 $to_call->export_features;  
171    
172  exit(0);  exit(0);

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3