#include("$IP/extensions/SimpleForms/SimpleForms.php");
-$sfgAutocompletionURLs['remote_PO_terms'] = 'http://palea.cgrb.oregonstate.edu/paw/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=name&qval=<substr>&format=json&max=20';
+# PO web service calls
+$sfgAutocompletionURLs['remote_PO_terms'] = 'http://palea.cgrb.oregonstate.edu/paw/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=name&ontology=po&qval=<substr>&format=json&max=20';
+$sfgAutocompletionURLs['remote_PO_ids'] = 'http://palea.cgrb.oregonstate.edu/paw/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=acc&ontology=po&qval=<substr>&format=json&max=20';
+
+# GO web service calls
+$sfgAutocompletionURLs['remote_GO_terms'] = 'http://palea.cgrb.oregonstate.edu/paw/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=name&ontology=go&qval=<substr>&format=json&max=25';
+$sfgAutocompletionURLs['remote_GO_ids'] = 'http://palea.cgrb.oregonstate.edu/paw/services/TermSearch_JSON.php?user=paw&type=autocomplete&field=acc&ontology=go&qval=<substr>&format=json&max=25';
+
$sfgAutocompleteOnAllChars = false;
# END: Justin Preece - Semantic Bundle (SMW and other extensions)
(if no path supplied, assumes current working directory)
-t Specifies input type of file
(allowed values: 'csv', 'tab', 'gaf')
- -o Name of output XML file.
- (if no path supplied, assumes current working directory)
+ -o Name/template of output XML file; if no path supplied, assumes
+ current working directory. The first file will match the
+ supplied value; consequent files will be numbered in this
+ format: '-#.suffix'
+ -s Seed values (comma-delimited) for Source, Annotation, and
+ Publication IDs (in that order, e.g. '2,38,15'); Defaults to
+ '1' for all seed values
-v View verbose information
-d View debugging information
=cut
+# TODO: file size check and clip
+# TODO: file numbering
+
# ---------------------------------------------------------------------------
# modules
# ---------------------------------------------------------------------------
use XML::Smart;
use XML::Writer;
use IO::File;
+use Encode;
# ---------------------------------------------------------------------------
# declarations
# other config constants (including temporary arrangements)
-# page id seeds, until I can figure out how to auto-increment w/in the import
-# script
+# default page id seeds, until I can figure out how to auto-increment w/in the
+# an import/update script
my $SOURCE_TITLE_SEED = 1;
my $ANNOT_TITLE_SEED = 1;
my $PUB_TITLE_SEED = 1;
sub init
{
# read and set options
- getopts('i:t:o:vd', \%opts);
+ getopts('i:t:o:s:vd', \%opts);
foreach my $key (keys %opts) {
my $value = $opts{$key};
$output_file = getcwd() . "\/$value";
}
}
+ case "s" {
+ my @seeds = split(',',$value);
+ if (scalar @seeds == 3) {
+ $SOURCE_TITLE_SEED = $seeds[0];
+ $ANNOT_TITLE_SEED = $seeds[1];
+ $PUB_TITLE_SEED = $seeds[2];
+ } else {
+ die("Please supply three consecutive, comma-delimited seed"
+ . "values for the 's' option.");
+ }
+ }
case "v" { $verbose = 1; }
case "d" { $debug = 1; }
. "\n"
. "Input File: $input_file\n"
. "Designated input file type: $file_type\n"
- . "Output File: $output_file\n"
+ . "Output File (Template): $output_file\n"
+ . "Source ID Seed: $SOURCE_TITLE_SEED\n"
+ . "Annotations ID Seed: $ANNOT_TITLE_SEED\n"
+ . "Publications ID Seed: $PUB_TITLE_SEED\n"
. "Running in verbose mode? " . ($verbose ? "Yes" : "No") . "\n"
. "Running in debug mode? " . ($debug ? "Yes" : "No") . "\n"
. "\n"
$writer->endTag("Pages");
$writer->end();
- # write doc to file
+ # write out the file
open(OUTPUT_FILE,">$output_file");
print OUTPUT_FILE $output_data;
close OUTPUT_FILE;