[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.1, Wed Sep 21 21:05:15 2011 UTC revision 1.2, Sat Oct 1 10:35:02 2011 UTC
# Line 1  Line 1 
1  #!/usr/bin/perl -w  #!/usr/bin/perl -w
2    
3    use strict;
4  use DBKernel;  use DBKernel;
5    use SeedUtils;
6    use Sapling;
7    use SaplingGenomeLoader;
8    use SaplingTaxonomyLoader;
9    use SaplingSubsystemLoader;
10    
 my $dbh = DBKernel->new('mysql', 'pubseed_sapling_06', 'seed', '', 3399);  
   
 print $dbh->quote;  
11        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";

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3