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

View of /Sprout/RoleChangeCheck.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (download) (as text) (annotate)
Wed Sep 21 21:05:15 2011 UTC (7 years, 7 months ago) by parrello
Branch: MAIN
CVS Tags: rast_rel_2014_0912, rast_rel_2014_0729, mgrast_release_3_1_2, rast_rel_2011_0928, mgrast_version_3_2, mgrast_dev_12152011, mgrast_dev_10262011, HEAD
Changes to support complexes.

### Test program for Ross's project.

use strict;
use SeedEnv;
use Tracer;
use Sapling;

    my $sapObject;
    if ($ENV{SAS_SERVER} eq 'localhost') {
        my $sap = Sapling->new(dbName => 'pubseed_sapling_07', dbhost => 'localhost', port => 3399);
#        my $sap = Sapling->new(dbName => 'pseed_sapling_07', dbhost => 'localhost', port => 3333);
        $sapObject = SAPserver->new(sapDB => $sap, url => 'localhost');
    } else {
        $sapObject = SAPserver->new();
    }
    my $inFile = "c:/Users/Bruce/FIG/FIG/WinBuild/rolechanges.txt";
    my $ih = Open(undef, "<$inFile");
    while (! eof $ih) {
    	my ($name, $syntactic, $oldRole, $newRole) = Tracer::GetLine($ih);
    	my $roleHash = $sapObject->occ_of_role(-roles => [$oldRole, $newRole]);
    	print "Old role $oldRole: " . scalar(@{$roleHash->{$oldRole}}) . "\n";
    	print "New role $newRole: " . scalar(@{$roleHash->{$newRole}}) . "\n";
    }
	print "All done.\n";

1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3