20 |
as well as to a C<trace>I<User>C<.log> file in the FIG temporary directory, |
as well as to a C<trace>I<User>C<.log> file in the FIG temporary directory, |
21 |
where I<User> is the value of the B<user> option above. |
where I<User> is the value of the B<user> option above. |
22 |
|
|
23 |
|
=item fig |
24 |
|
|
25 |
|
Check the SEED for genomes that have no BBHs in Sprout. |
26 |
|
|
27 |
=item sql |
=item sql |
28 |
|
|
29 |
If specified, turns on tracing of SQL activity. |
If specified, turns on tracing of SQL activity. |
61 |
# Get the command-line options and parameters. |
# Get the command-line options and parameters. |
62 |
my ($options, @parameters) = StandardSetup([qw(Sprout) ], |
my ($options, @parameters) = StandardSetup([qw(Sprout) ], |
63 |
{ |
{ |
64 |
|
fig => [0, "check the SEED database as well as the Sprout"], |
65 |
phone => ["", "phone number (international format) to call when load finishes"], |
phone => ["", "phone number (international format) to call when load finishes"], |
66 |
}, |
}, |
67 |
"", |
"", |
72 |
eval { |
eval { |
73 |
# Get a sprout object. |
# Get a sprout object. |
74 |
my $sprout = SFXlate->new_sprout_only(); |
my $sprout = SFXlate->new_sprout_only(); |
75 |
|
# Get the FIG object's DB handle. |
76 |
|
my $fig = FIG->new(); |
77 |
|
my $fDBH = $fig->db_handle(); |
78 |
# Get the list of genomes. |
# Get the list of genomes. |
79 |
my @genomes = $sprout->Genomes(); |
my @genomes = $sprout->Genomes(); |
80 |
# Get the genome names. |
# Get the genome names. |
97 |
if ($count) { |
if ($count) { |
98 |
Trace("$name BBH count is $count.") if T(3); |
Trace("$name BBH count is $count.") if T(3); |
99 |
} else { |
} else { |
100 |
|
if ($options->{fig}) { |
101 |
|
# Check to see if the SEED is bad, too. |
102 |
|
my $response = $fDBH->SQL("SELECT * FROM bbh WHERE peg1 LIKE ? LIMIT 10", "", ["fig|$genome.peg%"]); |
103 |
|
if (@$response == 0) { |
104 |
|
# Here there are no BBHs anywhere. |
105 |
|
Trace("$name has no BBHs in SEED or Sprout. ***") if T(1); |
106 |
|
} else { |
107 |
|
# Here we can fix the problem by reloading the Sprout. |
108 |
|
Trace("$name has no BBHs in Sprout but is okay in SEED.") if T(1); |
109 |
|
} |
110 |
|
} else { |
111 |
|
# Here we don't care about the SEED. |
112 |
Trace("$name has no BBHs. ***") if T(1); |
Trace("$name has no BBHs. ***") if T(1); |
113 |
|
} |
114 |
$badGenomes++; |
$badGenomes++; |
115 |
} |
} |
116 |
} |
} |