[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.2, Sat Oct 1 10:35:02 2011 UTC revision 1.3, Mon Mar 4 19:04:31 2013 UTC
# Line 2  Line 2 
2    
3  use strict;  use strict;
4  use DBKernel;  use DBKernel;
5  use SeedUtils;  use ERDB;
6  use Sapling;  
7  use SaplingGenomeLoader;  my $dbh = DBKernel->new("Pg", "kbase_sapling", "postgres", "foracle69X");
8  use SaplingTaxonomyLoader;  my $erdb = ERDB->new($dbh, 'c:\Users\Bruce\FIG\FIG\KBaseCDMI\KSaplingDBD.xml');
9  use SaplingSubsystemLoader;  $erdb->CreateTables();
10    
     my %options;  
     if ($ENV{DB} eq 'mysql') {  
         %options = (dbName => 'sapling_test', dbms => 'mysql',  
             dbhost => 'localhost', port => 3306);  
     } else {  
         %options = (dbName => 'pg_sapling', dbms => 'Pg',  
         userData => 'seed/seed', dbhost => 'localhost', port => 5432);  
     }  
     my $sap = Sapling->new(%options, DBD => 'C:/Users/Bruce/FIG/FIG/WinBuild/SaplingDBD.xml');  
     $sap->CreateTables();  
     my $stats = SaplingGenomeLoader::Load($sap, 360108.3, 'C:/Users/Bruce/FIG/WebData/360108.3');  
     print "Genome load:\n" . $stats->Show();  
     $stats = SaplingSubsystemLoader::Process($sap, 'Benzoate degradation', 'C:/Users/Bruce/FIG/WebData/Subsystems/Benzoate_degradation');  
     print "Subsystem load:\n" . $stats->Show();  
     my $count1 = $sap->GetCount("Role", "Role(id) LIKE ?", ["Photosystem%"]);  
     print "Photosystem count = $count1\n";  
     $count1 = $sap->UpdateField("Feature(feature-type)", "rna", "rrna");  
     print "RNAs updated: $count1\n";  
     $sap->UpdateEntity(Feature => "fig|360108.3.rna.23", locked => 1, function => "phony function");  
     print "fig|360108.3.rna.23 modified.\n";  
     $sap->Disconnect("IsIdentifiedBy", "Identifier", "cds.1");  
     print "cds.1 disconnected.\n";  
     $sap->DeleteRow("IsIdentifiedBy", "fig|360108.3.peg.1", "ZP_01070606.1");  
     print "peg 1 disconnected from ZP identifier.\n";  
     $count1 = $sap->DeleteLike("IsIdentifiedBy", "IsIdentifiedBy(conf) = ?", ['A']);  
     print "$count1 high-confidence identifiers deleted.\n";  
     $count1 = $sap->DeleteValue("Role", "Photosystem II protein PsbI",  
         "role-index", 7994);  
     print "$count1 role-index rows deleted.\n";  
     print "All done.\n";  

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3