0
|
1 <tool id="nextgenmap" name="NextGenMap" version="@WRAPPER_VERSION@+galaxy0">
|
|
2 <description>NextGenMap is a flexible highly sensitive short read mapping tool</description>
|
|
3 <macros>
|
|
4 <import>macros.xml</import>
|
|
5 </macros>
|
|
6 <expand macro="requirements" />
|
|
7 <command detect_errors="exit_code"><![CDATA[
|
|
8 addmemory=\${GALAXY_MEMORY_MB_PER_SLOT:-768} &&
|
|
9 ((addmemory=addmemory*75/100)) &&
|
|
10 ln -s '$ref' reference.fa &&
|
|
11 ngm -t \${GALAXY_SLOTS:-2} -r '$ref' -i '$min_ident'
|
|
12 #if str( $single_paired.single_paired_selector ) == 'single':
|
|
13 -q '$single_paired.reads'
|
|
14 #elif str( $single_paired.single_paired_selector ) == 'paired':
|
|
15 -1 '$single_paired.forward' -2 '$single_paired.reverse'
|
|
16 #else
|
|
17 -1 '$single_paired.paired_input.forward' -2 '$single_paired.paired_input.reverse'
|
|
18 #end if
|
|
19 #if $adv.adv_options == "yes":
|
|
20 #if $adv.min_insert_size:
|
|
21 --min-insert-size '${adv.min_insert_size}'
|
|
22 #end if
|
|
23 #if $adv.max_insert_size:
|
|
24 --max-insert-size '${adv.max_insert_size}'
|
|
25 #end if
|
|
26 #if $adv.max_read_length:
|
|
27 --max-read-length '${adv.max_read_length}'
|
|
28 #end if
|
|
29 #if $adv.force_rlength_check:
|
|
30 --force-rlength-check
|
|
31 #end if
|
|
32 #if $adv.topn:
|
|
33 --topn '${adv.topn}'
|
|
34 #end if
|
|
35 #if $adv.strata:
|
|
36 --strata
|
|
37 #end if
|
|
38 #if $adv.keep_tags:
|
|
39 --keep-tags
|
|
40 #end if
|
|
41 #if $adv.hard_clip:
|
|
42 --hard-clip
|
|
43 #end if
|
|
44 #if $adv.silent_clip:
|
|
45 --silent-clip
|
|
46 #end if
|
|
47 #if $adv.rg.rg_options == "yes":
|
|
48 #if $adv.rg.rg_id:
|
|
49 --rg-id '${adv.rg.rg_id}'
|
|
50 #end if
|
|
51 #if $adv.rg.rg_sm:
|
|
52 --rg-id '${adv.rg.rg_sm}'
|
|
53 #end if
|
|
54 #if $adv.rg.rg_lb:
|
|
55 --rg-id '${adv.rg.rg_lb}'
|
|
56 #end if
|
|
57 #if $adv.rg.rg_pl:
|
|
58 --rg-id '${adv.rg.rg_pl}'
|
|
59 #end if
|
|
60 #if $adv.rg.rg_ds:
|
|
61 --rg-id '${adv.rg.rg_ds}'
|
|
62 #end if
|
|
63 #if $adv.rg.rg_dt:
|
|
64 --rg-id '${adv.rg.rg_dt}'
|
|
65 #end if
|
|
66 #if $adv.rg.rg_pu:
|
|
67 --rg-id '${adv.rg.rg_pu}'
|
|
68 #end if
|
|
69 #if $adv.rg.rg_pi:
|
|
70 --rg-id '${adv.rg.rg_pi}'
|
|
71 #end if
|
|
72 #if $adv.rg.rg_pg:
|
|
73 --rg-id '${adv.rg.rg_pg}'
|
|
74 #end if
|
|
75 #if $adv.rg.rg_cn:
|
|
76 --rg-id '${adv.rg.rg_cn}'
|
|
77 #end if
|
|
78 #if $adv.rg.rg_fo:
|
|
79 --rg-id '${adv.rg.rg_fo}'
|
|
80 #end if
|
|
81 #if $adv.rg.rg_ks:
|
|
82 --rg-id '${adv.rg.rg_ks}'
|
|
83 #end if
|
|
84 #end if
|
|
85 #if $adv.pe_delimiter:
|
|
86 --pe-delimiter '${adv.pe_delimiter}'
|
|
87 #end if
|
|
88 #end if
|
|
89 -o out.sam &&
|
|
90 samtools sort -O BAM -@ \${GALAXY_SLOTS:-2} -m \$addmemory"M" -o sort.bam -T "\${TMPDIR:-.}" out.sam &&
|
|
91 cp sort.bam $output1
|
|
92 ]]></command>
|
|
93 <inputs>
|
|
94 <param type="data" name="ref" format="fasta" label="Assembled reference"/>
|
|
95 <param name="min_ident" type="float" min="0" max="1" value="0.5" label="Reads below threshold will be marked unmapped"/>
|
|
96 <conditional name="single_paired">
|
|
97 <param name="single_paired_selector" type="select" label="Single-end or paired reads">
|
|
98 <option value="single" selected="true">Single-end</option>
|
|
99 <option value="paired">Paired</option>
|
|
100 <option value="paired_collection">Paired Collection</option>
|
|
101 </param>
|
|
102 <when value="single">
|
|
103 <param name="reads" type="data" format="fastqsanger" label="Select first set of reads" help="Specify dataset with forward reads"/>
|
|
104 </when>
|
|
105 <when value="paired">
|
|
106 <param name="forward" type="data" format="fastqsanger" label="Select first set of reads" help="Specify dataset with forward reads"/>
|
|
107 <param name="reverse" type="data" format="fastqsanger" label="Select second set of reads" help="Specify dataset with reverse reads"/>
|
|
108 </when>
|
|
109 <when value="paired_collection">
|
|
110 <param name="paired_input" type="data_collection" collection_type="paired" format="fastq,fastq.gz" label="Select paired collection(s)"/>
|
|
111 </when>
|
|
112 </conditional>
|
|
113 <conditional name="adv">
|
|
114 <param type="select" name="adv_options" label="Show advanced options">
|
|
115 <option value="yes">Yes</option>
|
|
116 <option value="no" selected="true">No</option>
|
|
117 </param>
|
|
118 <when value="yes">
|
|
119 <param argument="--min-insert-size" name="min_insert_size" type="integer" optional="true" min="0" label="The min insert size for paired end alignments [0]" />
|
|
120 <param argument="--max-insert-size" name="max_insert_size" type="integer" optional="true" min="0" label="The max insert size for paired end alignments [1000]" />
|
|
121 <param argument="--max-read-length" name="max_read_length" type="integer" optional="true" min="0" label="Length of longest read in input. Default is estimated from data" />
|
|
122 <param argument="--force-rlength-check" name="force_rlength_check" type="boolean" optional="true" label="Forces NextgenMap to run through all reads to find the max. read length. (default: off)" />
|
|
123 <param argument="--topn" name="topn" type="integer" optional="true" label="Prints the <n> best alignments sorted by alignment score [1]" />
|
|
124 <param argument="--strata" name="strata" type="boolean" optional="true" label="Only output the highest scoring mappings for any given read, up to <n> mappings per read. If a read has more than <n> mappings with the same score, it is discarded and reported as unmapped." />
|
|
125 <param argument="--keep-tags" name="keep_tags" type="boolean" optional="true" label="Copy BAM/SAM tags present in input file to output file (default: off)" />
|
|
126 <param argument="--no-unal" name="no_unal" type="boolean" optional="true" label="Don't print unaligned reads to output file." />
|
|
127 <param argument="--hard-clip" name="hard_clip" type="boolean" optional="true" label="Hard instead of soft clipping in SAM output" />
|
|
128 <param argument="--silent-clip" name="silent_clip" type="boolean" optional="true" label="Hard clip reads but don't add clipping information to CIGAR string" />
|
|
129 <conditional name="rg">
|
|
130 <param type="select" name="rg_options" label="Add RG headers">
|
|
131 <option value="yes">Yes</option>
|
|
132 <option value="no" selected="true">No</option>
|
|
133 </param>
|
|
134 <when value="yes">
|
|
135 <param argument="--rg-id" name="rg_id" type="text" optional="true" label="Adds RG:Z: <string> to all alignments in SAM/BAM" >
|
|
136 <sanitizer>
|
|
137 <valid initial="string.printable">
|
|
138 <remove value="'"/>
|
|
139 </valid>
|
|
140 </sanitizer>
|
|
141 </param>
|
|
142 <param argument="--rg-sm" name="rg_sm" type="text" optional="true" label="RG header: Sample" >
|
|
143 <sanitizer>
|
|
144 <valid initial="string.printable">
|
|
145 <remove value="'"/>
|
|
146 </valid>
|
|
147 </sanitizer>
|
|
148 </param>
|
|
149 <param argument="--rg-lb" name="rg_lb" type="text" optional="true" label="RG header: Library" >
|
|
150 <sanitizer>
|
|
151 <valid initial="string.printable">
|
|
152 <remove value="'"/>
|
|
153 </valid>
|
|
154 </sanitizer>
|
|
155 </param>
|
|
156 <param argument="--rg-pl" name="rg_pl" type="text" optional="true" label="RG header: Platform" >
|
|
157 <sanitizer>
|
|
158 <valid initial="string.printable">
|
|
159 <remove value="'"/>
|
|
160 </valid>
|
|
161 </sanitizer>
|
|
162 </param>
|
|
163 <param argument="--rg-ds" name="rg_ds" type="text" optional="true" label="RG header: Description" >
|
|
164 <sanitizer>
|
|
165 <valid initial="string.printable">
|
|
166 <remove value="'"/>
|
|
167 </valid>
|
|
168 </sanitizer>
|
|
169 </param>
|
|
170 <param argument="--rg-dt" name="rg_dt" type="text" optional="true" label="RG header: Date (format: YYYY-MM-DD)" >
|
|
171 <sanitizer>
|
|
172 <valid initial="string.printable">
|
|
173 <remove value="'"/>
|
|
174 </valid>
|
|
175 </sanitizer>
|
|
176 </param>
|
|
177 <param argument="--rg-pu" name="rg_pu" type="text" optional="true" label="RG header: Platform unit" >
|
|
178 <sanitizer>
|
|
179 <valid initial="string.printable">
|
|
180 <remove value="'"/>
|
|
181 </valid>
|
|
182 </sanitizer>
|
|
183 </param>
|
|
184 <param argument="--rg-pi" name="rg_pi" type="text" optional="true" label="RG header: Median insert size" >
|
|
185 <sanitizer>
|
|
186 <valid initial="string.printable">
|
|
187 <remove value="'"/>
|
|
188 </valid>
|
|
189 </sanitizer>
|
|
190 </param>
|
|
191 <param argument="--rg-pg" name="rg_pg" type="text" optional="true" label="RG header: Programs" >
|
|
192 <sanitizer>
|
|
193 <valid initial="string.printable">
|
|
194 <remove value="'"/>
|
|
195 </valid>
|
|
196 </sanitizer>
|
|
197 </param>
|
|
198 <param argument="--rg-cn" name="rg_cn" type="text" optional="true" label="RG header: sequencing center" >
|
|
199 <sanitizer>
|
|
200 <valid initial="string.printable">
|
|
201 <remove value="'"/>
|
|
202 </valid>
|
|
203 </sanitizer>
|
|
204 </param>
|
|
205 <param argument="--rg-fo" name="rg_fo" type="text" optional="true" label="RG header: Flow order" >
|
|
206 <sanitizer>
|
|
207 <valid initial="string.printable">
|
|
208 <remove value="'"/>
|
|
209 </valid>
|
|
210 </sanitizer>
|
|
211 </param>
|
|
212 <param argument="--rg-ks" name="rg_ks" type="text" optional="true" label="RG header: Key sequence" >
|
|
213 <sanitizer>
|
|
214 <valid initial="string.printable">
|
|
215 <remove value="'"/>
|
|
216 </valid>
|
|
217 </sanitizer>
|
|
218 </param>
|
|
219 </when>
|
|
220 <when value="no">
|
|
221 </when>
|
|
222 </conditional>
|
|
223 <param argument="--pe-delimiter" name="pe_delimiter" type="text" optional="true" label="Character used in suffix that identifies mate 1 and 2. E.g. /1 and /2. This suffixes will be removed to ensure proper SAM output (default: /)" >
|
|
224 <sanitizer>
|
|
225 <valid initial="string.printable">
|
|
226 <remove value="'"/>
|
|
227 </valid>
|
|
228 </sanitizer>
|
|
229 </param>
|
|
230 </when>
|
|
231 <when value="no">
|
|
232 </when>
|
|
233 </conditional>
|
|
234 </inputs>
|
|
235 <outputs>
|
|
236 <data name="output1" format="bam" label="${tool.name} on ${on_string}: BAM" />
|
|
237 </outputs>
|
|
238 <tests>
|
|
239 <test>
|
|
240 <param name="single_paired_selector" value="paired"/>
|
|
241 <param name="forward" ftype="fastq.gz" value="R1.fq.gz"/>
|
|
242 <param name="reverse" ftype="fastq.gz" value="R2.fq.gz"/>
|
|
243 <param name="ref" ftype="fasta" value="ref.fa"/>
|
|
244 <output name="output1" ftype="bam" file="results.bam"/>
|
|
245 </test>
|
|
246 </tests>
|
|
247 <help><![CDATA[
|
|
248 **NextGenMap**
|
|
249
|
|
250 `NextGenMap`_ is a flexible highly sensitive short read mapping tool that handles much higher mismatch rates than comparable algorithms while still outperforming them in terms of runtime. This allows analysing large scale datasets even with increased SNP rates or higher error rates (e.g. caused by specialized experimental protocols) and avoids biases caused by highly variable regions in the genome.
|
|
251
|
|
252 -----
|
|
253
|
|
254 **Usage**
|
|
255
|
|
256 ngm [-c <path>] {-q <reads> [-p] | -1 <mates 1> -2 <mates 2>} -r <reference> -o <output> [parameter]
|
|
257
|
|
258
|
|
259 .. _NextGenMap: https://github.com/Cibiv/NextGenMap/wiki
|
|
260
|
|
261 ]]></help>
|
|
262 <expand macro="citations" />
|
|
263 </tool>
|