/tools/filters/fixedValueColumn.xml

https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 61 lines · 44 code · 17 blank · 0 comment · 0 complexity · 8f7e630ee69260ec64a8759a62464c06 MD5 · raw file

  1. <tool id="addValue" name="Add column">
  2. <description>to an existing dataset</description>
  3. <command interpreter="perl">fixedValueColumn.pl $input $out_file1 "$exp" $iterate</command>
  4. <inputs>
  5. <param name="exp" size="20" type="text" value="1" label="Add this value"/>
  6. <param format="tabular" name="input" type="data" label="to Dataset" help="Dataset missing? See TIP below" />
  7. <param name="iterate" type="select" label="Iterate?">
  8. <option value="no">NO</option>
  9. <option value="yes">YES</option>
  10. </param>
  11. </inputs>
  12. <outputs>
  13. <data format="input" name="out_file1" metadata_source="input"/>
  14. </outputs>
  15. <tests>
  16. <test>
  17. <param name="exp" value="1"/>
  18. <param name="input" value="1.bed"/>
  19. <param name="iterate" value="no"/>
  20. <output name="out_file1" file="eq-addvalue.dat"/>
  21. </test>
  22. </tests>
  23. <help>
  24. .. class:: infomark
  25. **TIP:** If your data is not TAB delimited, use *Text Manipulation-&gt;Convert*
  26. -----
  27. **What it does**
  28. You can enter any value and it will be added as a new column to your dataset
  29. -----
  30. **Example**
  31. If you original data looks like this::
  32. chr1 10 100 geneA
  33. chr2 200 300 geneB
  34. chr2 400 500 geneC
  35. Typing **+** in the text box will generate::
  36. chr1 10 100 geneA +
  37. chr2 200 300 geneB +
  38. chr2 400 500 geneC +
  39. You can also add line numbers by selecting **Iterate: YES**. In this case if you enter **1** in the text box you will get::
  40. chr1 10 100 geneA 1
  41. chr2 200 300 geneB 2
  42. chr2 400 500 geneC 3
  43. </help>
  44. </tool>