[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.10, Thu Aug 5 18:09:11 2010 UTC revision 1.12, Thu Aug 19 15:51:08 2010 UTC
# Line 9  Line 9 
9  use File::Basename;  use File::Basename;
10  use GenomeMeta;  use GenomeMeta;
11  use Carp 'croak';  use Carp 'croak';
12    use Job48;
13    
14  @ARGV == 1 or die "Usage: $0 job-dir\n";  @ARGV == 1 or die "Usage: $0 job-dir\n";
15    
# Line 80  Line 81 
81    
82  if ($meta->get_metadata("model_build.enabled"))  if ($meta->get_metadata("model_build.enabled"))
83  {  {
84        my $userid;
85        my $link;
86        eval {
87            my $job = Job48->new($jobdir);
88            my $uo = $job->getUserObject;
89            if ($uo)
90            {
91                $userid = $uo->_id;
92            }
93        };
94    
95        if (defined($userid))
96        {
97            $link = "http://seed-viewer.theseed.org/seedviewer.cgi?model=Seed${genome}.${userid}&page=ModelView";
98        }
99        else
100        {
101            $meta->add_log_entry($0, "Could not get user id");
102        }
103    
104    
105      my $user = &FIG::file_head("$jobdir/USER", 1);      my $user = &FIG::file_head("$jobdir/USER", 1);
106      chomp $user;      chomp $user;
107      my $cmd = ("/vol/model-prod/FIGdisk/bin/ModelDriver.sh 'createmodelfile?$genome?1?$user' > $jobdir/rp.errors/create_model.stderr 2>&1");      my $cmd = ("/vol/model-prod/FIGdisk/bin/ModelDriver.sh 'createmodelfile?$genome?1?$user' > $jobdir/rp.errors/create_model.stderr 2>&1");
# Line 92  Line 114 
114      {      {
115          $meta->add_log_entry($0, ['model submitted']);          $meta->add_log_entry($0, ['model submitted']);
116    
117          my $link = "http://seed-viewer.theseed.org/seedviewer.cgi?model=Seed${genome}&page=ModelView";          if (defined($link))
118            {
119          $meta->set_metadata("model_build.viewing_link", $link);          $meta->set_metadata("model_build.viewing_link", $link);
120      }      }
121  }  }
122    }
123    
124    
125  $meta->add_log_entry($0, "auto_assign completed\n");  $meta->add_log_entry($0, "auto_assign completed\n");

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3