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

Annotation of /Sprout/RoleChangeCheck.pl

Parent Directory Parent Directory | Revision Log Revision Log


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

1 : parrello 1.1 ### Test program for Ross's project.
2 :    
3 :     use strict;
4 :     use SeedEnv;
5 :     use Tracer;
6 :     use Sapling;
7 :    
8 :     my $sapObject;
9 :     if ($ENV{SAS_SERVER} eq 'localhost') {
10 :     my $sap = Sapling->new(dbName => 'pubseed_sapling_07', dbhost => 'localhost', port => 3399);
11 :     # my $sap = Sapling->new(dbName => 'pseed_sapling_07', dbhost => 'localhost', port => 3333);
12 :     $sapObject = SAPserver->new(sapDB => $sap, url => 'localhost');
13 :     } else {
14 :     $sapObject = SAPserver->new();
15 :     }
16 :     my $inFile = "c:/Users/Bruce/FIG/FIG/WinBuild/rolechanges.txt";
17 :     my $ih = Open(undef, "<$inFile");
18 :     while (! eof $ih) {
19 :     my ($name, $syntactic, $oldRole, $newRole) = Tracer::GetLine($ih);
20 :     my $roleHash = $sapObject->occ_of_role(-roles => [$oldRole, $newRole]);
21 :     print "Old role $oldRole: " . scalar(@{$roleHash->{$oldRole}}) . "\n";
22 :     print "New role $newRole: " . scalar(@{$roleHash->{$newRole}}) . "\n";
23 :     }
24 :     print "All done.\n";
25 :    
26 :     1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3