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

Annotation of /Sprout/LoadSproutTables.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (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 : parrello 1.2 B<IsLocatedIn>, B<FeatureLink>.
23 : parrello 1.1
24 :     =item Subsystem
25 :    
26 : parrello 1.2 Loads B<Subsystem>, B<Role>, B<SSCell>, B<ContainsFeature>, B<IsGenomeOf>,
27 : parrello 1.1 B<IsRoleOf>, B<OccursInSubsystem>, B<ParticipatesIn>, B<HasSSCell>.
28 :    
29 : parrello 1.2 =item Annotation
30 :    
31 :     Loads B<SproutUser>, B<UserAccess>, B<Annotation>, B<IsTargetOfAnnotation>,
32 :     B<MadeAnnotation>.
33 :    
34 :     =item Diagram
35 :    
36 :     Loads B<Diagram>, B<RoleOccursIn>.
37 :    
38 :     =item Property
39 :    
40 :     Loads B<Property>, B<HasProperty>.
41 :    
42 :     =item BBH
43 :    
44 :     Loads B<IsBidirectionalBestHitOf>.
45 :    
46 : parrello 1.1 =back
47 :    
48 :     There are two command-line options, given below. Note that in the command line, spaces
49 :     inside parameters should be represented by C<\b>.
50 :    
51 :     =over 4
52 :    
53 :     =item geneFile
54 :    
55 :     The name of the file containing the genomes and their associated access codes. The
56 :     file should have one line per genome, each line consisting of the genome ID followed
57 :     by the access code, separated by a tab. If no file is specified, all complete genomes
58 :     will be processed and the access code will be 1.
59 :    
60 :     =item subsysFile
61 :    
62 :     The name of the file containing the trusted subsystems. The file should have one line
63 :     per trusted subsystem. If no file is specified, all subsystems will be trusted.
64 :    
65 :     =item trace
66 :    
67 :     Desired tracing level. The default is 3.
68 :    
69 :     =back
70 :    
71 :     =cut
72 :    
73 :     use strict;
74 :     use Tracer;
75 :     use DocUtils;
76 :     use TestUtils;
77 :     use Cwd;
78 :     use FIG;
79 :     use SFXlate;
80 :     use File::Copy;
81 :     use File::Path;
82 :     use SproutLoad;
83 :     use Stats;
84 :    
85 :     # Get the command-line parameters and options.
86 :     my ($options, @parameters) = Tracer::ParseCommand({ geneFile => "", subsysFile => "",
87 :     trace => 3 },
88 :     @ARGV);
89 :     # Set up tracing.
90 :     TSetup("$options->{trace} SproutLoad ERDBLoad ERDB Tracer Load", "+>$FIG_Config::temp/trace.log");
91 :     # Create the sprout loader object.
92 :     my $fig = FIG->new();
93 :     my $sprout = SFXlate->new_sprout_only();
94 :     my $spl = SproutLoad->new($sprout, $fig, $options->{geneFile},
95 :     $options->{subsysFile});
96 :     # Process the parameters.
97 :     for my $group (@parameters) {
98 :     Trace("Processing load group $group.") if T(2);
99 :     my $stats;
100 :     if ($group eq 'Genome') {
101 :     $spl->LoadGenomeData();
102 :     } elsif ($group eq 'Feature') {
103 :     $spl->LoadFeatureData();
104 :     } elsif ($group eq 'Coupling') {
105 :     $spl->LoadCouplingData();
106 :     } elsif ($group eq 'Subsystem') {
107 :     $spl->LoadSubsystemData();
108 :     } elsif ($group eq 'Property') {
109 :     $spl->LoadPropertyData();
110 : parrello 1.2 } elsif ($group eq 'Diagram') {
111 :     $spl->LoadDiagramData();
112 :     } elsif ($group eq 'Annotation') {
113 :     $spl->LoadAnnotationData();
114 :     } elsif ($group eq 'BBH') {
115 :     $spl->LoadBBHData();
116 : parrello 1.1 } else {
117 :     Confess("Invalid group name $group.");
118 :     }
119 :     }
120 :     Trace("Load complete.") if T(2);
121 :    
122 :     1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3