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

Diff of /Sprout/SaplingTest.pl

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

revision 1.4, Wed May 8 20:28:44 2013 UTC revision 1.5, Sat Jul 13 15:23:47 2013 UTC
# Line 6  Line 6 
6  use Stats;  use Stats;
7    
8    
9  my $sap = Sapling->new(loadDirectory => '/homes/parrello/saptest');  my $sap = Sapling->new();
10  TSetup("3 Delete ERDB", ">/homes/parrello/test.log");  my @tables = sort qw(Chip HasResultsIn Experiment AffectsLevelOf AtomicRegulon
11  my $stats = Stats->new();                       IsFormedOf IsConfiguredBy OperatesIn CoregulatedSet
12  Trace("Looking for genomes.") if T(2);                       IsRegulatedWith IsCoregulatedWith HasIndicatedSignalFrom
13  my @genomes = $sap->GetFlat('Genome', "Genome(complete) = 1 AND Genome(scientific-name) LIKE ?",                       Attribute HasValueFor ProducedResultsFor IndicatedLevelsFor
14          ['Streptococcus %'], 'id');                       GeneratedLevelsFor);
15  for my $genome (@genomes) {  for my $table (@tables) {
16      Trace("Processing $genome.") if T(2);      print "Cleaing $table.\n";
17      my $subStats = $sap->Delete(Genome => $genome, testMode => 'dump');      $sap->TruncateTable($table);
     $stats->Accumulate($subStats);  
18  }  }
   
 Trace("All done:\n" . $stats->Show()) if T(2);  
   

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3