comparison yahs.xml @ 0:d87433f2a54d draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/yahs commit 92823b21835509dde34557b6922e1b9a39311069
author iuc
date Wed, 29 Jun 2022 13:06:23 +0000
parents
children a3a92e30a727
comparison
equal deleted inserted replaced
-1:000000000000 0:d87433f2a54d
1 <tool id="yahs" name="YAHS" version="@VERSION@+galaxy@VERSION_SUFFIX@" profile="20.01">
2 <description>yet another HI-C scaffolding tool</description>
3 <macros>
4 <token name="@VERSION@">1.1a.2</token>
5 <token name="@VERSION_SUFFIX@">0</token>
6 </macros>
7 <requirements>
8 <requirement type="package" version="@VERSION@">yahs</requirement>
9 <requirement type="package" version="1.11">samtools</requirement>
10 <requirement type="package" version="3.9">python</requirement>
11 </requirements>
12 <command detect_errors="exit_code"><![CDATA[
13 #if $function.function_select == "yahs":
14 ln -s '$function.fasta' input.fasta &&
15 #if $function.bfile.ext == "bam":
16 ln -s '$function.bfile' input.bam &&
17 #else if $function.bfile.ext == "bed":
18 ln -s '$function.bfile' input.bed &&
19 #end if
20 #if $function.agp:
21 ln -s '$function.agp' input.agp &&
22 #end if
23 samtools faidx input.fasta &&
24 mkdir initial_break agp_out agp_break final_outs &&
25 yahs input.fasta
26 #if $function.bfile.ext == "bam":
27 input.bam
28 #else if $function.bfile.ext == "bed":
29 input.bed
30 #end if
31 #if $agp:
32 -a input.agp
33 #end if
34 #if $function.res:
35 -r $function.res
36 #end if
37 #if $function.enzyme_conditional.enzyme_options == 'preconfigured':
38 #if $function.enzyme_conditional.preconfigured_enzymes == 'dovetail'
39 -e 'GATC'
40 #else if $function.enzyme_conditional.preconfigured_enzymes == 'arima1'
41 -e 'GATC,GANTC'
42 #else
43 -e 'GATC,GANTC,CTNAG,TTAA'
44 #end if
45 #else if $function.enzyme_conditional.enzyme_options == 'specific':
46 -e '${function.enzyme_conditional.manual_enzyme}'
47 #end if
48 #if $function.length:
49 -l $function.length
50 #end if
51 #if $function.quality:
52 -q $function.quality
53 #end if
54 $function.no_contig_ec
55 $function.no_scaffold_ec
56 -o yahs_out &&
57 ls -lah &&
58 python '$__tool_directory__/move_files.py'
59 && ls -lah ./*
60 #else:
61 ln -s '$function.fasta' input.fasta &&
62 ln -s '$function.agp' input.agp &&
63 agp_to_fasta input.agp input.fasta
64 #if $function.length:
65 -l $function.length
66 #end if
67 -o output.fasta
68 #end if
69 ]]></command>
70 <inputs>
71 <conditional name="function">
72 <param name="function_select" type="select" label="Which function would you like to run?">
73 <option value="yahs">YAHS</option>
74 <option value="agp_to_fasta">AGP to fasta</option>
75 </param>
76 <when value="yahs">
77 <param name="fasta" type="data" format="fasta" label="Input contig sequences"/>
78 <param name="bfile" type="data" format="bam,bed" label="Alignment file of Hi-C reads to contigs"/>
79 <param name="agp" argument="-a" type="data" format="agp" optional="true" label="Input AGP file (for rescaffolding)"
80 help="You can specify a AGP format file to ask YaHS to do scaffolding with the scaffolds in the AGP file as the start point"/>
81 <param name="res" argument="-r" type="text" label="Resolutions" optional="true"
82 help="Comma separated, ascending list of range of resolutions with no spaces. Ex. 50000,100000,200000,500000,1000000,2000000,5000000. By default and the upper limit is automatically adjusted with the genome size"/>
83 <conditional name="enzyme_conditional">
84 <param name="enzyme_options" type="select" label="Restriction enzyme used in Hi-C experiment" help="Hi-C experiments can use different restriction enzymes.
85 The enzyme frequency in contigs is used to normalize the Hi-C interaction frequency. Note that you need to specify the actual
86 sequence of the cutting site for a restriction enzyme and not the enzyme name. You can also specify DNASE as an enzyme if you
87 use an enzyme-free prep, e.g. Omin-C.">
88 <option value="not_especified">Not especified</option>
89 <option value="preconfigured">Preconfigured restriction enzymes</option>
90 <option value="specific">Enter a specific sequence</option>
91 </param>
92 <when value="not_especified"/>
93 <when value="preconfigured">
94 <param name="preconfigured_enzymes" argument="-e" type="select" label="Preconfigured enzymes">
95 <option value="dovetail">Dovetail Chicago, Dovetail Hi-C or Phase: GATC</option>
96 <option value="arima1">Arima Hi-C 1.0: GATC, GANTC</option>
97 <option value="arima2">Arima Hi-C 2.0: GATC, GANTC, CTNAG, TTAA</option>
98 </param>
99 </when>
100 <when value="specific">
101 <param name="manual_enzyme" argument="-e" type="text" label="Restriction enzyme sequence(s)"
102 help="Restriction enzyme sequence. If multiple were used, include all as a comma separated list without spaces (ex. 'GATC,AAGCTT').">
103 <validator type="expression" message="Only alphabetical letters and the comma can be used in to define restriction enzym sequences.">value.replace(',', '').isalpha()</validator>
104 </param>
105 </when>
106 </conditional>
107 <param name="length" argument="-l" type="integer" label="Minimum contig length included for scaffolding" min="1" optional="true"/>
108 <param name="quality" argument="-q" type="integer" label="Minimum read mapping quality (for BAM input only)" min="1" optional="true"/>
109 <param argument="--no-contig-ec" type="boolean" label="Skip assembly error correction step" truevalue="--no-contig-ec" falsevalue="" help="Automatically active if AGP output is set"/>
110 <param argument="--no-scaffold-ec" type="boolean" label="Skip assembly/scaffolding error check each round" truevalue="--no-scaffold-ec" falsevalue="" help="Will also prevent any break.agp output files"/>
111 </when>
112 <when value="agp_to_fasta">
113 <param name="agp" type="data" format="agp" label="Input AGP file"/>
114 <param name="fasta" type="data" format="fasta" label="Contig fasta file"/>
115 <param name="length" type='integer' label="Output fasta line length" value="60" min="1"/>
116 </when>
117 </conditional>
118 </inputs>
119 <outputs>
120 <!-- INITIAL ROUNDS -->
121 <collection name="initial_agp_break" type="list" label="${tool.name} on ${on_string}: AGP initial break files">
122 <filter>function['function_select'] == "yahs"</filter>
123 <discover_datasets pattern="__name_and_ext__" directory="initial_break" ext="agp"/>
124 </collection>
125 <collection name="agp_break" type="list" label="${tool.name} on ${on_string}: AGP break files">
126 <filter> function['function_select'] == "yahs"</filter>
127 <discover_datasets pattern="__name_and_ext__" directory="agp_break" ext="agp"/>
128 </collection>
129 <collection name="agp_out" type="list" label="${tool.name} on ${on_string}: AGP scaffolding results files">
130 <filter>function['function_select'] == "yahs"</filter>
131 <discover_datasets pattern="__name_and_ext__" directory="agp_out" ext="agp"/>
132 </collection>
133 <!-- FINAL FILES -->
134 <data format="agp" name="final_agp_out" label="${tool.name} on ${on_string}: Final scaffolds agp output" from_work_dir="final_outs/yahs_out_scaffolds_final.agp">
135 <filter>function['function_select'] == "yahs"</filter>
136 </data>
137 <data format="fasta" name="final_fasta_out" label="${tool.name} on ${on_string}: Final scaffolds fasta output" from_work_dir="final_outs/yahs_out_scaffolds_final.fa">
138 <filter>function['function_select'] == "yahs"</filter>
139 </data>
140 <data format="fasta" name="fasta_from_agp" label="${tool.name} on ${on_string}: agp to fasta" from_work_dir="output.fasta">
141 <filter>function['function_select'] == "agp_to_fasta"</filter>
142 </data>
143 </outputs>
144 <tests>
145 <test expect_num_outputs="5">
146 <conditional name="function">
147 <param name="function_select" value="yahs"/>
148 <param name="fasta" value="test.fasta"/>
149 <param name="bfile" value="test.bed"/>
150 <param name="agp" value="test.agp"/>
151 <param name="res" value="50000,100000,150000,2000000,1000000"/>
152 </conditional>
153 <output name="final_agp_out" file="test_01_scaffolds_final.agp" ftype="agp"/>
154 <output name="final_fasta_out" file="test_01_scaffolds_final.fa" ftype="fasta"/>
155 <!-- COMMAND: yahs test.fasta test.bed -r 50000,100000,150000,2000000,1000000 -a test.agp -o test_1 -->
156 </test>
157 <test expect_num_outputs="5">
158 <conditional name="function">
159 <param name="function_select" value="yahs"/>
160 <param name="fasta" value="test.fasta"/>
161 <param name="bfile" value="test.bed"/>
162 <param name="no_contig_ec" value="--no-contig-ec"/>
163 <param name="no_scaffold_ec" value="--no-scaffold-ec"/>
164 </conditional>
165 <output name="final_agp_out" file="test_02_scaffolds_final.agp" ftype="agp"/>
166 <output name="final_fasta_out" file="test_02_scaffolds_final.fa" ftype="fasta"/>
167 <output_collection name="agp_break">
168 <element name="yahs_out_no_break" file="test_02_no_break.agp" ftype="agp"/>
169 </output_collection>
170 <!-- COMMAND: yahs test.fasta test.bed -\-no-contig-ec -\-no-scaffold-ec -o test_2 -->
171 </test>
172 <test expect_num_outputs="5">
173 <conditional name="function">
174 <param name="function_select" value="yahs"/>
175 <param name="fasta" value="test.fasta"/>
176 <param name="bfile" value="test.bam"/>
177 <param name="qual" value="10"/>
178 <param name="length" value="20"/>
179 <conditional name="enzyme_conditional">
180 <param name="enzyme_options" value="specific"/>
181 <param name="manual_enzyme" value="GATC,GANT"/>
182 </conditional>
183 </conditional>
184 <output name="final_agp_out" file="test_03_scaffolds_final.agp" ftype="agp"/>
185 <output name="final_fasta_out" file="test_03_scaffolds_final.fa" ftype="fasta"/>
186 <output_collection name="initial_agp_break">
187 <element name="yahs_out_inital_break_01" file="test_03_initial_break.agp" ftype="agp"/>
188 </output_collection>
189 <!-- COMMAND: yahs test.fasta test.bed -q 10 -l 20 -e 'GATC,GANT' -o test_3 -->
190 </test>
191 <test expect_num_outputs="5">
192 <conditional name="function">
193 <param name="function_select" value="yahs"/>
194 <param name="fasta" value="test.fasta"/>
195 <param name="bfile" value="test.bam"/>
196 <param name="qual" value="10"/>
197 <param name="length" value="20"/>
198 <conditional name="enzyme_conditional">
199 <param name="enzyme_options" value="preconfigured"/>
200 <param name="preconfigured_enzymes" value="arima1"/>
201 </conditional>
202 </conditional>
203 <output name="final_agp_out" file="test_03_scaffolds_final.agp" ftype="agp"/>
204 <output name="final_fasta_out" file="test_03_scaffolds_final.fa" ftype="fasta"/>
205 <output_collection name="initial_agp_break">
206 <element name="yahs_out_inital_break_01" file="test_04_initial_break.agp" ftype="agp"/>
207 </output_collection>
208 <!-- COMMAND: yahs test.fasta test.bed -q 10 -l 20 -e 'GATC,GANT' -o test_3 -->
209 </test>
210 <test expect_num_outputs="1">
211 <conditional name="function">
212 <param name="function_select" value="agp_to_fasta"/>
213 <param name="fasta" value="test.fasta"/>
214 <param name="agp" value="test.agp"/>
215 <param name="length" value="20"/>
216 </conditional>
217 <output name="fasta_from_agp" file="test_05.fasta" ftype="fasta"/>
218 <!-- COMMAND: agp_to_fasta teast.fasta test.agp -l 20 -o test_4 -->
219 </test>
220 </tests>
221 <help><![CDATA[
222 YaHS is scaffolding tool using Hi-C data. It relies on a new algothrim for contig joining detection which considers the topological distribution of Hi-C signals aiming to distingush real interaction signals from mapping nosies. YaHS has been tested in a wide range of genome assemblies. Compared to other Hi-C scaffolding tools, it usually generates more contiguous scaffolds - especially with a higher N90 and L90 statistics. It is also super fast - takes less than 5 minutes to reconstruct the human genome from an assembly of 5,483 contigs with ~45X Hi-C data.
223 ]]></help>
224 <citations>
225 <citation type="doi">10.5281/zenodo.5848772</citation>
226 </citations>
227 </tool>