/tools/fastx_toolkit/fastx_trimmer.xml

https://bitbucket.org/cistrome/cistrome-harvard/ · XML · 81 lines · 59 code · 19 blank · 3 comment · 0 complexity · cde5be9e5f1db725d1ee243223867788 MD5 · raw file

  1. <tool id="cshl_fastx_trimmer" name="Trim sequences">
  2. <description></description>
  3. <requirements><requirement type="package">fastx_toolkit</requirement></requirements>
  4. <command>zcat -f '$input' | fastx_trimmer -v -f $first -l $last -o $output
  5. #if $input.ext == "fastqsanger":
  6. -Q 33
  7. #end if
  8. </command>
  9. <inputs>
  10. <param format="fasta,fastqsolexa,fastqsanger" name="input" type="data" label="Library to clip" />
  11. <param name="first" size="4" type="integer" value="1">
  12. <label>First base to keep</label>
  13. </param>
  14. <param name="last" size="4" type="integer" value="21">
  15. <label>Last base to keep</label>
  16. </param>
  17. </inputs>
  18. <tests>
  19. <test>
  20. <!-- Trim a FASTA file - remove first four bases (e.g. a barcode) -->
  21. <param name="input" value="fastx_trimmer1.fasta" />
  22. <param name="first" value="5"/>
  23. <param name="last" value="36"/>
  24. <output name="output" file="fastx_trimmer1.out" />
  25. </test>
  26. <test>
  27. <!-- Trim a FASTQ file - remove last 9 bases (e.g. keep only miRNA length sequences) -->
  28. <param name="input" value="fastx_trimmer2.fastq" ftype="fastqsolexa"/>
  29. <param name="first" value="1"/>
  30. <param name="last" value="27"/>
  31. <output name="output" file="fastx_trimmer2.out" />
  32. </test>
  33. </tests>
  34. <outputs>
  35. <data format="input" name="output" metadata_source="input" />
  36. </outputs>
  37. <help>
  38. **What it does**
  39. This tool trims (cut bases from) sequences in a FASTA/Q file.
  40. --------
  41. **Example**
  42. Input Fasta file (with 36 bases in each sequences)::
  43. >1-1
  44. TATGGTCAGAAACCATATGCAGAGCCTGTAGGCACC
  45. >2-1
  46. CAGCGAGGCTTTAATGCCATTTGGCTGTAGGCACCA
  47. Trimming with First=1 and Last=21, we get a FASTA file with 21 bases in each sequences (starting from the first base)::
  48. >1-1
  49. TATGGTCAGAAACCATATGCA
  50. >2-1
  51. CAGCGAGGCTTTAATGCCATT
  52. Trimming with First=6 and Last=10, will generate a FASTA file with 5 bases (bases 6,7,8,9,10) in each sequences::
  53. >1-1
  54. TCAGA
  55. >2-1
  56. AGGCT
  57. ------
  58. This tool is based on `FASTX-toolkit`__ by Assaf Gordon.
  59. .. __: http://hannonlab.cshl.edu/fastx_toolkit/
  60. </help>
  61. </tool>
  62. <!-- FASTX-Trimmer is part of the FASTX-toolkit, by A.Gordon (gordon@cshl.edu) -->