[Bio] / FortyEight / rp_critica.pl Repository:
ViewVC logotype

Diff of /FortyEight/rp_critica.pl

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

revision 1.1, Wed Oct 3 20:55:54 2007 UTC revision 1.4, Fri Oct 12 20:23:04 2007 UTC
# Line 36  Line 36 
36  my $crit_bin = "/vol/critica/bin";  my $crit_bin = "/vol/critica/bin";
37  my $crit_scripts = "/vol/critica/scripts";  my $crit_scripts = "/vol/critica/scripts";
38    
39    #
40    # need to set up the PERL5LIB for our children so critica can find stuff
41    # installed in the perl environment.
42    #
43    
44    $ENV{PERL5LIB} = join(":", @INC);
45    $ENV{PATH} = join(":", $ENV{PATH}, $FIG_Config::bin, $FIG_Config::ext_bin);
46    
47  $ENV{CRITICA_BLASTN} = "$FIG_Config::ext_bin/blastall -p blastn";  $ENV{CRITICA_BLASTN} = "$FIG_Config::ext_bin/blastall -p blastn";
48  $ENV{CRITICA_BLASTPARM} = "-gF -e1e-4";  $ENV{CRITICA_BLASTPARM} = "-gF -e1e-4";
49  $ENV{CRITICA_BLASTDB} = "-d $nt -i";  $ENV{CRITICA_BLASTDB} = "-d $nt -i";
# Line 49  Line 57 
57  &FIG::verify_dir($work);  &FIG::verify_dir($work);
58  chdir $work or &fatal("chdir $work failed: $!");  chdir $work or &fatal("chdir $work failed: $!");
59    
60    my $code = $meta->get_metadata("genome.genetic_code");
61    $code = 11 unless $code;
62    
63  if (0 or (not -s "$work/orfs3.cds"))  if (0 or (not -s "$work/orfs3.cds"))
64  {  {
65      &run("$crit_scripts/blast-contigs $contigs > $work/contigs.blast");      &run("$crit_scripts/blast-contigs $contigs > $work/contigs.blast");
66    
67      &run("$crit_scripts/make-blastpairs $work/contigs.blast > $work/contigs.blast.pairs");      &run("$crit_scripts/make-blastpairs $work/contigs.blast > $work/contigs.blast.pairs");
68      &run("$crit_bin/scanblastpairs $contigs $work/contigs.blast.pairs $work/contigs.triplets");      &run("$crit_bin/scanblastpairs $contigs $work/contigs.blast.pairs $work/contigs.triplets");
69      &run("$crit_scripts/iterate-critica $work/orfs $contigs $work/contigs.triplets");      &run("$crit_scripts/iterate-critica -genetic-code=$code $work/orfs $contigs $work/contigs.triplets");
70  }  }
71    
72  #  #
# Line 75  Line 86 
86    
87  my $figv = $job->get_figv();  my $figv = $job->get_figv();
88    
 my $code = $meta->get_metadata("genome.genetic_code");  
 $code = 11 unless $code;  
89  my $code_table = &FIG::genetic_code($code);  my $code_table = &FIG::genetic_code($code);
90    
91  while (<CRIT>)  while (<CRIT>)
# Line 104  Line 113 
113    
114  $meta->add_log_entry($0, "finish critica computation on $jobdir");  $meta->add_log_entry($0, "finish critica computation on $jobdir");
115  $meta->set_metadata("status.critica", "complete");  $meta->set_metadata("status.critica", "complete");
116    $meta->set_metadata("critica.running", "no");
117  exit(0);  exit(0);
118    
119    
# Line 122  Line 132 
132      if ($meta)      if ($meta)
133      {      {
134          $meta->add_log_entry($0, ['fatal error', $msg]);          $meta->add_log_entry($0, ['fatal error', $msg]);
135          $meta->set_metadata("status.bbhs", "error");          $meta->set_metadata("status.critica", "error");
136            $meta->set_metadata("critica.running", "no");
137      }      }
138    
139      croak "$0: $msg";      croak "$0: $msg";

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3