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

Diff of /Sprout/BBHCheck.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2, Mon Aug 14 05:25:50 2006 UTC revision 1.3, Mon Aug 14 22:15:03 2006 UTC
# Line 74  Line 74 
74      my $sprout = SFXlate->new_sprout_only();      my $sprout = SFXlate->new_sprout_only();
75      # Get the FIG object's DB handle.      # Get the FIG object's DB handle.
76      my $fig = FIG->new();      my $fig = FIG->new();
     my $fDBH = $fig->db_handle();  
77      # Get the list of genomes.      # Get the list of genomes.
78      my @genomes = $sprout->Genomes();      my @genomes = $sprout->Genomes();
79      # Get the genome names.      # Get the genome names.
# Line 99  Line 98 
98          } else {          } else {
99              if ($options->{fig}) {              if ($options->{fig}) {
100                  # Check to see if the SEED is bad, too.                  # Check to see if the SEED is bad, too.
101                  my $response = $fDBH->SQL("SELECT * FROM bbh WHERE peg1 LIKE ? LIMIT 10", "", ["fig|$genome.peg%"]);                  my @fids = $fig->all_features($genome);
102                  if (@$response == 0) {                  my $seedCount = 0;
103                    for my $fid (@fids) {
104                        my $bbc = scalar ($fig->bbhs($fid));
105                        $seedCount += $bbc;
106                    }
107                    if ($seedCount == 0) {
108                      # Here there are no BBHs anywhere.                      # Here there are no BBHs anywhere.
109                      Trace("$name has no BBHs in SEED or Sprout. ***") if T(1);                      Trace("$name has no BBHs in SEED or Sprout. ***") if T(1);
110                  } else {                  } else {
111                      # Here we can fix the problem by reloading the Sprout.                      # Here we can fix the problem by reloading the Sprout.
112                      Trace("$name has no BBHs in Sprout but is okay in SEED.") if T(1);                      Trace("$name has no BBHs in Sprout but $seedCount in SEED.") if T(1);
113                  }                  }
114              } else {              } else {
115                      # Here we don't care about the SEED.                      # Here we don't care about the SEED.

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3