Mercurial > repos > galaxy-australia > hapcut2
comparison hapcut2.xml @ 2:800f8086da7d draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc commit 908fb9148a3a116dbf7ccd16e0992e7882e748c2
author | iuc |
---|---|
date | Tue, 30 Apr 2024 08:38:15 +0000 |
parents | 271eb7f4b8bc |
children |
comparison
equal
deleted
inserted
replaced
1:271eb7f4b8bc | 2:800f8086da7d |
---|---|
1 <tool id="hapcut2" name="Hapcut2" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@+ga@GA_VERSION_SUFFIX@"> | 1 <tool id="hapcut2" name="Hapcut2" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="23.2"> |
2 <description> - haplotype assembly for diploid organisms</description> | 2 <description>haplotype assembly for diploid organisms</description> |
3 <macros> | |
4 <token name="@TOOL_VERSION@">1.3.4</token> | |
5 <token name="@VERSION_SUFFIX@">1</token> | |
6 <import>macros.xml</import> | |
7 </macros> | |
3 <xrefs> | 8 <xrefs> |
4 <xref type="bio.tools">hapcut2</xref> | 9 <xref type="bio.tools">hapcut2</xref> |
5 </xrefs> | 10 </xrefs> |
6 <macros> | |
7 <token name="@TOOL_VERSION@">1.3.3</token> | |
8 <token name="@VERSION_SUFFIX@">0</token> | |
9 <token name="@GA_VERSION_SUFFIX@">1</token> | |
10 </macros> | |
11 <requirements> | 11 <requirements> |
12 <requirement type="package" version="1.3.3">hapcut2</requirement> | 12 <requirement type="package" version="@TOOL_VERSION@">hapcut2</requirement> |
13 </requirements> | 13 </requirements> |
14 | |
15 <command detect_errors="exit_code"><![CDATA[ | 14 <command detect_errors="exit_code"><![CDATA[ |
16 | 15 |
17 ## Prep inputs | 16 ## Prep inputs |
18 ## ===================================================================== | 17 ## ===================================================================== |
19 ln -s '$input_bam' input.bam | 18 ln -s '$input_bam' input.bam |
20 && ln -s '$input_vcf' input.vcf | 19 && ln -s '$input_vcf' input.vcf |
21 | 20 |
21 ## Set reference genome if required | |
22 #if $optimization.choice in ['pacbio', 'ont']: | |
23 #if $optimization.reference_genome.source == 'index': | |
24 #set $ref_genome_path = $optimization.reference_genome.index.fields.path | |
25 #else | |
26 #set $ref_genome_path = $optimization.reference_genome.fasta | |
27 #end if | |
28 #end if | |
22 | 29 |
23 ## Run program | 30 ## Run program |
24 ## ===================================================================== | 31 ## ===================================================================== |
25 ## Extract variant fragments from alignment | 32 ## Extract variant fragments from alignment |
26 && extractHAIRS --bam input.bam --VCF input.vcf --out frags.dat | 33 && extractHAIRS --bam 'input.bam' --VCF 'input.vcf' --out frags.dat |
27 #if $optimization.choice == 'pacbio': | 34 #if $optimization.choice == 'pacbio': |
28 --pacbio 1 | 35 --pacbio 1 |
29 --ref '$optimization.reference_fasta' | 36 --ref '$ref_genome_path' |
30 #elif $optimization.choice == 'ont': | 37 #elif $optimization.choice == 'ont': |
31 --ont 1 | 38 --ont 1 |
32 --ref '$optimization.reference_fasta' | 39 --ref '$ref_genome_path' |
33 #elif $optimization.choice == 'hic': | 40 #elif $optimization.choice == 'hic': |
34 --HiC 1 | 41 --HiC 1 |
35 #end if | 42 #end if |
36 | 43 |
37 #if $advanced.minIS | 44 #if $advanced.minIS |
38 --minIS $advanced.minIS | 45 --minIS $advanced.minIS |
39 #end if | 46 #end if |
40 | 47 |
41 #if $advanced.maxIS | 48 #if $advanced.maxIS |
42 --maxIS $advanced.maxIS | 49 --maxIS $advanced.maxIS |
43 #end if | 50 #end if |
45 ## Create haplotype.out and haplotype.out.phased.VCF | 52 ## Create haplotype.out and haplotype.out.phased.VCF |
46 && HAPCUT2 --fragments frags.dat --VCF input.vcf --output haplotype.out | 53 && HAPCUT2 --fragments frags.dat --VCF input.vcf --output haplotype.out |
47 #if $optimization.choice == 'hic': | 54 #if $optimization.choice == 'hic': |
48 --HiC 1 | 55 --HiC 1 |
49 #end if | 56 #end if |
50 | |
51 ]]></command> | 57 ]]></command> |
52 | 58 |
53 <inputs> | 59 <inputs> |
54 <param name="input_bam" type="data" format="bam" label="Input BAM file"/> | 60 <param name="input_bam" argument="--bam" type="data" format="bam" label="Input BAM file" help="Coordinate-sorted BAM file"/> |
55 <param name="input_vcf" type="data" format="vcf" label="Input VCF file"/> | 61 <param name="input_vcf" argument="--VCF" type="data" format="vcf" label="Input VCF file" help="Variant file with genotypes for a single individual"/> |
56 | |
57 <conditional name="optimization"> | 62 <conditional name="optimization"> |
58 <!-- TODO: include 10X (requires extra processing step) --> | 63 <!-- TODO: include 10X (requires extra processing step) --> |
59 <param name="choice" type="select" display="radio" label="Optimization"> | 64 <param name="choice" type="select" display="radio" label="Optimization"> |
60 <option value="default" selected="true">Default</option> | 65 <option value="default" selected="true">Default</option> |
61 <option value="pacbio">Pacbio</option> | 66 <option value="pacbio">Pacbio</option> |
62 <option value="ont">Oxford Nanopore</option> | 67 <option value="ont">Oxford Nanopore</option> |
63 <option value="hic">Hi-C</option> | 68 <option value="hic">Hi-C</option> |
64 </param> | 69 </param> |
65 | 70 <when value="default"></when> |
66 <when value="pacbio"> | 71 <when value="pacbio"> |
67 <param name="reference_fasta" type="data" format="fasta" | 72 <expand macro="reference_genome_input"/> |
68 label="Reference genome fasta file" | |
69 help="The reference genome is required for long-read optimization." | |
70 /> | |
71 </when> | 73 </when> |
72 | |
73 <when value="ont"> | 74 <when value="ont"> |
74 <param name="reference_fasta" type="data" format="fasta" | 75 <expand macro="reference_genome_input"/> |
75 label="Reference genome fasta file" | |
76 help="The reference genome is required for long-read optimization." | |
77 /> | |
78 </when> | 76 </when> |
77 <when value="hic"></when> | |
79 </conditional> | 78 </conditional> |
80 | 79 |
81 <param name="output_phased" type="boolean" label="Output phased VCF file?" | 80 <param name="output_phased" type="boolean" label="Output phased VCF file?" checked="true" help="Output variant calls on the haplotype assembly"/> |
82 checked="true" | 81 <param name="output_fragments" type="boolean" label="Output fragments file?" help="Output fragments collected by extractHAIRS"/> |
83 help="Output variant calls on the haplotype assembly" | |
84 /> | |
85 <param name="output_fragments" type="boolean" label="Output fragments file?" | |
86 help="Output fragments collected by extractHAIRS" | |
87 /> | |
88 | |
89 | 82 |
90 <section name="advanced" title="Advanced parameters"> | 83 <section name="advanced" title="Advanced parameters"> |
91 <param name="maxIS" type="integer" label="Maximum insert size" | 84 <param argument="--maxIS" type="integer" label="Maximum insert size" optional="true" value="1000" min="0" help="Maximum insert size for a paired-end read to be considered as a single fragment for phasing"/> |
92 optional="true" value="1000" | 85 <param argument="--minIS" type="integer" label="Minimum insert size" optional="true" value="0" min="0" help="Minimum insert size for a paired-end read to be considered as a single fragment for phasing"/> |
93 help="Maximum insert size for a paired-end read to be considered as a single fragment for phasing." | |
94 /> | |
95 | |
96 <param name="minIS" type="integer" label="Minimum insert size" | |
97 optional="true" value="0" | |
98 help="Minimum insert size for a paired-end read to be considered as a single fragment for phasing." | |
99 /> | |
100 </section> | 86 </section> |
101 </inputs> | 87 </inputs> |
102 | 88 |
103 <outputs> | 89 <outputs> |
104 <data name="haplotype" format="txt" from_work_dir="haplotype.out" | 90 <data name="haplotype" format="txt" from_work_dir="haplotype.out" label="${tool.name} on ${on_string}: Haplotype block"/> |
105 label="${tool.name} on ${on_string}: Haplotype block" | 91 <data name="haplotype_phased" format="vcf" from_work_dir="haplotype.out.phased.VCF" label="${tool.name} on ${on_string}: Phased haplotype VCF"> |
106 /> | |
107 <data name="haplotype_phased" format="vcf" from_work_dir="haplotype.out.phased.VCF" | |
108 label="${tool.name} on ${on_string}: Phased haplotype VCF" | |
109 > | |
110 <filter>output_phased</filter> | 92 <filter>output_phased</filter> |
111 </data> | 93 </data> |
112 <data name="frags" format="txt" from_work_dir="frags.dat" | 94 <data name="frags" format="txt" from_work_dir="frags.dat" label="${tool.name} on ${on_string}: Fragments"> |
113 label="${tool.name} on ${on_string}: Fragments" | |
114 > | |
115 <filter>output_fragments</filter> | 95 <filter>output_fragments</filter> |
116 </data> | 96 </data> |
117 </outputs> | 97 </outputs> |
118 | 98 |
119 <tests> | 99 <tests> |
120 <test expect_num_outputs="3"> | 100 <!-- Defaults --> |
121 <param name="input_bam" ftype="bam" value="input.bam"/> | 101 <test expect_num_outputs="1"> |
122 <param name="input_vcf" ftype="vcf" value="input.vcf"/> | 102 <param name="input_bam" ftype="bam" value="input.bam"/> |
123 <param name="output_fragments" value="1"/> | 103 <param name="input_vcf" ftype="vcf" value="input.vcf"/> |
124 <param name="output_phased" value="1"/> | 104 <param name="output_fragments" value="0"/> |
125 <param name="optimization" value="default"/> | 105 <param name="output_phased" value="0"/> |
126 <output name="frags" ftype="txt" file="output_frag.dat"/> | 106 <conditional name="optimization"> |
127 <output name="haplotype" ftype="txt" file="output_haplotype.out"/> | 107 <param name="choice" value="default"/> |
128 <output name="haplotype_phased" ftype="vcf" file="output_haplotype.out.phased.vcf"/> | 108 </conditional> |
109 <output name="haplotype" ftype="txt" file="output_haplotype.out"/> | |
110 </test> | |
111 | |
112 <!-- Defaults with all outputs --> | |
113 <test expect_num_outputs="3"> | |
114 <param name="input_bam" ftype="bam" value="input.bam"/> | |
115 <param name="input_vcf" ftype="vcf" value="input.vcf"/> | |
116 <param name="output_fragments" value="1"/> | |
117 <param name="output_phased" value="1"/> | |
118 <conditional name="optimization"> | |
119 <param name="choice" value="default"/> | |
120 </conditional> | |
121 <output name="frags" ftype="txt" file="output_frag.dat"/> | |
122 <output name="haplotype" ftype="txt" file="output_haplotype.out"/> | |
123 <output name="haplotype_phased" ftype="vcf" file="output_haplotype.out.phased.vcf"/> | |
124 </test> | |
125 | |
126 <!-- Hi-C optimization --> | |
127 <test expect_num_outputs="3"> | |
128 <param name="input_bam" ftype="bam" value="input.bam"/> | |
129 <param name="input_vcf" ftype="vcf" value="input.vcf"/> | |
130 <param name="output_fragments" value="1"/> | |
131 <param name="output_phased" value="1"/> | |
132 <conditional name="optimization"> | |
133 <param name="choice" value="default"/> | |
134 </conditional> | |
135 <output name="frags" ftype="txt" file="output_frag.dat"/> | |
136 <output name="haplotype" ftype="txt" file="output_haplotype.out"/> | |
137 <output name="haplotype_phased" ftype="vcf" file="output_haplotype.out.phased.vcf"/> | |
138 </test> | |
139 | |
140 <!-- Pacbio optimization with ref genome --> | |
141 <test expect_num_outputs="3"> | |
142 <param name="input_bam" ftype="bam" value="input.bam"/> | |
143 <param name="input_vcf" ftype="vcf" value="input.vcf"/> | |
144 <param name="output_fragments" value="1"/> | |
145 <param name="output_phased" value="1"/> | |
146 <conditional name="optimization"> | |
147 <param name="choice" value="pacbio"/> | |
148 </conditional> | |
149 <conditional name="reference_genome"> | |
150 <param name="source" value="history"/> | |
151 </conditional> | |
152 <param name="fasta" ftype="fasta" value="ref.fasta"/> | |
153 <output name="frags" ftype="txt" file="output_frag.dat"/> | |
154 <output name="haplotype" ftype="txt" file="output_haplotype.out"/> | |
155 <output name="haplotype_phased" ftype="vcf" file="output_haplotype.out.phased.vcf"/> | |
156 </test> | |
157 | |
158 <!-- Oxford nanopore optimization with ref genome --> | |
159 <test expect_num_outputs="3"> | |
160 <param name="input_bam" ftype="bam" value="input.bam"/> | |
161 <param name="input_vcf" ftype="vcf" value="input.vcf"/> | |
162 <param name="output_fragments" value="1"/> | |
163 <param name="output_phased" value="1"/> | |
164 <output name="frags" ftype="txt" file="output_frag.dat"/> | |
165 <output name="haplotype" ftype="txt" file="output_haplotype.out"/> | |
166 <output name="haplotype_phased" ftype="vcf" file="output_haplotype.out.phased.vcf"/> | |
167 <conditional name="optimization"> | |
168 <param name="optimization" value="ont"/> | |
169 </conditional> | |
170 <conditional name="reference_genome"> | |
171 <param name="source" value="history"/> | |
172 </conditional> | |
173 <param name="fasta" ftype="fasta" value="ref.fasta"/> | |
129 </test> | 174 </test> |
130 </tests> | 175 </tests> |
131 | 176 |
132 <help><![CDATA[ | 177 <help><![CDATA[ |
133 .. class:: infomark | 178 .. class:: infomark |
170 | 215 |
171 See `HapCUT2 on GitHib <https://github.com/vibansal/HapCUT2>`_ for more detailed information. | 216 See `HapCUT2 on GitHib <https://github.com/vibansal/HapCUT2>`_ for more detailed information. |
172 | 217 |
173 ]]></help> | 218 ]]></help> |
174 <citations> | 219 <citations> |
175 <citation type="doi">https://doi.org/10.1101/gr.213462.116</citation> | 220 <citation type="doi">10.1101/gr.213462.116</citation> |
176 </citations> | 221 </citations> |
222 <expand macro="creator"/> | |
177 </tool> | 223 </tool> |