diff add_sample_name_as_first_line.xml @ 0:231b21337c43 draft

planemo upload for repository https://github.com/jowong4/add_sample_name_as_first_line_of_file commit 462cf96a681fad46e20321feec5996d1e558a0d3
author jowong
date Thu, 27 Sep 2018 17:05:18 -0400
parents
children 74a9f37e2bc9
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/add_sample_name_as_first_line.xml	Thu Sep 27 17:05:18 2018 -0400
@@ -0,0 +1,33 @@
+<tool id="my_addName" name="Add sample name as first line" version="0.1.0">
+  <description>to an existing tabular file</description>
+  <command interpreter="python">add_sample_name_as_first_line.py 
+    --input "$input" 
+    --sample "$input2.element_identifier" 
+    --output "$output"
+  </command>
+  <inputs>
+  <param format="tabular" name="input" type="data" label="to Dataset"  />
+  <param name="input2" format="data" type="data" label="sample"  />
+  </inputs>
+  <outputs>
+    <data name="output" format="tabular" />
+  </outputs>
+
+  <tests>
+    <test>
+      <param name="input" value="test.tab" ftype="tabular" />
+      <param name="input2" value="ABC_1.fastq.gz" />
+      <output name="output" file="test_with_header.tab" ftype="tabular"/>
+    </test>
+  </tests>
+  <help>
+**What it does**
+
+Adds a new line with the name of the sample file and removing [_12].fastq.gz from the name if there is match to the pattern.
+Written by Johnathan Kwan Long Wong, johnathanwong4@gmail.com
+  </help>
+  <citations>
+    <citation type="bibtex">@UNPUBLISHED{Johnathan2018,
+      author = "Johnathan W"}</citation>
+  </citations>
+</tool>