[Bio] / Sprout / LoadSproutTables.pl Repository:
ViewVC logotype

Diff of /Sprout/LoadSproutTables.pl

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

revision 1.45, Mon Nov 5 22:53:03 2007 UTC revision 1.48, Tue Sep 9 21:02:10 2008 UTC
# Line 104  Line 104 
104    
105  =back  =back
106    
 =over 4  
   
107  Most of the above preparation is performed by the B<NMPDRSetup> utility.  Most of the above preparation is performed by the B<NMPDRSetup> utility.
108  NMPDRSetup prints the instructions for completing the process, including  NMPDRSetup prints the instructions for completing the process, including
109  loading the Sprout database. The specific procedure for loading  loading the Sprout database. The specific procedure for loading
110  the Sprout data, however, is as follows.  the Sprout data, however, is as follows.
111    
 =item 1  
   
 Type  
   
     nohup LoadSproutTables -dbLoad -user=you -background "*" >null &  
   
 where C<you> is your user ID, and press ENTER.  
   
 The above command line runs the load in the background. The standard output,  
 standard error, and trace output will be directed to files in the FIG temporary  
 directory. If your user name is C<Bruce> then the files will be named  
 C<outBruce.log>, C<errBruce.log>, and C<traceBruce.log> respectively.  
   
 If the load fails at some point and you are able to correct the problem, use the  
 C<resume> option to restart it. For example, if the load failed while doing the  
 Feature load group, you would resume it using  
   
     nohup LoadSproutTables -dbLoad -dbCreate -user=you -resume -background Feature >null &  
   
 =item 2  
   
 Type  
   
     index_sprout_lucene  
   
  and press ENTER. This will create the Lucene indexes for the Sprout data.  
   
 =back  
   
112  =head2 LoadSproutTables Command  =head2 LoadSproutTables Command
113    
114  C<LoadSproutTables> creates the load files for Sprout tables and optionally loads them.  C<LoadSproutTables> creates the load files for Sprout tables and optionally loads them.
# Line 163  Line 132 
132    
133  Loads B<Subsystem>, B<Role>, B<SSCell>, B<ContainsFeature>, B<IsGenomeOf>,  Loads B<Subsystem>, B<Role>, B<SSCell>, B<ContainsFeature>, B<IsGenomeOf>,
134  B<IsRoleOf>, B<OccursInSubsystem>, B<ParticipatesIn>, B<HasSSCell>,  B<IsRoleOf>, B<OccursInSubsystem>, B<ParticipatesIn>, B<HasSSCell>,
135  B<Catalyzes>, B<ConsistsOfRoles>, B<RoleSubset>, B<HasRoleSubset>,  B<ConsistsOfRoles>, B<RoleSubset>, B<HasRoleSubset>,
136  B<ConsistsOfGenomes>, B<GenomeSubset>, B<HasGenomeSubset>, B<Diagram>,  B<ConsistsOfGenomes>, B<GenomeSubset>, B<HasGenomeSubset>, B<Diagram>,
137  B<RoleOccursIn>, B<SubSystemClass>, B<RoleEC>, B<IsIdentifiedByEC>,  B<RoleOccursIn>, B<SubSystemClass>, B<RoleEC>, B<IsIdentifiedByEC>, and
138  B<ContainsFeature>.  B<ContainsFeature>.
139    
140  =item Annotation  =item Annotation
141    
142  Loads B<SproutUser>, B<UserAccess>, B<Annotation>, B<IsTargetOfAnnotation>,  Loads B<SproutUser>, B<UserAccess>, B<Annotation>, B<IsTargetOfAnnotation>, and
143  B<MadeAnnotation>.  B<MadeAnnotation>.
144    
145  =item Property  =item Property
146    
147  Loads B<Property>, B<HasProperty>.  Loads B<Property>, and B<HasProperty>.
148    
149  =item Group  =item Group
150    
# Line 183  Line 152 
152    
153  =item Source  =item Source
154    
155  Loads B<Source>, B<ComesFrom>, B<SourceURL>.  Loads B<Source>, B<ComesFrom>, and B<SourceURL>.
   
 =item External  
   
 Loads B<ExternalAliasOrg>, B<ExternalAliasFunc>.  
156    
157  =item Reaction  =item Reaction
158    
159  Loads B<ReactionURL>, B<Compound>, B<CompoundName>,  Loads B<ReactionURL>, B<Compound>, B<CompoundName>,
160  B<CompoundCAS>, B<IsAComponentOf>, B<Reaction>.  B<CompoundCAS>, B<IsAComponentOf>, B<Reaction>, B<Scenario>, B<IsInputFor>,
161    B<IsOutputOf>, B<IsOnDiagram>, and B<Catalyzes>.
162    
163  =item Synonym  =item Synonym
164    
# Line 275  Line 241 
241    
242  use strict;  use strict;
243  use Tracer;  use Tracer;
 use DocUtils;  
244  use Cwd;  use Cwd;
245  use FIG;  use FIG;
246  use SFXlate;  use SFXlate;
# Line 287  Line 252 
252    
253  # This is a list of the load groups in their natural order. We'll go through these in sequence, processing  # This is a list of the load groups in their natural order. We'll go through these in sequence, processing
254  # the ones the user asks for.  # the ones the user asks for.
255  my @LoadGroups = qw(Genome Feature Subsystem Property Annotation Source External Reaction Synonym Family Drug);  my @LoadGroups = qw(Genome Subsystem Property Annotation Source Reaction Synonym Family Drug Feature);
256    
257  # Get the command-line parameters and options.  # Get the command-line parameters and options.
258  my ($options, @parameters) = StandardSetup(['SproutLoad', 'ERDBLoad', 'Stats',  my ($options, @parameters) = StandardSetup(['SproutLoad', 'ERDBLoad', 'Stats',
# Line 323  Line 288 
288  my $spl = SproutLoad->new($sprout, $fig, $geneFile, $options->{subsysFile}, $options);  my $spl = SproutLoad->new($sprout, $fig, $geneFile, $options->{subsysFile}, $options);
289  # Insure we have an output directory.  # Insure we have an output directory.
290  FIG::verify_dir($FIG_Config::sproutData);  FIG::verify_dir($FIG_Config::sproutData);
291    # Check for the "*" option.
292    if ($parameters[0] eq '*') {
293        @parameters = @LoadGroups;
294    }
295  # If we're resuming, we only want to have 1 parameter.  # If we're resuming, we only want to have 1 parameter.
296  my $resume = $options->{resume};  my $resume = $options->{resume};
297  if ($resume && @parameters > 1) {  if ($resume && @parameters > 1) {
# Line 337  Line 306 
306      my $resumeGroup = $parameters[0];      my $resumeGroup = $parameters[0];
307      # Copy the load group list into the parameter array.      # Copy the load group list into the parameter array.
308      @parameters = @LoadGroups;      @parameters = @LoadGroups;
     push @parameters, @LoadGroups;  
309      # Shift out the groups until we reach our desired starting point.      # Shift out the groups until we reach our desired starting point.
310      while (scalar(@parameters) && $parameters[0] ne $resumeGroup) {      while (scalar(@parameters) && $parameters[0] ne $resumeGroup) {
311          shift @parameters;          shift @parameters;

Legend:
Removed from v.1.45  
changed lines
  Added in v.1.48

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3