| 0 | 1 <tool id="cshl_fastq_masker" name="Mask nucleotides"> | 
|  | 2 	<description>(based on quality)</description> | 
|  | 3 	<command> | 
|  | 4 		cat '$input' | | 
|  | 5 		fastq_masker | 
|  | 6 #if $input.ext == "fastqsanger": | 
|  | 7  -Q 33 | 
|  | 8 #elif $input.ext == "fastq": | 
|  | 9  -Q 64 | 
|  | 10 #end if | 
|  | 11  -v -q $cutoff -r '$maskchar' -o '$output'</command> | 
|  | 12 	<inputs> | 
|  | 13 		<param format="fastq,fastqsanger" name="input" type="data" label="Library to clip" /> | 
|  | 14 | 
|  | 15 		<param name="cutoff" size="4" type="integer" value="20"> | 
|  | 16 			<label>Minimum quality score</label> | 
|  | 17 			<help>Nucleotides below this quality will be masked</help> | 
|  | 18 		</param> | 
|  | 19 | 
|  | 20 		<param name="maskchar" size="1" type="text" value="N"> | 
|  | 21 			<label>Mask character</label> | 
|  | 22 			<help>Replace low-quality nucleotides with this character. Common values: 'N' or '.'</help> | 
|  | 23 		</param> | 
|  | 24 	</inputs> | 
|  | 25 | 
|  | 26 	<tests> | 
|  | 27 		<test> | 
|  | 28 			<param name="input" value="fastq_masker.fastq" ftype="fastq" /> | 
|  | 29 			<param name="cutoff" value="29"/> | 
|  | 30 			<param name="maskchar" value="x"/> | 
|  | 31 			<output name="output" file="fastq_masker.out" /> | 
|  | 32 		</test> | 
|  | 33 	</tests> | 
|  | 34 | 
|  | 35 	<outputs> | 
|  | 36 		<data format="input" name="output" metadata_source="input" | 
|  | 37 		/> | 
|  | 38 	</outputs> | 
|  | 39 	<help> | 
|  | 40 **What it does** | 
|  | 41 | 
|  | 42 This tool masks low-quality nucleotides in a FASTQ file, and replaces them with the specifed mask character (**N** by default). | 
|  | 43 | 
|  | 44 -------- | 
|  | 45 | 
|  | 46 **Example** | 
|  | 47 | 
|  | 48 Input FASTQ file:: | 
|  | 49 | 
|  | 50     @1 | 
|  | 51     TATGGTCAGAAACCATATGC | 
|  | 52     +1 | 
|  | 53     40 40 40 40 40 40 40 40 40 40 40 20 19 19 19 19 19 19 19 19 | 
|  | 54     @2 | 
|  | 55     CAGCGAGGCTTTAATGCCAT | 
|  | 56     +2 | 
|  | 57     40 40 40 40 40 40 40 40 30 20 19 20 19 19 19 19 19 19 19 19 | 
|  | 58     @3 | 
|  | 59     CAGCGAGGCTTTAATGCCAT | 
|  | 60     +3 | 
|  | 61     40 40 40 40 40 40 40 40 20 19 19 19 19 19 19 19 19 19 19 19 | 
|  | 62 | 
|  | 63 After Masking nucleotides with quality lower than 20 with the character **N**:: | 
|  | 64 | 
|  | 65     @1 | 
|  | 66     TATGGTCAGAAANNNNNNNN | 
|  | 67     +1 | 
|  | 68     40 40 40 40 40 40 40 40 40 40 40 20 19 19 19 19 19 19 19 19 | 
|  | 69     @2 | 
|  | 70     CAGCGAGGCTNTNNNNNNNN | 
|  | 71     +2 | 
|  | 72     40 40 40 40 40 40 40 40 30 20 19 20 19 19 19 19 19 19 19 19 | 
|  | 73     @3 | 
|  | 74     CAGCGAGGCNNNNNNNNNNN | 
|  | 75     +3 | 
|  | 76     40 40 40 40 40 40 40 40 20 19 19 19 19 19 19 19 19 19 19 19 | 
|  | 77 | 
|  | 78 | 
|  | 79 ------ | 
|  | 80 | 
|  | 81 This tool is based on `FASTX-toolkit`__ by Assaf Gordon. | 
|  | 82 | 
|  | 83  .. __: http://hannonlab.cshl.edu/fastx_toolkit/ | 
|  | 84 | 
|  | 85 </help> | 
|  | 86 </tool> | 
|  | 87 <!-- FASTQ-Masker part of the FASTX-toolkit, by A.Gordon (gordon@cshl.edu) --> |