Hello!

To see the file structure, click on "tree".

Note that updates take place every 10 minutes, commits may not be seen immediately.
paw_...: backed out the max file size option
authorpreecej <preecej@localhost>
Wed, 7 Sep 2011 23:01:12 +0000 (23:01 +0000)
committerpreecej <preecej@localhost>
Wed, 7 Sep 2011 23:01:12 +0000 (23:01 +0000)
Local...: added GO web service autocomplete reference

svn path=/; revision=179

preecej/semantic_wiki/local_settings/test.LocalSettings.php
preecej/semantic_wiki/paw_TransformForImport.pl

index df51983afa228bec15d5f74a971f2862fe5ea8e2..5bf519dd349db9963ce3c91f75c45f4a0d6b8462 100644 (file)
@@ -142,7 +142,14 @@ require_once( "$IP/extensions/semantic-bundle/SemanticBundle.php" );
 
 #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)
index ef70b33ca90838c5a941bd7ef4cf07c631435368..4f61cd0a7b7cbac5c80b34bfee4f9f7033c3012b 100644 (file)
@@ -31,8 +31,13 @@ paw_TransformForImport.pl -i INPUT_FILE -t TYPE -o OUTPUT_FILE -v -d
         (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
 
@@ -88,6 +93,9 @@ Justin Preece
 
 =cut
 
+# TODO: file size check and clip
+# TODO: file numbering
+
 # ---------------------------------------------------------------------------
 # modules
 # ---------------------------------------------------------------------------
@@ -103,6 +111,7 @@ use Data::Dumper;
 use XML::Smart;
 use XML::Writer;
 use IO::File;
+use Encode; 
 
 # ---------------------------------------------------------------------------
 # declarations
@@ -136,8 +145,8 @@ my %annotations; # keyed on Gene Symbol
 
 # 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;
@@ -153,7 +162,7 @@ $Data::Dumper::Pad = "... ";
 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};
@@ -174,6 +183,17 @@ sub init
                     $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; }
@@ -199,7 +219,10 @@ sub init
         . "\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"
@@ -952,7 +975,7 @@ sub transform_gaf
     $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;