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

View of /Sprout/LoadSproutTables.pl

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.3 - (download) (as text) (annotate)
Fri Sep 9 14:54:44 2005 UTC (14 years, 7 months ago) by parrello
Branch: MAIN
Changes since 1.2: +36 -13 lines
Removed unnecessary reference to "TestUtils".
Added ability to load table groups and source information.

#!/usr/bin/perl -w

=head1 Load Sprout Tables

Create the load files for a group of Sprout tables. The parameters are the names of
the table groups whose data is to be created. The legal table group names are given below.

=over 4

=item Genome

Loads B<Genome>, B<HasContig>, B<Contig>, B<IsMadeUpOf>, and B<Sequence>.

=item Coupling

Loads B<Coupling>, B<IsEvidencedBy>, B<PCH>, B<ParticipatesInCoupling>,

=item Feature

Loads B<Feature>, B<FeatureAlias>, B<FeatureTranslation>, B<FeatureUpstream>,
B<IsLocatedIn>, B<FeatureLink>.

=item Subsystem

Loads B<Subsystem>, B<Role>, B<SSCell>, B<ContainsFeature>, B<IsGenomeOf>,
B<IsRoleOf>, B<OccursInSubsystem>, B<ParticipatesIn>, B<HasSSCell>.

=item Annotation

Loads B<SproutUser>, B<UserAccess>, B<Annotation>, B<IsTargetOfAnnotation>,

=item Diagram

Loads B<Diagram>, B<RoleOccursIn>.

=item Property

Loads B<Property>, B<HasProperty>.

=item BBH

Loads B<IsBidirectionalBestHitOf>.

=item Group

Loads B<GenomeGroups>.

=item Source

Loads B<Source>, B<ComesFrom>, B<SourceURL>.

=item *

Loads all of the above tables.


There are two command-line options, given below. Note that in the command line, spaces
inside parameters should be represented by C<\b>.

=over 4

=item geneFile

The name of the file containing the genomes and their associated access codes. The
file should have one line per genome, each line consisting of the genome ID followed
by the access code, separated by a tab. If no file is specified, all complete genomes
will be processed and the access code will be 1.

=item subsysFile

The name of the file containing the trusted subsystems. The file should have one line
per trusted subsystem. If no file is specified, all subsystems will be trusted.

=item trace

Desired tracing level. The default is 3.



use strict;
use Tracer;
use DocUtils;
use Cwd;
use FIG;
use SFXlate;
use File::Copy;
use File::Path;
use SproutLoad;
use Stats;

# Get the command-line parameters and options.
my ($options, @parameters) = Tracer::ParseCommand({ geneFile => "", subsysFile => "",
                                                    trace => 3 },
# Set up tracing.
TSetup("$options->{trace} SproutLoad ERDBLoad ERDB Tracer Load", "+>$FIG_Config::temp/trace.log");
# Create the sprout loader object.
my $fig = FIG->new();
my $sprout = SFXlate->new_sprout_only();
my $spl = SproutLoad->new($sprout, $fig, $options->{geneFile},
# Process the parameters.
for my $group (@parameters) {
    Trace("Processing load group $group.") if T(2);
    my $stats;
    if ($group eq 'Genome' || $group eq '*') {
    if ($group eq 'Feature' || $group eq '*') {
    if ($group eq 'Coupling' || $group eq '*') {
    if ($group eq 'Subsystem' || $group eq '*') {
    if ($group eq 'Property' || $group eq '*') {
    if ($group eq 'Diagram' || $group eq '*') {
    if ($group eq 'Annotation' || $group eq '*') {
    if ($group eq 'BBH' || $group eq '*') {
    if ($group eq 'Groups' || $group eq '*') {
    if ($group eq 'Source' || $group eq '*') {

Trace("Load complete.") if T(2);


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3