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