[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.1, Mon Aug 14 04:58:30 2006 UTC revision 1.5, Wed Feb 21 13:16:59 2007 UTC
# Line 53  Line 53 
53  use FIG;  use FIG;
54  use Sprout;  use Sprout;
55  use SFXlate;  use SFXlate;
56    use FIGRules;
57    
58  # Get the command-line options and parameters.  # Get the command-line options and parameters.
59  my ($options, @parameters) = StandardSetup([qw(Sprout) ],  my ($options, @parameters) = StandardSetup([qw(Sprout) ],
60                                             {                                             {
61                                                  fig => [0, "check the SEED database as well as the Sprout"],
62                                                phone => ["", "phone number (international format) to call when load finishes"],                                                phone => ["", "phone number (international format) to call when load finishes"],
63                                             },                                             },
64                                             "",                                             "",
# Line 67  Line 69 
69  eval {  eval {
70      # Get a sprout object.      # Get a sprout object.
71      my $sprout = SFXlate->new_sprout_only();      my $sprout = SFXlate->new_sprout_only();
72        # Get the FIG object's DB handle.
73        my $fig = FIG->new();
74      # Get the list of genomes.      # Get the list of genomes.
75      my @genomes = $sprout->Genomes();      my @genomes = $sprout->Genomes();
76      # Get the genome names.      # Get the genome names.
# Line 81  Line 85 
85      for my $name (sort keys %genomeNames) {      for my $name (sort keys %genomeNames) {
86          my $genome = $genomeNames{$name};          my $genome = $genomeNames{$name};
87          # Count this genome's BBHs.          # Count this genome's BBHs.
88          my $count = $sprout->GetCount(['IsBidirectionalBestHitOf', 'HasFeature', 'Genome'],          my $count = FIGRules::BatchBBHs("fig|$genome.%", 1e-10);
                                       "HasFeature(from-link) = ?", [$genome]);  
89          # Get the genome name.          # Get the genome name.
90          my $name = $sprout->GenusSpecies($genome) . " [$genome]";          my $name = $sprout->GenusSpecies($genome) . " [$genome]";
91          # A count of 0 is bad.          # A count of 0 is bad.
92          if ($count) {          if (! $count) {
             Trace("$name BBH count is $count.") if T(3);  
         } else {  
93              Trace("$name has no BBHs. ***") if T(1);              Trace("$name has no BBHs. ***") if T(1);
94              $badGenomes++;              $badGenomes++;
95            } else {
96                Trace("$name BBH count is $count.") if T(3);
97          }          }
98      }      }
99      # Tell the user how bad things are.      # Tell the user how bad things are.

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3