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

Diff of /Sprout/SapServerTest4.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7, Fri Nov 2 20:28:52 2012 UTC revision 1.8, Tue May 20 18:15:09 2014 UTC
# Line 4  Line 4 
4  use SeedEnv;  use SeedEnv;
5  use Tracer;  use Tracer;
6  use Sapling;  use Sapling;
7  use ALITREserver;  use ScriptThing;
8    use Data::Dumper;
9    
10      my ($sap, $sapObject, $altObject);      my ($sap, $sapObject, $altObject);
11      if ($ENV{SAS_SERVER} eq 'localhost') {      if ($ENV{SAS_SERVER} eq 'localhost') {
12          $sap = Sapling->new(dbName => 'pubseed_sapling_10', dbhost => 'localhost', port => 3399);          $sap = Sapling->new(dbName => 'pubseed_sapling_14', dbhost => 'localhost', port => 3333);
13  #        $sap = Sapling->new(dbName => 'pseed_sapling_07', dbhost => 'localhost', port => 3333);  #        $sap = Sapling->new(dbName => 'pseed_sapling_07', dbhost => 'localhost', port => 3333);
14          $sapObject = SAPserver->new(sapDB => $sap, url => 'localhost');          $sapObject = SAPserver->new(sapDB => $sap, url => 'localhost');
         $altObject = ALITREserver->new(sapDB => $sap, url => 'localhost');  
15          $FIG_Config::orgCache = "P:/vol/public-pseed/SharedData/OrgCache";          $FIG_Config::orgCache = "P:/vol/public-pseed/SharedData/OrgCache";
16          $FIG_Config::attrHost = "localhost";          $FIG_Config::attrHost = "localhost";
17          $FIG_Config::attrPort = 3333;          $FIG_Config::attrPort = 3333;
18      } else {      } else {
19          $sapObject = SAPserver->new();          $sapObject = SAPserver->new();
 #        $altObject = ALITREserver->new();  
20      }      }
21  #  #
 my @ids = qw( cfe6d12b8a842868ee25e4b775456cda  
               03382fd0dbe13a282d4b7b01be7f9d9c  
               616c2e7e50820a5862be6a2364206975  
             );  
22    
23  my $result;  my $result;
24    
25  $result = $sapObject->select( { -path   =>   'ProteinSequence',  my @tuples = (['fig|83333.1.peg.10']);
26                             -filter => { 'ProteinSequence(id)' => \@ids },  my %comments = ScriptThing::CommentHash(\@tuples);
27                             -fields => [ qw(id sequence) ],  $result = $sapObject->upstream( { -ids => $tuples[0],
28                               -size => 200, -fasta => 1,
29                               -comments => \%comments,
30                               -skipGene => ''
31                           }                           }
32                         );                         );
33    
34  print Dumper( \@ids, $result );  print Dumper( $result );
   
 @ids = reverse @ids;  
 $result = $sapObject->select( { -path   =>   'ProteinSequence',  
                            -filter => { 'ProteinSequence(id)' => \@ids },  
                            -fields => [ qw(id sequence) ],  
                          }  
                        );  
35    
 print Dumper( \@ids, $result );  
 1;  

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3