[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.2, Sun Aug 14 23:32:08 2005 UTC revision 1.7, Wed Sep 14 09:57:27 2005 UTC
# Line 2  Line 2 
2    
3  =head1 Load Sprout Tables  =head1 Load Sprout Tables
4    
5  Load a group of Sprout tables from the command line. The parameters are the names of  Create the load files for a group of Sprout tables. The parameters are the names of
6  the table groups to load. The legal table group names are given below.  the table groups whose data is to be created. The legal table group names are given below.
7    
8  =over 4  =over 4
9    
# Line 43  Line 43 
43    
44  Loads B<IsBidirectionalBestHitOf>.  Loads B<IsBidirectionalBestHitOf>.
45    
46    =item Group
47    
48    Loads B<GenomeGroups>.
49    
50    =item Source
51    
52    Loads B<Source>, B<ComesFrom>, B<SourceURL>.
53    
54    =item External
55    
56    Loads B<ExternalAliasOrg>, B<ExternalAliasFunc>.
57    
58    =item *
59    
60    Loads all of the above tables.
61    
62  =back  =back
63    
64  There are two command-line options, given below. Note that in the command line, spaces  The command-line options are given below.
 inside parameters should be represented by C<\b>.  
65    
66  =over 4  =over 4
67    
# Line 66  Line 81 
81    
82  Desired tracing level. The default is 3.  Desired tracing level. The default is 3.
83    
84    =item limitedFeatures
85    
86    Only generate the B<Feature> and B<IsLocatedIn> tables when processing the feature group.
87    
88  =back  =back
89    
90  =cut  =cut
# Line 73  Line 92 
92  use strict;  use strict;
93  use Tracer;  use Tracer;
94  use DocUtils;  use DocUtils;
 use TestUtils;  
95  use Cwd;  use Cwd;
96  use FIG;  use FIG;
97  use SFXlate;  use SFXlate;
# Line 84  Line 102 
102    
103  # Get the command-line parameters and options.  # Get the command-line parameters and options.
104  my ($options, @parameters) = Tracer::ParseCommand({ geneFile => "", subsysFile => "",  my ($options, @parameters) = Tracer::ParseCommand({ geneFile => "", subsysFile => "",
105                                                      trace => 3 },                                                      trace => 3, limitedFeatures => 0 },
106                                                                 @ARGV);                                                                 @ARGV);
107  # Set up tracing.  # Set up tracing.
108  TSetup("$options->{trace} SproutLoad ERDBLoad ERDB Tracer Load", "+>$FIG_Config::temp/trace.log");  TSetup("$options->{trace} SproutLoad ERDBLoad ERDB Stats Tracer Load", "+>$FIG_Config::temp/trace.log");
109  # Create the sprout loader object.  # Create the sprout loader object.
110  my $fig = FIG->new();  my $fig = FIG->new();
111  my $sprout = SFXlate->new_sprout_only();  my $sprout = Sprout->new($FIG_Config::sproutDB, { noDBOpen => 1 });
112  my $spl = SproutLoad->new($sprout, $fig, $options->{geneFile},  my $spl = SproutLoad->new($sprout, $fig, $options->{geneFile}, $options->{subsysFile}, $options);
                           $options->{subsysFile});  
113  # Process the parameters.  # Process the parameters.
114  for my $group (@parameters) {  for my $group (@parameters) {
115      Trace("Processing load group $group.") if T(2);      Trace("Processing load group $group.") if T(2);
116      my $stats;      my $stats;
117      if ($group eq 'Genome') {      if ($group eq 'Genome' || $group eq '*') {
118          $spl->LoadGenomeData();          $spl->LoadGenomeData();
119      } elsif ($group eq 'Feature') {      }
120        if ($group eq 'Feature' || $group eq '*') {
121          $spl->LoadFeatureData();          $spl->LoadFeatureData();
122      } elsif ($group eq 'Coupling') {      }
123        if ($group eq 'Coupling' || $group eq '*') {
124          $spl->LoadCouplingData();          $spl->LoadCouplingData();
125      } elsif ($group eq 'Subsystem') {      }
126        if ($group eq 'Subsystem' || $group eq '*') {
127          $spl->LoadSubsystemData();          $spl->LoadSubsystemData();
128      } elsif ($group eq 'Property') {      }
129        if ($group eq 'Property' || $group eq '*') {
130          $spl->LoadPropertyData();          $spl->LoadPropertyData();
131      } elsif ($group eq 'Diagram') {      }
132        if ($group eq 'Diagram' || $group eq '*') {
133          $spl->LoadDiagramData();          $spl->LoadDiagramData();
134      } elsif ($group eq 'Annotation') {      }
135        if ($group eq 'Annotation' || $group eq '*') {
136          $spl->LoadAnnotationData();          $spl->LoadAnnotationData();
137      } elsif ($group eq 'BBH') {      }
138        if ($group eq 'BBH' || $group eq '*') {
139          $spl->LoadBBHData();          $spl->LoadBBHData();
     } else {  
         Confess("Invalid group name $group.");  
140      }      }
141        if ($group eq 'Group' || $group eq '*') {
142            $spl->LoadGroupData();
143        }
144        if ($group eq 'Source' || $group eq '*') {
145            $spl->LoadSourceData();
146        }
147        if ($group eq 'External' || $group eq '*') {
148            $spl->LoadExternalData();
149        }
150    
151  }  }
152  Trace("Load complete.") if T(2);  Trace("Load complete.") if T(2);
153    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.7

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3