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

Diff of /FortyEight/rp_auto_assign.pl

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

revision 1.3, Wed Nov 29 15:19:19 2006 UTC revision 1.10, Thu Aug 5 18:09:11 2010 UTC
# Line 8  Line 8 
8  use FIG_Config;  use FIG_Config;
9  use File::Basename;  use File::Basename;
10  use GenomeMeta;  use GenomeMeta;
11    use Carp 'croak';
12    
13  @ARGV == 1 or die "Usage: $0 job-dir\n";  @ARGV == 1 or die "Usage: $0 job-dir\n";
14    
# Line 44  Line 45 
45      close(PROP);      close(PROP);
46  }  }
47    
48  my $simfile = "$jobdir/rp/$genome/similarities";  my $simfile = "$jobdir/rp/$genome/expanded_similarities";
49    
50  open(TBL, "<$tbl") or &fatal("Cannot open tbl file $tbl: $!");  open(TBL, "<$tbl") or &fatal("Cannot open tbl file $tbl: $!");
51    
52  my $cmd = "$FIG_Config::bin/auto_assign sims=$simfile > $jobdir/rp/$genome/proposed_non_ff_functions";  my $cmd = "$FIG_Config::bin/auto_assign -orgdir $jobdir/rp/$genome > $jobdir/rp/$genome/proposed_non_ff_functions";
53  print "running $cmd\n";  print "running $cmd\n";
54  open(AA, "| $cmd")  open(AA, "| $cmd")
55          or &fatal("aa failed: $!");          or &fatal("aa failed: $!");
# Line 73  Line 74 
74      &fatal("error on close \$?=$? \$!=$!");      &fatal("error on close \$?=$? \$!=$!");
75  }  }
76    
77    #
78    # When auto assign is complete, we are able to submit the model computation.
79    #
80    
81    if ($meta->get_metadata("model_build.enabled"))
82    {
83        my $user = &FIG::file_head("$jobdir/USER", 1);
84        chomp $user;
85        my $cmd = ("/vol/model-prod/FIGdisk/bin/ModelDriver.sh 'createmodelfile?$genome?1?$user' > $jobdir/rp.errors/create_model.stderr 2>&1");
86        my $rc = system($cmd);
87        if ($rc != 0)
88        {
89            $meta->add_log_entry($0, ['error creating model', $rc]);
90        }
91        else
92        {
93            $meta->add_log_entry($0, ['model submitted']);
94    
95            my $link = "http://seed-viewer.theseed.org/seedviewer.cgi?model=Seed${genome}&page=ModelView";
96    
97            $meta->set_metadata("model_build.viewing_link", $link);
98        }
99    }
100    
101    
102  $meta->add_log_entry($0, "auto_assign completed\n");  $meta->add_log_entry($0, "auto_assign completed\n");
103  $meta->set_metadata("status.auto_assign", "complete");  $meta->set_metadata("status.auto_assign", "complete");
104    $meta->set_metadata("auto_assign.running", "no");
105    
106  sub fatal  sub fatal
107  {  {

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.10

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3