Mercurial > repos > nml > quasitools
comparison quality.xml @ 0:1f1214983a1c draft default tip
planemo upload for repository https://github.com/phac-nml/quasitools commit 5a9e4c9a582828654893166caf20576f5e0c418e
| author | nml |
|---|---|
| date | Mon, 20 Jun 2022 20:05:57 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:1f1214983a1c |
|---|---|
| 1 <tool id="quality" name="Quality control" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@"> | |
| 2 <description>Performs quality control on FASTQ reads.</description> | |
| 3 <macros> | |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
| 6 <expand macro="requirements"/> | |
| 7 <command detect_errors="exit_code"><![CDATA[ | |
| 8 | |
| 9 quasitools quality | |
| 10 | |
| 11 ## Preparing file input. | |
| 12 #if $data_type.type == "paired": | |
| 13 | |
| 14 '$data_type.fastq_input1' | |
| 15 '$data_type.fastq_input2' | |
| 16 | |
| 17 #elif $data_type.type == "collection": | |
| 18 | |
| 19 '$data_type.fastq_input1.forward' | |
| 20 '$data_type.fastq_input1.reverse' | |
| 21 | |
| 22 #elif $data_type.type == "single": | |
| 23 | |
| 24 '$data_type.fastq_input1' | |
| 25 | |
| 26 #end if | |
| 27 | |
| 28 #if $length_cutoff: | |
| 29 -lc '$length_cutoff' | |
| 30 #end if | |
| 31 | |
| 32 #if $score_cutoff: | |
| 33 -sc '$score_cutoff' | |
| 34 #end if | |
| 35 | |
| 36 #if $min_read_qual: | |
| 37 -rq '$min_read_qual' | |
| 38 #end if | |
| 39 | |
| 40 #if $low_quality.qual_selector == "filter_ns": | |
| 41 --ns | |
| 42 #elif $low_quality.qual_selector == "mask_reads": | |
| 43 --mask_reads | |
| 44 #end if | |
| 45 | |
| 46 #if $score_type.score_selector == "median": | |
| 47 --median | |
| 48 #elif $score_type.score_selector == "mean": | |
| 49 --mean | |
| 50 #end if | |
| 51 | |
| 52 $trim_reads | |
| 53 | |
| 54 -o output | |
| 55 | |
| 56 ]]></command> | |
| 57 <inputs> | |
| 58 <conditional name="data_type"> | |
| 59 <param name="type" type="select" label="Specify the read type."> | |
| 60 <option value="single">Single-end Data</option> | |
| 61 <option value="paired">Paired-end Data</option> | |
| 62 <option value="collection">Collection Paired-end Data</option> | |
| 63 </param> | |
| 64 <when value="single"> | |
| 65 <param name="fastq_input1" type="data" format="fastq" label="Single end read file(s)"/> | |
| 66 </when> | |
| 67 <when value="paired"> | |
| 68 <param name="fastq_input1" type="data" format="fastq" label="Forward paired-end read file"/> | |
| 69 <param name="fastq_input2" type="data" format="fastq" label="Reverse paired-end read file"/> | |
| 70 </when> | |
| 71 <when value="collection"> | |
| 72 <param name="fastq_input1" type="data_collection" label="Paired-end reads collection" optional="false" format="fastq" collection_type="paired" /> | |
| 73 </when> | |
| 74 </conditional> | |
| 75 <param name="length_cutoff" type="integer" optional="true" min="1" max="1000" label="Length cutoff" value="100" help="Reads which fall short of the specified length will be filtered out. Defaults to 100." /> | |
| 76 <param name="score_cutoff" type="integer" optional="true" min="0" max="40" label="Score cutoff" value="30" help="Reads whose median or mean quality score (depending on the score type specified) is less than the specified score cutoff value will be filtered out. Defaults to 30." /> | |
| 77 <param name="min_read_qual" type="integer" optional="true" min="1" max="100" label="Minimum quality" value="30" help="Minimum required quality for a position in a read not to be masked, is masking is enabled. Defaults to 30." /> | |
| 78 <param name="trim_reads" type="boolean" optional="true" checked="false" truevalue="-tr" falsevalue="" label="Trim reads" help="Iteratively trim reads based on filter values if enabled." /> | |
| 79 <conditional name="low_quality"> | |
| 80 <param name="qual_selector" type="select" label="Filter out regions masked, or mask low coverage regions with n's." multiple="false" display="radio"> | |
| 81 <option value="filter_ns">Filter out regions with n's</option> | |
| 82 <option value="mask_reads">Mask low coverage regions with n's</option> | |
| 83 <option value="neither" selected="true">Do not filter or mask low coverage regions.</option> | |
| 84 </param> | |
| 85 <when value="filter_ns"> | |
| 86 </when> | |
| 87 <when value="mask_reads"> | |
| 88 </when> | |
| 89 <when value="neither"> | |
| 90 </when> | |
| 91 </conditional> | |
| 92 <conditional name="score_type"> | |
| 93 <param name="score_selector" type="select" label="Use either median score (default) or mean score for the score cutoff value." multiple="false" display="radio"> | |
| 94 <option value="median" selected="true">Use median score</option> | |
| 95 <option value="mean">Use mean score</option> | |
| 96 </param> | |
| 97 <when value="median"> | |
| 98 </when> | |
| 99 <when value="mean"> | |
| 100 </when> | |
| 101 </conditional> | |
| 102 </inputs> | |
| 103 <outputs> | |
| 104 <data format="fastq" label="Quality control output" name="output_filtered" from_work_dir="output/filtered.fastq" /> | |
| 105 </outputs> | |
| 106 <tests> | |
| 107 <test> | |
| 108 <param name="type" value="single"/> | |
| 109 <param name="fastq_input1" value="forward.fastq" /> | |
| 110 <param name="score_selector" value="median" /> | |
| 111 <output name="output_filtered"> | |
| 112 <assert_contents> | |
| 113 <has_text text="@M01647:10:000000000-ACPHB:1:1101:18589:1580 1:N:0:86" /> | |
| 114 <has_text text="CCCCCGG@FFGGGGGGGGGGGGCGGGGGGGGDGFFFGGGGGDEGCFGCFFFGGGGGGGGGGGGGGGGFGGGGGGGGGGFCFCGGGGCGFGGGGFGEGGGGGGGGGGGGGGGGGGGGGFEFGGGGGGF" /> | |
| 115 </assert_contents> | |
| 116 </output> | |
| 117 </test> | |
| 118 <test> | |
| 119 <param name="type" value="single"/> | |
| 120 <param name="fastq_input1" value="forward.fastq" /> | |
| 121 <param name="score_selector" value="median" /> | |
| 122 <param name="qual_selector" value="filter_ns" /> | |
| 123 <output name="output_filtered"> | |
| 124 <assert_contents> | |
| 125 <has_text text="@M01647:10:000000000-ACPHB:1:1101:18589:1580 1:N:0:86" /> | |
| 126 <has_text text="CCCCCGG@FFGGGGGGGGGGGGCGGGGGGGGDGFFFGGGGGDEGCFGCFFFGGGGGGGGGGGGGGGGFGGGGGGGGGGFCFCGGGGCGFGGGGFGEGGGGGGGGGGGGGGGGGGGGGFEFGGGGGGF" /> | |
| 127 </assert_contents> | |
| 128 </output> | |
| 129 </test> | |
| 130 <test> | |
| 131 <param name="type" value="single"/> | |
| 132 <param name="fastq_input1" value="forward.fastq" /> | |
| 133 <param name="score_selector" value="median" /> | |
| 134 <param name="trim_reads" value="-tr" /> | |
| 135 <output name="output_filtered"> | |
| 136 <assert_contents> | |
| 137 <has_text text="@M01647:10:000000000-ACPHB:1:1101:18589:1580 1:N:0:86" /> | |
| 138 <has_text text="CCCCCGG@FFGGGGGGGGGGGGCGGGGGGGGDGFFFGGGGGDEGCFGCFFFGGGGGGGGGGGGGGGGFGGGGGGGGGGFCFCGGGGCGFGGGGFGEGGGGGGGGGGGGGGGGGGGGGFEFGGGGGGF" /> | |
| 139 </assert_contents> | |
| 140 </output> | |
| 141 </test> | |
| 142 <test> | |
| 143 <param name="type" value="single"/> | |
| 144 <param name="fastq_input1" value="forward.fastq" /> | |
| 145 <param name="score_selector" value="median" /> | |
| 146 <param name="qual_selector" value="mask_reads" /> | |
| 147 <output name="output_filtered"> | |
| 148 <assert_contents> | |
| 149 <has_text text="@M01647:10:000000000-ACPHB:1:1101:18589:1580 1:N:0:86" /> | |
| 150 <has_text text="NNNNNNTACCACATCCCNCNNNNTTNNNNNNNNNNANNTCNNTNNCNNTNCTNNNTNTNNNTGNTGCNTNTTTTTCAGTTCCCTTNGNTGNNGNCTTCAGNNNNTATACTGCATTTACCNTNCNT" /> | |
| 151 </assert_contents> | |
| 152 </output> | |
| 153 </test> | |
| 154 <test> | |
| 155 <param name="type" value="single"/> | |
| 156 <param name="fastq_input1" value="forward.fastq" /> | |
| 157 <param name="score_selector" value="mean" /> | |
| 158 <output name="output_filtered"> | |
| 159 <assert_contents> | |
| 160 <has_text text="@M01647:10:000000000-ACPHB:1:1101:10485:1674 1:N:0:86" /> | |
| 161 <has_text text="CCCCCGG@FFGGGGGGGGGGGGCGGGGGGGGDGFFFGGGGGDEGCFGCFFFGGGGGGGGGGGGGGGGFGGGGGGGGGGFCFCGGGGCGFGGGGFGEGGGGGGGGGGGGGGGGGGGGGFEFGGGGGGF" /> | |
| 162 </assert_contents> | |
| 163 </output> | |
| 164 </test> | |
| 165 </tests> | |
| 166 <help><![CDATA[ | |
| 167 Quality Control | |
| 168 =============== | |
| 169 | |
| 170 Perform quality control on FASTQ reads.]]></help> | |
| 171 <expand macro="citations" /> | |
| 172 </tool> |
