[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.1, Thu Oct 29 18:29:51 2009 UTC revision 1.3, Tue Jul 20 21:12:12 2010 UTC
# Line 11  Line 11 
11    
12  =head1 svr_gene_data  =head1 svr_gene_data
13    
14        svr_gene_data fld1 fld2 ... fldN <gene_ids.tbl >gene_data.tbl
15    
16  Get one or more pieces of data about each specified gene.  Get one or more pieces of data about each specified gene.
17    
18  This script takes as input a tab-delimited file with gene IDs at the end of each  This script takes as input a tab-delimited file with gene IDs at the end of each
# Line 79  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 86  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.1  
changed lines
  Added in v.1.3

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3