/tools/filters/mergeCols.xml

https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 63 lines · 50 code · 13 blank · 0 comment · 0 complexity · 3c446f1533e5d681acb47e79c96153db MD5 · raw file

  1. <tool id="mergeCols1" name="Merge Columns" version="1.0.1">
  2. <description>together</description>
  3. <command interpreter="python">
  4. mergeCols.py
  5. $input1
  6. $out_file1
  7. $col1
  8. $col2
  9. #for $col in $columns
  10. ${col.datacol}
  11. #end for
  12. </command>
  13. <inputs>
  14. <param format="tabular" name="input1" type="data" label="Select data" help="Dataset missing? See TIP below."/>
  15. <param name="col1" label="Merge column" type="data_column" data_ref="input1" />
  16. <param name="col2" label="with column" type="data_column" data_ref="input1" help="Need to add more columns? Use controls below."/>
  17. <repeat name="columns" title="Columns">
  18. <param name="datacol" label="Add column" type="data_column" data_ref="input1" />
  19. </repeat>
  20. </inputs>
  21. <outputs>
  22. <data format="tabular" name="out_file1" />
  23. </outputs>
  24. <tests>
  25. <test>
  26. <param name="input1" value="1.bed"/>
  27. <param name="col1" value="4" />
  28. <param name="col2" value="1" />
  29. <param name="datacol" value="6" />
  30. <output name="out_file1" file="mergeCols.dat"/>
  31. </test>
  32. </tests>
  33. <help>
  34. .. class:: infomark
  35. **TIP:** If your data is not TAB delimited, use *Text Manipulation-&gt;Convert*
  36. -----
  37. **What it does**
  38. This tool merges columns together. Any number of valid columns can be merged in any order.
  39. -----
  40. **Example**
  41. Input dataset (five columns: c1, c2, c3, c4, and c5)::
  42. 1 10 1000 gene1 chr
  43. 2 100 1500 gene2 chr
  44. merging columns "**c5,c1**" will return::
  45. 1 10 1000 gene1 chr chr1
  46. 2 100 1500 gene2 chr chr2
  47. .. class:: warningmark
  48. Note that all original columns are preserved and the result of merge is added as the rightmost column.
  49. </help>
  50. </tool>