diff macros.xml @ 3:d4ae83dedb14 draft

planemo upload for repository https://github.com/TAMU-CPT/galaxy-webapollo commit 4ac38d0b6dba1183f3e78eb5c224c7051064b4a5
author eric-rasche
date Thu, 12 Jan 2017 11:52:28 -0500
parents c8e16c8eff98
children 7610987e0c48
line wrap: on
line diff
--- a/macros.xml	Tue May 03 13:48:11 2016 -0400
+++ b/macros.xml	Thu Jan 12 11:52:28 2017 -0500
@@ -3,48 +3,94 @@
   <xml name="requirements">
     <requirements>
       <requirement type="package" version="2.7">python</requirement>
+      <requirement type="package" version="1.65">biopython</requirement>
+      <requirement type="package" version="0.6.2">bcbiogff</requirement>
       <yield/>
     </requirements>
   </xml>
+  <token name="@DATA_DIR@">\$GALAXY_SHARED_DIR</token>
+  <token name="@EXT_URL@">
+\$GALAXY_WEBAPOLLO_EXT_URL
+  </token>
   <token name="@URL@">
 \$GALAXY_WEBAPOLLO_URL
   </token>
-  <token name="@AUTH@">
-@URL@
-galaxy@gmod.org
+  <token name="@USER_AUTH_REMOTE@">
+\$GALAXY_WEBAPOLLO_URL
+$__user_email__
+""
+--remote_user REMOTE_USER
+  </token>
+  <token name="@ADMIN_AUTH@">
+\$GALAXY_WEBAPOLLO_URL
+\$GALAXY_WEBAPOLLO_USER
 \$GALAXY_WEBAPOLLO_PASSWORD
   </token>
-  <xml name="auth_file">
-    <param label="Apollo Authentication File"
-    name="apolloCredentialsFile" type="data" format="json" />
-  </xml>
 
-  <token name="@CN_OR_GUESS@">
+  <token name="@ORG_OR_GUESS@">
 <![CDATA[
-#if $cn_source.source_select == "auto":
-    \$(cat $cn_source.cn_file | grep '^>' | head -n 1  | sed 's/\s.*//g;s/>//g')
-#elif $cn_source.source_select == "auto_json":
-    \$(cat $cn_source.cn_file | grep 'commonName' | head -n 1| sed 's/.*: "//g;s/".*//g')
-#else
-    "${cn_source.organism_cn}"
+#if $org_source.source_select == "auto_json":
+    --org_json "${org_source.org_file}"
+#elif $org_source.source_select == "select":
+    --org_id "${org_source.org_select}"
+#else:
+    --org_raw "${org_source.org_raw}"
 #end if
 ]]>
   </token>
-  <xml name="cn_or_guess">
-    <conditional name="cn_source">
+  <token name="@ORG_CN_OR_GUESS@">
+<![CDATA[
+@ORG_OR_GUESS@
+
+#if $cn_source.source_select == "auto":
+    #if str($cn_source.cn_file) != "None":
+        --seq_fasta $cn_source.cn_file
+    #end if
+#else
+    #if $cn_source.source_select != "all" and len($cn_source.refseqs) > 0:
+        --seq_raw
+        #for $item in $cn_source.refseqs:
+            "${item.refseq}"
+        #end for
+    #end if
+#end if
+]]>
+  </token>
+  <xml name="org_or_guess">
+    <conditional name="org_source">
         <param name="source_select" type="select" label="Organism Common Name Source">
-            <option value="auto">Autodetect from Fasta</option>
+            <option value="select">Select</option>
+            <option value="direct">Direct Entry</option>
             <option value="auto_json">Autodetect from Apollo JSON</option>
-            <option value="direct">Direct Entry</option>
         </param>
-        <when value="auto">
-            <param name="cn_file" type="data" format="fasta" label="Organism Common Name" />
+        <when value="select">
+            <param name="org_select" type="select" dynamic_options="galaxy_list_orgs(__trans__)" label="Organism" />
+        </when>
+        <when value="direct">
+            <param name="org_raw" type="text" label="Organism Common Name" />
         </when>
         <when value="auto_json">
-            <param name="cn_file" type="data" format="json" label="Apollo Organism File" />
+            <param name="org_file" type="data" format="json" label="Apollo Organism File" help="Will only fetch first organism" />
+        </when>
+    </conditional>
+  </xml>
+  <xml name="cn_or_guess">
+    <expand macro="org_or_guess" />
+    <conditional name="cn_source">
+        <param name="source_select" type="select" label="Organism Sequence(s) Source">
+            <option value="all">All Refseqs</option>
+            <option value="direct">Direct Entry</option>
+            <option value="auto">Autodetect from Fasta</option>
+        </param>
+        <when value="all">
+        </when>
+        <when value="auto">
+            <param name="cn_file" type="data" format="fasta" label="Reference sequence(s)" optional="true"/>
         </when>
         <when value="direct">
-            <param name="organism_cn" type="text" label="Organism Common Name" />
+            <repeat name="refseqs" title="Reference Sequences" help="These are used to identify sequences within an organism that you wish to extract">
+                <param name="refseq" type="text" label="Reference sequence(s)" />
+            </repeat>
         </when>
     </conditional>
   </xml>
@@ -53,21 +99,6 @@
       <citations>
       </citations>
   </xml>
-  <xml name="dummy">
-    <param label="Dummy Inputs" name="dummy" type="data" multiple="True" optional="True">
-        <help>
-            With workflows that contact remote databases, it is sometimes
-            necessary to have particular operations happen in a particular
-            order. I.e. you would not want to try and add data to an organism
-            if the organism did not yet exist in WebApollo.
-            Since few of the WebApollo2 toolsuite output files which are
-            used in a downstream task (e.g. the output adding an organism is
-            not used elsewhere), we provide this dummy option which lets you
-            select outputs to help provide context for when this task should
-            execute.
-        </help>
-    </param>
-  </xml>
   <xml name="gff3_input">
     <param label="GFF3 Annotations" name="gff3_data" type="data" format="gff3"/>
   </xml>