[Bio] / FigKernelScripts / svr_gene_data.pl Repository:
ViewVC logotype

Diff of /FigKernelScripts/svr_gene_data.pl

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

revision 1.2, Wed Feb 17 15:03:27 2010 UTC revision 1.3, Tue Jul 20 21:12:12 2010 UTC
# Line 81  Line 81 
81    
82  The URL for the Sapling server, if it is to be different from the default.  The URL for the Sapling server, if it is to be different from the default.
83    
84    =item c
85    
86    Column index. If specified, indicates that the input IDs should be taken from the
87    indicated column instead of the last column. The first column is column 1.
88    
89  =back  =back
90    
91  =cut  =cut
# Line 88  Line 93 
93  # Parse the command-line options.  # Parse the command-line options.
94  my $source = 'SEED';  my $source = 'SEED';
95  my $url = '';  my $url = '';
96  my $opted =  GetOptions('source=s' => \$source, 'url=s' => \$url);  my $column = '';
97    my $opted =  GetOptions('source=s' => \$source, 'url=s' => \$url, 'c=i' => \$column);
98  if (! $opted) {  if (! $opted) {
99      print "usage: svr_gene_data [--source=SEED] [--url=http://...] [evidence | fig-id | function | genome-name | length | location | publications] ... <input >output\n";      print "usage: svr_gene_data [--source=SEED] [--url=http://...] [--c=N] [evidence | fig-id | function | genome-name | length | location | publications] ... <input >output\n";
100  } else {  } else {
101      # Get the list of output field names from the remaining positional parameters.      # Get the list of output field names from the remaining positional parameters.
102      my @outputs = @ARGV;      my @outputs = @ARGV;
103      # Get the server object.      # Get the server object.
104      my $sapServer = SAPserver->new(url => $url);      my $sapServer = SAPserver->new(url => $url);
105      # The main loop processes chunks of input.      # The main loop processes chunks of input.
106      while (my @tuples = ScriptThing::GetBatch(\*STDIN)) {      while (my @tuples = ScriptThing::GetBatch(\*STDIN, undef, $column)) {
107          # Ask the server for results.          # Ask the server for results.
108          my $document = $sapServer->ids_to_data(-ids => [map { $_->[0] } @tuples],          my $document = $sapServer->ids_to_data(-ids => [map { $_->[0] } @tuples],
109                                                  -source => $source,                                                  -source => $source,

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3