diff macros.xml @ 0:e4f44f327cf1 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/transit/ commit f63413d629e4de3c69984b3a96ad8ccfe0d47ada"
author iuc
date Tue, 08 Oct 2019 08:24:46 -0400
parents
children c68753eedf72
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml	Tue Oct 08 08:24:46 2019 -0400
@@ -0,0 +1,82 @@
+<?xml version="1.0"?>
+<macros>
+	<xml name="citations">
+		<citations>
+			<citation type="doi">10.1371/journal.pcbi.1004401</citation>
+			<yield />
+		</citations>
+	</xml>
+	<xml name="requirements">
+		<requirements>
+			<requirement type="package" version="@VERSION@">transit</requirement>
+            <requirement type="package" version="3.7">python</requirement>
+			<yield />
+		</requirements>
+	</xml>
+	<token name="@VERSION@">3.0.1</token>
+	<xml name="outputs">
+        <yield />
+        <data name="sites" from_work_dir="transit_out.txt" format="tabular" label="${tool.name} on ${on_string} Sites" />
+    </xml>
+    <xml name="replicates">
+        <param name="replicates" type="select" label="How to handle replicates">
+        	<option value="Mean">Mean</option>
+        	<option value="Sum">Sum</option>
+        </param>
+    </xml>
+    <xml name="inputs">
+        <conditional name="mode">
+            <param name="replicates" type="select" label="Operation mode" help="If set to 'Batch', transit will run and produce one output for each input file. If set to 'Replicates', transit will run once on all the input files.">
+                <option value="Batch">Batch</option>
+                <option value="Replicates">Replicates</option>
+            </param>
+            <when value="Batch">
+                <param name="inputs" type="data" format="wig,tabular" multiple="false" label="Input .wig files" />
+            </when>
+            <when value="Replicates">
+                <param name="inputs" type="data" format="wig,tabular" multiple="true" label="Input .wig files" />
+            </when>
+        </conditional>
+        <yield />
+        <param name="annotation" type="data" format="gff3,tabular" label="Input annotation" />
+    </xml>
+    <xml name="ignore_tas">
+        <param name="nterm" argument="-iN" type="float" value="0" min="0" max="1" label="Ignore TAs occuring at given fraction of the N terminus." />
+        <param name="cterm" argument="-iC" type="float" value="0" min="0" max="1" label="Ignore TAs occuring at given fraction of the C terminus." />
+    </xml>
+    <xml name="normal">
+        <param name="normalization" argument="-n" type="select" label="Normalization method"  value="TTR">
+            <option value="TTR">TTR</option>
+            <option value="nonorm">No Normalization</option>
+            <option value="nzmean">Non-Zero Mean</option>
+            <option value="totreads">Total read counts</option>
+            <option value="zinfnb">Zero inflated Negative Binomial model</option>
+            <option value="quantile">Quantile Normalization</option>
+            <option value="betageom">Beta-Geometric Correction</option>
+        </param>
+    </xml>
+    <xml name="standard_inputs">
+    	<expand macro="inputs" />
+    	<yield />
+    	<expand macro="ignore_tas" />
+    	<expand macro="normal" />
+    </xml>
+    <token name="@LINK_INPUTS@">
+        <![CDATA[
+            #if str($mode.replicates) == 'Batch':
+                #set $input_files = $mode.inputs
+            #else:
+                #set $input_files = ','.join(['input_file_%d.wig' % idx for idx, _ in enumerate(str($mode.inputs).split(','))])
+                #for idx, filename in enumerate(str($mode.inputs).split(',')):
+                    ln -s '$filename' input_file_${idx}.wig &&
+                #end for
+            #end if
+            ln -s '$annotation' annotation.dat &&
+        ]]>
+    </token>
+    <token name="@STANDARD_OPTIONS@">
+        -iN $nterm
+        -tC $cterm
+        -n $normalization
+    </token>
+</macros>