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

Diff of /FigKernelScripts/promote_orfs_to_pegs.pl

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

revision 1.11, Wed Oct 10 20:24:21 2007 UTC revision 1.12, Thu Dec 6 00:07:06 2007 UTC
# Line 47  Line 47 
47  my @neighbors = map { m/^(\d+\.\d+)/o ? ($1) : () } `cat $to_call_dir/neighbors`;  my @neighbors = map { m/^(\d+\.\d+)/o ? ($1) : () } `cat $to_call_dir/neighbors`;
48    
49  #...Build file of "nearby" PEGs  #...Build file of "nearby" PEGs
50    if (@neighbors) {
51  my $tmp_close = "$FIG_Config::temp/tmp_close_$$.fasta";  my $tmp_close = "$FIG_Config::temp/tmp_close_$$.fasta";
52  system("/bin/rm -f $tmp_close*");  system("/bin/rm -f $tmp_close*");
53    
54  foreach my $org (@neighbors) {  foreach my $org (@neighbors) {
55      print STDERR "Appending $org to $tmp_close\n" if $ENV{VERBOSE};      print STDERR "Appending $org to $tmp_close\n" if $ENV{VERBOSE};
56      system("cat $FIG_Config::organisms/$org/Features/peg/fasta >> $tmp_close");      system("cat $FIG_Config::organisms/$org/Features/peg/fasta >> $tmp_close");
# Line 60  Line 62 
62  open(TMP_SIMS, ">$tmp_sims")  open(TMP_SIMS, ">$tmp_sims")
63      || die "Could not write-open $tmp_sims";      || die "Could not write-open $tmp_sims";
64  foreach my $orf_id ($to_call->get_fids_for_type('orf')) {  foreach my $orf_id ($to_call->get_fids_for_type('orf')) {
65            if (@neighbors) {
66      my $sims = &blast_against($to_call->get_feature_sequence($orf_id), $tmp_close);      my $sims = &blast_against($to_call->get_feature_sequence($orf_id), $tmp_close);
67    
68      if (@$sims) {      if (@$sims) {
# Line 76  Line 79 
79          print STDERR "No sims for $orf_id\n" if $ENV{VERBOSE};          print STDERR "No sims for $orf_id\n" if $ENV{VERBOSE};
80      }      }
81  }  }
82        }
83  close(TMP_SIMS) || die "Could not close $tmp_sims";  close(TMP_SIMS) || die "Could not close $tmp_sims";
84    
85  #  #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
86  # Disable the auto assignment of the fids we just called.  # Disable the auto assignment of the fids we just called.
87  #  #=======================================================================
88  if (0)  if (0)
89  {  {
90      my $tmp_seqs = "$FIG_Config::temp/tmp_seqs.$$";      my $tmp_seqs = "$FIG_Config::temp/tmp_seqs.$$";
# Line 109  Line 113 
113      unlink($tmp_seqs)  || die "Could not remove $tmp_seqs";      unlink($tmp_seqs)  || die "Could not remove $tmp_seqs";
114  }  }
115    
116        unlink($tmp_sims)  || die "Could not remove $tmp_sims";
117        unlink($tmp_close) || die "Could not remove $tmp_close";
118    }
119    #-----------------------------------------------------------------------
120    
121    
122    #...Promote any remaining unpromoted ORFs...
123  $to_call->promote_remaining_orfs;  $to_call->promote_remaining_orfs;
124    
125  #... export_features also writes assigned_functions  
126    #...NOTE: export_features also writes assigned_functions
127  $to_call->export_features;  $to_call->export_features;
128    
129    
# Line 127  Line 139 
139  else {  else {
140      die "Something is wrong --- $to_call_dir/Features/orf/tbl is non-empty";      die "Something is wrong --- $to_call_dir/Features/orf/tbl is non-empty";
141  }  }
142    exit(0);
 unlink($tmp_close) || die "Could not remove $tmp_close";  
 unlink($tmp_sims)  || die "Could not remove $tmp_sims";  
143    
144    
145    

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3