diff macros.xml @ 0:cbc24be56f7b draft

planemo upload for repository https://github.com/ASaiM/galaxytools/tree/master/tools/enasearch/ commit 6eda25f5cccc0cf9be09c38a8b48d37aff56ed87
author iuc
date Tue, 29 Aug 2017 04:13:09 -0400
parents
children 0719cfc3ebcb
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Tue Aug 29 04:13:09 2017 -0400
@@ -0,0 +1,96 @@
+<?xml version="1.0" ?>
+<macros>
+    <token name="@WRAPPER_VERSION@">0.1.1</token>
+    <xml name="version">
+        <version_command>@WRAPPER_VERSION@</version_command>
+    </xml>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@WRAPPER_VERSION@">enasearch</requirement>
+            <yield/>
+        </requirements>
+    </xml>
+    <xml name="citations"/>
+    <token name="@IDS@">
+<![CDATA[
+    #for $id in str($ids).split(',')
+        --ids '$id'
+    #end for
+]]>
+    </token>
+    <xml name="display_opt">
+        <conditional name="display_opt">
+            <param argument="--display" type="select" label="Display option to specify the display format">
+                <expand macro="display_options"/>
+            </param>
+            <expand macro="when_display_options"/>
+        </conditional>
+    </xml>
+    <token name="@DISPLAY@">
+<![CDATA[
+    --display '$display_opt.display'
+    #if $display_opt.display == 'fasta' or $display_opt.display == 'fastq'
+        #if str($display_opt.range_start) != '' and str($display_opt.range_stop) != ''
+            --subseq_range '$display_opt.range_start'-'$display_opt.range_stop'
+        #end if
+    #else
+        #if str($display_opt.offset) != ''
+            --offset '$display_opt.offset'
+        #end if
+        #if str($display_opt.length) != ''
+            --length '$display_opt.length'
+        #end if
+    #end if
+]]>
+    </token>
+    <xml name="expanded">
+        <param argument="--expanded" type="boolean" truevalue="--expanded" falsevalue="" label="Expand a CON record?"/>
+    </xml>
+    <xml name="header">
+        <param argument="--header" type="boolean" truevalue="--header" falsevalue="" label="Obtain only the header of a record?"/>
+    </xml>
+    <xml name="accession">
+        <param argument="--accession" type="text" label="Accession id" help="Study accessions (ERP, SRP, DRP, PRJ prefixes), experiment accessions (ERX, SRX, DRX prefixes), sample accessions (ERS, SRS, DRS, SAM prefixes) and run accessions"/>
+    </xml>
+    <token name="@FIELDS@">
+<![CDATA[
+    #if $fields
+        #for $f in str($fields).split(',')
+            --fields '$f'
+        #end for
+    #end if
+]]>
+    </token>
+    <xml name="change_format">
+        <change_format>
+            <when input="display_opt.display" value="fasta" format="fasta" />
+            <when input="display_opt.display" value="fastq" format="fastq" />
+            <when input="display_opt.display" value="html" format="html" />
+            <when input="display_opt.display" value="text" format="text" />
+            <when input="display_opt.display" value="xml" format="xml" />
+        </change_format>
+    </xml>
+    <token name="@SEARCH_DATA_DISPLAY@">
+<![CDATA[
+    --display '$query_type.res.display_opt.display'
+    #if $query_type.res.display_opt.display != 'fasta' and $query_type.res.display_opt.display != 'fastq'
+        #if str($query_type.res.display_opt.offset) != ''
+            --offset '$query_type.res.display_opt.offset'
+        #end if
+        #if str($query_type.res.display_opt.length) != ''
+            --length '$query_type.res.display_opt.length'
+        #end if
+        #if $query_type.res.display_opt.display == 'report'
+            #for $f in str($query_type.res.display_opt.fields).split(',')
+                --fields '$f'
+            #end for
+            #if $query_type.res.display_opt.sortfields
+                #for $f in str($query_type.res.display_opt.sortfields).split(',')
+                    --sortfields '$f'
+                #end for
+            #end if
+        #end if
+    #end if
+]]>
+    </token>
+</macros>