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

Annotation of /Sprout/SaplingTest.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (view) (download) (as text)

1 : parrello 1.1 #!/usr/bin/perl -w
2 :    
3 : parrello 1.2 use strict;
4 : parrello 1.1 use DBKernel;
5 : parrello 1.2 use SeedUtils;
6 :     use Sapling;
7 :     use SaplingGenomeLoader;
8 :     use SaplingTaxonomyLoader;
9 :     use SaplingSubsystemLoader;
10 : parrello 1.1
11 : parrello 1.2 my %options;
12 :     if ($ENV{DB} eq 'mysql') {
13 :     %options = (dbName => 'sapling_test', dbms => 'mysql',
14 :     dbhost => 'localhost', port => 3306);
15 :     } else {
16 :     %options = (dbName => 'pg_sapling', dbms => 'Pg',
17 :     userData => 'seed/seed', dbhost => 'localhost', port => 5432);
18 :     }
19 :     my $sap = Sapling->new(%options, DBD => 'C:/Users/Bruce/FIG/FIG/WinBuild/SaplingDBD.xml');
20 :     $sap->CreateTables();
21 :     my $stats = SaplingGenomeLoader::Load($sap, 360108.3, 'C:/Users/Bruce/FIG/WebData/360108.3');
22 :     print "Genome load:\n" . $stats->Show();
23 :     $stats = SaplingSubsystemLoader::Process($sap, 'Benzoate degradation', 'C:/Users/Bruce/FIG/WebData/Subsystems/Benzoate_degradation');
24 :     print "Subsystem load:\n" . $stats->Show();
25 :     my $count1 = $sap->GetCount("Role", "Role(id) LIKE ?", ["Photosystem%"]);
26 :     print "Photosystem count = $count1\n";
27 :     $count1 = $sap->UpdateField("Feature(feature-type)", "rna", "rrna");
28 :     print "RNAs updated: $count1\n";
29 :     $sap->UpdateEntity(Feature => "fig|360108.3.rna.23", locked => 1, function => "phony function");
30 :     print "fig|360108.3.rna.23 modified.\n";
31 :     $sap->Disconnect("IsIdentifiedBy", "Identifier", "cds.1");
32 :     print "cds.1 disconnected.\n";
33 :     $sap->DeleteRow("IsIdentifiedBy", "fig|360108.3.peg.1", "ZP_01070606.1");
34 :     print "peg 1 disconnected from ZP identifier.\n";
35 :     $count1 = $sap->DeleteLike("IsIdentifiedBy", "IsIdentifiedBy(conf) = ?", ['A']);
36 :     print "$count1 high-confidence identifiers deleted.\n";
37 :     $count1 = $sap->DeleteValue("Role", "Photosystem II protein PsbI",
38 :     "role-index", 7994);
39 :     print "$count1 role-index rows deleted.\n";
40 :     print "All done.\n";

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3