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

Annotation of /Sprout/LoadSproutTables.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : parrello 1.1 #!/usr/bin/perl -w
2 :    
3 :     =head1 Load Sprout Tables
4 :    
5 : parrello 1.3 Create the load files for a group of Sprout tables. The parameters are the names of
6 :     the table groups whose data is to be created. The legal table group names are given below.
7 : parrello 1.1
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.3 =item Group
47 :    
48 :     Loads B<GenomeGroups>.
49 :    
50 :     =item Source
51 :    
52 :     Loads B<Source>, B<ComesFrom>, B<SourceURL>.
53 :    
54 :     =item *
55 :    
56 :     Loads all of the above tables.
57 :    
58 : parrello 1.1 =back
59 :    
60 :     There are two command-line options, given below. Note that in the command line, spaces
61 :     inside parameters should be represented by C<\b>.
62 :    
63 :     =over 4
64 :    
65 :     =item geneFile
66 :    
67 :     The name of the file containing the genomes and their associated access codes. The
68 :     file should have one line per genome, each line consisting of the genome ID followed
69 :     by the access code, separated by a tab. If no file is specified, all complete genomes
70 :     will be processed and the access code will be 1.
71 :    
72 :     =item subsysFile
73 :    
74 :     The name of the file containing the trusted subsystems. The file should have one line
75 :     per trusted subsystem. If no file is specified, all subsystems will be trusted.
76 :    
77 :     =item trace
78 :    
79 :     Desired tracing level. The default is 3.
80 :    
81 :     =back
82 :    
83 :     =cut
84 :    
85 :     use strict;
86 :     use Tracer;
87 :     use DocUtils;
88 :     use Cwd;
89 :     use FIG;
90 :     use SFXlate;
91 :     use File::Copy;
92 :     use File::Path;
93 :     use SproutLoad;
94 :     use Stats;
95 :    
96 :     # Get the command-line parameters and options.
97 :     my ($options, @parameters) = Tracer::ParseCommand({ geneFile => "", subsysFile => "",
98 :     trace => 3 },
99 :     @ARGV);
100 :     # Set up tracing.
101 :     TSetup("$options->{trace} SproutLoad ERDBLoad ERDB Tracer Load", "+>$FIG_Config::temp/trace.log");
102 :     # Create the sprout loader object.
103 :     my $fig = FIG->new();
104 :     my $sprout = SFXlate->new_sprout_only();
105 :     my $spl = SproutLoad->new($sprout, $fig, $options->{geneFile},
106 :     $options->{subsysFile});
107 :     # Process the parameters.
108 :     for my $group (@parameters) {
109 :     Trace("Processing load group $group.") if T(2);
110 :     my $stats;
111 : parrello 1.3 if ($group eq 'Genome' || $group eq '*') {
112 : parrello 1.1 $spl->LoadGenomeData();
113 : parrello 1.3 }
114 :     if ($group eq 'Feature' || $group eq '*') {
115 : parrello 1.1 $spl->LoadFeatureData();
116 : parrello 1.3 }
117 :     if ($group eq 'Coupling' || $group eq '*') {
118 : parrello 1.1 $spl->LoadCouplingData();
119 : parrello 1.3 }
120 :     if ($group eq 'Subsystem' || $group eq '*') {
121 : parrello 1.1 $spl->LoadSubsystemData();
122 : parrello 1.3 }
123 :     if ($group eq 'Property' || $group eq '*') {
124 : parrello 1.1 $spl->LoadPropertyData();
125 : parrello 1.3 }
126 :     if ($group eq 'Diagram' || $group eq '*') {
127 : parrello 1.2 $spl->LoadDiagramData();
128 : parrello 1.3 }
129 :     if ($group eq 'Annotation' || $group eq '*') {
130 : parrello 1.2 $spl->LoadAnnotationData();
131 : parrello 1.3 }
132 :     if ($group eq 'BBH' || $group eq '*') {
133 : parrello 1.2 $spl->LoadBBHData();
134 : parrello 1.1 }
135 : parrello 1.3 if ($group eq 'Groups' || $group eq '*') {
136 :     $spl->LoadGroupData();
137 :     }
138 :     if ($group eq 'Source' || $group eq '*') {
139 :     $spl->LoadSourceData();
140 :     }
141 :    
142 : parrello 1.1 }
143 :     Trace("Load complete.") if T(2);
144 :    
145 :     1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3