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

View of /Sprout/SapServerTest4.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (download) (as text) (annotate)
Fri Nov 2 20:28:52 2012 UTC (6 years, 11 months ago) by parrello
Branch: MAIN
Changes since 1.6: +25 -6 lines
Delete fixes.

### Test program for Ross's project.

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

    my ($sap, $sapObject, $altObject);
    if ($ENV{SAS_SERVER} eq 'localhost') {
        $sap = Sapling->new(dbName => 'pubseed_sapling_10', dbhost => 'localhost', port => 3399);
#        $sap = Sapling->new(dbName => 'pseed_sapling_07', dbhost => 'localhost', port => 3333);
        $sapObject = SAPserver->new(sapDB => $sap, url => 'localhost');
        $altObject = ALITREserver->new(sapDB => $sap, url => 'localhost');
        $FIG_Config::orgCache = "P:/vol/public-pseed/SharedData/OrgCache";
        $FIG_Config::attrHost = "localhost";
        $FIG_Config::attrPort = 3333;
    } else {
        $sapObject = SAPserver->new();
#        $altObject = ALITREserver->new();
    }
#
my @ids = qw( cfe6d12b8a842868ee25e4b775456cda
              03382fd0dbe13a282d4b7b01be7f9d9c
              616c2e7e50820a5862be6a2364206975
            );

my $result;

$result = $sapObject->select( { -path   =>   'ProteinSequence',
                           -filter => { 'ProteinSequence(id)' => \@ids },
                           -fields => [ qw(id sequence) ],
                         }
                       );

print Dumper( \@ids, $result );

@ids = reverse @ids;
$result = $sapObject->select( { -path   =>   'ProteinSequence',
                           -filter => { 'ProteinSequence(id)' => \@ids },
                           -fields => [ qw(id sequence) ],
                         }
                       );

print Dumper( \@ids, $result );
1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3