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

Annotation of /Sprout/LoadSproutTables.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (view) (download) (as text)

1 : parrello 1.1 #!/usr/bin/perl -w
2 :    
3 :     =head1 Load Sprout Tables
4 :    
5 :     Load a group of Sprout tables from the command line. The parameters are the names of
6 :     the table groups to load. The legal table group names are given below.
7 :    
8 :     =over 4
9 :    
10 :     =item Genome
11 :    
12 :     Loads B<Genome>, B<HasContig>, B<Contig>, B<IsMadeUpOf>, and B<Sequence>.
13 :    
14 :     =item Coupling
15 :    
16 :     Loads B<Coupling>, B<IsEvidencedBy>, B<PCH>, B<ParticipatesInCoupling>,
17 :     B<UsesAsEvidence>.
18 :    
19 :     =item Feature
20 :    
21 :     Loads B<Feature>, B<FeatureAlias>, B<FeatureTranslation>, B<FeatureUpstream>,
22 :     B<IsLocatedIn>, B<IsBidirectionalBestHitOf>, B<FeatureLink>.
23 :    
24 :     =item Subsystem
25 :    
26 :     Loads B<Subsystem>, B<Role>, B<SSCell>, B<Diagram>, B<ContainsFeature>, B<IsGenomeOf>,
27 :     B<IsRoleOf>, B<OccursInSubsystem>, B<ParticipatesIn>, B<HasSSCell>.
28 :    
29 :     =back
30 :    
31 :     There are two command-line options, given below. Note that in the command line, spaces
32 :     inside parameters should be represented by C<\b>.
33 :    
34 :     =over 4
35 :    
36 :     =item geneFile
37 :    
38 :     The name of the file containing the genomes and their associated access codes. The
39 :     file should have one line per genome, each line consisting of the genome ID followed
40 :     by the access code, separated by a tab. If no file is specified, all complete genomes
41 :     will be processed and the access code will be 1.
42 :    
43 :     =item subsysFile
44 :    
45 :     The name of the file containing the trusted subsystems. The file should have one line
46 :     per trusted subsystem. If no file is specified, all subsystems will be trusted.
47 :    
48 :     =item trace
49 :    
50 :     Desired tracing level. The default is 3.
51 :    
52 :     =back
53 :    
54 :     =cut
55 :    
56 :     use strict;
57 :     use Tracer;
58 :     use DocUtils;
59 :     use TestUtils;
60 :     use Cwd;
61 :     use FIG;
62 :     use SFXlate;
63 :     use File::Copy;
64 :     use File::Path;
65 :     use SproutLoad;
66 :     use Stats;
67 :    
68 :     # Get the command-line parameters and options.
69 :     my ($options, @parameters) = Tracer::ParseCommand({ geneFile => "", subsysFile => "",
70 :     trace => 3 },
71 :     @ARGV);
72 :     # Set up tracing.
73 :     TSetup("$options->{trace} SproutLoad ERDBLoad ERDB Tracer Load", "+>$FIG_Config::temp/trace.log");
74 :     # Create the sprout loader object.
75 :     my $fig = FIG->new();
76 :     my $sprout = SFXlate->new_sprout_only();
77 :     my $spl = SproutLoad->new($sprout, $fig, $options->{geneFile},
78 :     $options->{subsysFile});
79 :     # Process the parameters.
80 :     for my $group (@parameters) {
81 :     Trace("Processing load group $group.") if T(2);
82 :     my $stats;
83 :     if ($group eq 'Genome') {
84 :     $spl->LoadGenomeData();
85 :     } elsif ($group eq 'Feature') {
86 :     $spl->LoadFeatureData();
87 :     } elsif ($group eq 'Coupling') {
88 :     $spl->LoadCouplingData();
89 :     } elsif ($group eq 'Subsystem') {
90 :     $spl->LoadSubsystemData();
91 :     } elsif ($group eq 'Property') {
92 :     $spl->LoadPropertyData();
93 :     } else {
94 :     Confess("Invalid group name $group.");
95 :     }
96 :     }
97 :     Trace("Load complete.") if T(2);
98 :    
99 :     1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3