/tools/regVariation/windowSplitter.xml

https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 104 lines · 77 code · 26 blank · 1 comment · 0 complexity · 7585c4eb95e074cfdebfbd8491d1fa0b MD5 · raw file

  1. <tool id="winSplitter" name="Make windows">
  2. <description></description>
  3. <command interpreter="python">windowSplitter.py $input $size $out_file1 ${wintype.choice} ${wintype.offset} -l ${input.metadata.chromCol},${input.metadata.startCol},${input.metadata.endCol},${input.metadata.strandCol}</command>
  4. <inputs>
  5. <!--<param label="Genome" name="dbkey" type="genomebuild"/>-->
  6. <param format="interval" name="input" type="data" label="Select data"/>
  7. <param name="size" size="10" type="integer" value="500" label="Window size"/>
  8. <conditional name="wintype">
  9. <param name="choice" type="select" label="Make sliding windows?">
  10. <option value="0" selected="true">No</option>
  11. <option value="1">Yes</option>
  12. </param>
  13. <when value="0">
  14. <param name="offset" type="hidden" value="0" />
  15. </when>
  16. <when value="1">
  17. <param name="offset" size="10" type="integer" value="10" label="Offset size"/>
  18. </when>
  19. </conditional>
  20. </inputs>
  21. <outputs>
  22. <data format="interval" name="out_file1" metadata_source="input"/>
  23. </outputs>
  24. <tests>
  25. <test>
  26. <param name="input" value="4.bed"/>
  27. <param name="size" value="5000"/>
  28. <param name="choice" value="1"/>
  29. <param name="offset" value="4000"/>
  30. <output name="out_file1" file="4_windows.bed"/>
  31. </test>
  32. </tests>
  33. <help>
  34. .. class:: infomark
  35. **What it does**
  36. This tool splits the intervals in the input file into smaller intervals based on the specified window-size and window type.
  37. -----
  38. .. class:: warningmark
  39. **Note**
  40. The positions at the end of the input interval which do not fit into the last window or a new window of required size, will be omitted from the output.
  41. -----
  42. .. class:: infomark
  43. **About formats**
  44. **BED format** Browser Extensible Data format was designed at UCSC for displaying data tracks in the Genome Browser. It has three required fields and several additional optional ones:
  45. The first three BED fields (required) are::
  46. 1. chrom - The name of the chromosome (e.g. chr1, chrY_random).
  47. 2. chromStart - The starting position in the chromosome. (The first base in a chromosome is numbered 0.)
  48. 3. chromEnd - The ending position in the chromosome, plus 1 (i.e., a half-open interval).
  49. The additional BED fields (optional) are::
  50. 4. name - The name of the BED line.
  51. 5. score - A score between 0 and 1000.
  52. 6. strand - Defines the strand - either '+' or '-'.
  53. 7. thickStart - The starting position where the feature is drawn thickly at the Genome Browser.
  54. 8. thickEnd - The ending position where the feature is drawn thickly at the Genome Browser.
  55. 9. reserved - This should always be set to zero.
  56. 10. blockCount - The number of blocks (exons) in the BED line.
  57. 11. blockSizes - A comma-separated list of the block sizes. The number of items in this list should correspond to blockCount.
  58. 12. blockStarts - A comma-separated list of block starts. All of the blockStart positions should be calculated relative to chromStart. The number of items in this list should correspond to blockCount.
  59. 13. expCount - The number of experiments.
  60. 14. expIds - A comma-separated list of experiment ids. The number of items in this list should correspond to expCount.
  61. 15. expScores - A comma-separated list of experiment scores. All of the expScores should be relative to expIds. The number of items in this list should correspond to expCount.
  62. -----
  63. **Example**
  64. - For the following dataset::
  65. chr22 1000 4700 NM_174568 0 +
  66. - running this tool with **Window size as 1000**, will return::
  67. chr22 1000 2000 NM_174568 0 +
  68. chr22 2000 3000 NM_174568 0 +
  69. chr22 3000 4000 NM_174568 0 +
  70. - running this tool to make **Sliding windows** of **size 1000** and **offset 500**, will return::
  71. chr22 1000 2000 NM_174568 0 +
  72. chr22 1500 2500 NM_174568 0 +
  73. chr22 2000 3000 NM_174568 0 +
  74. chr22 2500 3500 NM_174568 0 +
  75. chr22 3000 4000 NM_174568 0 +
  76. chr22 3500 4500 NM_174568 0 +
  77. </help>
  78. </tool>