comparison purge_haplotigs_purge.xml @ 0:af9c15ba501f draft default tip

"planemo upload for repository https://github.com/usegalaxy-au/tools-au/tree/master/tools/purge_haplotigs commit 4eeb962b57af0e0d80cfefeac08b7206fdc4c60e"
author galaxy-australia
date Wed, 20 Apr 2022 06:46:59 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:af9c15ba501f
1 <tool id="purge_haplotigs_purge" name="Purge Haplotigs Purge" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" >
2 <description>Purge contigs</description>
3 <xrefs>
4 <xref type='bio.tools'>purgehaplotigs</xref>
5 </xrefs>
6 <macros>
7 <import>macros.xml</import>
8 </macros>
9 <expand macro="requirements" />
10 <expand macro="stdio" />
11 <expand macro="version_command" />
12 <command><![CDATA[
13 purge_haplotigs purge
14 #if $adv_options.align_cov:
15 -align_cov '$adv_options.align_cov'
16 #end if
17 #if $adv_options.max_match:
18 -max_match '$adv_options.max_match'
19 #end if
20 #if $adv_options.wind_min:
21 -wind_min '$adv_options.wind_min'
22 #end if
23 #if $adv_options.wind_nmax:
24 -wind_nmax '$adv_options.wind_nmax'
25 #end if
26 #if $additional.optional_selector == "use_additional_options":
27 #if $additional.create_dotplot.include_dotplot =="Yes":
28 -dotplots
29 -bam '$additional.create_dotplot.aligned_bam'
30 #end if
31 #if $additional.with_repeat.has_repeat =="Yes":
32 -repeats '$additional.with_repeat.repeat'
33 #end if
34 #end if
35 -t \${GALAXY_SLOTS:-4}
36 -g $genome
37 -c $coverage
38 2>&1
39
40 ]]></command>
41 <inputs>
42 <param name="genome" type="data" format="fasta" label="Genome Assembly" help="Fasta file indexed with samtools faidx"/>
43 <param name="coverage" type="data" format="csv" label="Contig Coverage" help="Contig Coverage file"/>
44 <section name="adv_options" title="Advance Parameters" expanded="False">
45 <param argument="-align_cov" type="integer" value="70" label="Cutoff value to identify haplotigs" help="A cutoff value to identify a contig as a haplotigs in percentage: default=70 (-align_cov)"/>
46 <param argument="-max_match" type="integer" value="250" label="Cutoff value to identify repetitive regions" help="A cutoff value to identify repetitive regions: default=250 (-repeats)"/>
47 <param argument="-wind_min" type="integer" value="5000" label="Minimum window size" help="Minimum window size for BED coverage (dotplots): default=5000 (-wind_min)"/>
48 <param argument="-wind_nmax" type="integer" value="200" label="Max windows per contig" help="Max windows per contig for BED coverage plots (dotplots) : default=200 (-wind_nmax)"/>
49 </section>
50 <conditional name="additional">
51 <param name="optional_selector" type="select" label="Additional Parameters">
52 <option value="no">No</option>
53 <option value="use_additional_options">Yes</option>
54 </param>
55 <when value="no"/>
56 <when value="use_additional_options">
57 <conditional name="with_repeat">
58 <param type="select" name="has_repeat" label="Repetitive region file">
59 <option value="No">no repetitive region file</option>
60 <option value="Yes">with repetitive region file</option>
61 </param>
62 <when value="No"/>
63 <when value="Yes">
64 <param name="repeat" argument="-repeats" type="data" format="bed" label="Repetitive region (BED)" help="repetitive regions in BED file format (-repeats)"/>
65 </when>
66 </conditional>
67 <conditional name="create_dotplot">
68 <param type="select" name="include_dotplot" label="Generate dotplot" help="repetitive regions in BED file format (-repeats)">
69 <option value="No">No</option>
70 <option value="Yes">Yes</option>
71 </param>
72 <when value="No"/>
73 <when value="Yes">
74 <param name="aligned_bam" argument="-bam" type="data" format="bam" label="BAM file" help="Alignment file (BAM) to reference genome, required for generating dotplots (-bam)"/>
75 </when>
76 </conditional>
77 </when>
78 </conditional>
79 </inputs>
80 <outputs>
81 <data name="curated_haplotigs" format="fasta" label="${tool.name} on ${on_string}: curated haplotigs" from_work_dir="curated.haplotigs.fasta"/>
82 <data name="curated_sequences" format="fasta" label="${tool.name} on ${on_string}: curated sequences" from_work_dir="curated.fasta"/>
83 <data name="curated_artefacts" format="fasta" label="${tool.name} on ${on_string}: curated artefacts" from_work_dir="curated.artefacts.fasta"/>
84 <data name="curated_reassignment" format="tsv" label="${tool.name} on ${on_string}: curated assignment" from_work_dir="curated.reassignments.tsv"/>
85 <data name="curated_log" format="txt" label="${tool.name} on ${on_string}: curated log" from_work_dir="curated.contig_associations.log"/>
86 <collection name="output_pngs" type="list" label="${tool.name} on ${on_string}: dotplot diagram">
87 <filter> additional['optional_selector'] == "use_additional_options" and create_dotplot['include_dotplot'] == "Yes"</filter>
88 <discover_datasets pattern="__name_and_ext__" ext="png" directory="dotplots_reassigned_contigs" visible="false"/>
89 </collection>
90 </outputs>
91
92 <tests>
93 <test>
94 <!-- #1 test with common parameters -->
95 <param name="genome" value="contigs.fa" ftype="fasta"/>
96 <param name="coverage" value="coverage_stats.csv" ftype="csv"/>
97 <param name="align_cov" value="70" />
98 <param name="max_match" value="250" />
99 <param name="wind_min" value="5000" />
100 <param name="wind_nmax" value="200" />
101 <output name="curated_haplotigs" file="curated.haplotigs.fasta" ftype="fasta"/>
102 <output name="curated_sequences" file="curated.fasta" ftype="fasta"/>
103 <output name="curated_artefacts" file="curated.artefacts.fasta" ftype="fasta"/>
104 <output name="curated_reassignment" file="curated.reassignments.tsv" ftype="tsv"/>
105 <output name="curated_log" file="curated.contig_associations.log" ftype="txt"/>
106 <conditional name="additional">
107 <param name="optional_selector" value="no"/>
108 </conditional>
109 </test>
110 <test>
111 <!-- #2 test with common parameters -->
112 <param name="genome" value="contigs.fa" ftype="fasta"/>
113 <param name="coverage" value="coverage_stats.csv" ftype="csv"/>
114 <param name="align_cov" value="70" />
115 <param name="max_match" value="250" />
116 <param name="wind_min" value="5000" />
117 <param name="wind_nmax" value="200" />
118 <output name="curated_haplotigs" file="curated.haplotigs.fasta" ftype="fasta"/>
119 <output name="curated_sequences" file="curated.fasta" ftype="fasta"/>
120 <output name="curated_artefacts" file="curated.artefacts.fasta" ftype="fasta"/>
121 <output name="curated_reassignment" file="curated.reassignments_w_repeats.tsv" ftype="tsv"/>
122 <output name="curated_log" file="curated.contig_associations.log" ftype="txt"/>
123 <conditional name="additional">
124 <param name="optional_selector" value="use_additional_options"/>
125 <conditional name="with_repeat">
126 <param name="has_repeat" value="Yes"/>
127 <param name="repeat" value="repeats.bed"/>
128 </conditional>
129 <conditional name="create_dotplot">
130 <param name="include_dotplot" value="Yes"/>
131 <param name="dotplots" value="-dotplots"/>
132 <param name="aligned_bam" value="aligned.bam"/>
133 </conditional>
134 </conditional>
135 <output_collection name="output_pngs" type="list" count="5">
136 <element name="000002F" file="dotplots_reassigned_contigs/000002F.png" ftype="png">
137 <assert_content>
138 <has_size value="59559" delta="100"/>
139 </assert_content>
140 </element>
141 <element name="000000F_001" file="dotplots_reassigned_contigs/000000F_001.png" ftype="png">
142 <assert_contents>
143 <has_size value="31923" delta="100"/>
144 </assert_contents>
145 </element>
146 <element name="000000F_002" file="dotplots_reassigned_contigs/000000F_002.png" ftype="png">
147 <assert_contents>
148 <has_size value="42614" delta="100"/>
149 </assert_contents>
150 </element>
151 <element name="000000F_003" file="dotplots_reassigned_contigs/000000F_003.png" ftype="png">
152 <assert_contents>
153 <has_size value="47498" delta="100"/>
154 </assert_contents>
155 </element>
156 <element name="000000F_004" file="dotplots_reassigned_contigs/000000F_004.png" ftype="png">
157 <assert_contents>
158 <has_size value="32534" delta="100"/>
159 </assert_contents>
160 </element>
161 </output_collection>
162 </test>
163 </tests>
164 <help><![CDATA[
165
166 .. class:: infomark
167
168 **What it does**
169
170 Running the purging pipeline from the purge_haplotigs tool.
171
172 **Input**
173
174 - input file (g) : Genome assembly in fasta format
175 - input file (c) : Contig by contig coverage stats csv file from the previous step.
176
177 **Parameters**
178
179 *OPTIONAL*
180
181 - repeats : BED-format file of repeats to ignore during analysis.
182 - dotplots : Generate dotplots for manual inspection.
183 - bam : Samtools-indexed bam file of aligned and sorted reads/subreads to the reference, required for generating dotplots.
184
185 *ADVANCED*
186
187 - align_cov : Percent cutoff for identifying a contig as a haplotig. DEFAULT = 70
188 - max_match : Percent cutoff for identifying repetitive contigs. Ignored when using repeat annotations (-repeats). DEFAULT = 250
189 - I : Minimap2 indexing, drop minimisers every N bases, DEFAULT = 4G
190 - wind_min : Min window size for BED coverage plots (for dotplots). DEFAULT = 5000
191 - wind_nmax : Max windows per contig for BED coverage plots (for dotplots). DEFAULT = 200
192
193 **Output**
194
195 - curated.haplotigs.fasta
196 - curated.contig_associations.log
197 - curated.fasta
198 - curated.reassignments.tsv
199 - curated.artefacts.fasta
200
201 .. class:: infomark
202
203 **References**
204 ]]></help>
205 <citations>
206 <citation type="doi">DOI: 10.1186/s12859-018-2485-7</citation>
207 </citations>
208 </tool>