view add_sample_name_as_first_line.xml @ 3:98f9da980bf5 draft default tip

planemo upload for repository https://github.com/jowong4/add_sample_name_as_first_line_of_file commit f3fe76f6cbf17b0ec4162065206483652a6519b7-dirty
author jowong
date Fri, 09 Nov 2018 12:27:57 -0500
parents 74a9f37e2bc9
children
line wrap: on
line source

<tool id="my_addName" name="Add sample name as first line" version="0.1.2">
  <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 [(_1|_2)]*.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>