comparison cactus_export.xml @ 4:5bf688a3ee2c draft

planemo upload for repository https://github.com/usegalaxy-au/tools-au commit 2b4c7c63b0e4a1f730794a4a5825bce29ee2eb25
author galaxy-australia
date Wed, 09 Nov 2022 03:13:09 +0000
parents c18157c68134
children aaa0d6a8b808
comparison
equal deleted inserted replaced
3:d390fe1567dc 4:5bf688a3ee2c
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="xrefs"/> 6 <expand macro="xrefs"/>
7 <expand macro="requirements"/> 7 <expand macro="requirements"/>
8 <command detect_errors="exit_code"><![CDATA[ 8 <command detect_errors="exit_code"><![CDATA[
9 export TMPDIR=\${_GALAXY_JOB_TMP_DIR} &&
10
11 ## check if the reference level was specified
12 #if $export_select.format in ['maf_selector', 'vg_selector']:
13 #if $export_select.ref_level == '':
14 echo "You must provide a reference level" &&
15 exit 1
16 #end if
17 #end if
18
9 ln -s '$hal_file' alignment.hal 19 ln -s '$hal_file' alignment.hal
10 20
11 ## make a MAF 21 ## make a MAF
12 22 #if $export_select.format == 'maf_selector':
13 #if $enable_maf.maf_selector:
14 && 23 &&
15 hal2maf alignment.hal 24 hal2maf
16 #if str($enable_maf.ref_level): 25 --refGenome $export_select.ref_level
17 --refGenome $enable_maf.ref_level 26 alignment.hal
18 #end if
19 alignment.maf 27 alignment.maf
20 #end if 28 #end if
21 29
30 ## make an assemblyHub
31 #if $export_select.format == 'ah_selector':
32 &&
33 hal2assemblyHub.py
34 --maxCores \${GALAXY_SLOTS:-4}
35 --maxMemory \${GALAXY_MEMORY_MB:-8192}M
36 ./jobStore
37 alignment.hal
38 assemblyhub
39 &&
40 tar -cv assemblyhub > assemblyhub.tar
41 #end if
42
22 ## make a VG 43 ## make a VG
23 44 #if $export_select.format == 'vg_selector':
24 #if $vg_selector:
25 && 45 &&
26 hal2vg alignment.hal 46 hal2vg alignment.hal
27 --hdf5InMemory
28 --chop 32
29 --progress 47 --progress
30 > alignment.pg 48 > alignment.pg
31 #end if 49 #end if
32 50
33 ]]></command> 51 ]]></command>
34 <inputs> 52 <inputs>
35 <param name="hal_file" type="data" format="h5" label="HAL file" help="Multiple-genome alignment generated by Cactus" /> 53 <param name="hal_file" type="data" format="h5" label="HAL file" help="Multiple-genome alignment generated by Cactus" />
36 <conditional name="enable_maf"> 54 <conditional name="export_select">
37 <param name="maf_selector" type="boolean" checked="false" label="Generate a MAF file" /> 55 <param name="format" type="select" label="Output format" help="The type of output you want to export. Run this tool once for each output format.">
38 <when value="true"> 56 <option value="maf_selector" selected="true">MAF file</option>
39 <param name="ref_level" type="text" optional="True" value="" label="Optional: reference genome for MAF" help="Specify one of the Input Genomes as the reference level for the Multiple Alignment Format (MAF) file. This must match the label used in 'Genome Label'. If nothing is specified, the first Input Genome will be the reference genome in the MAF file. This option doesn't affect the HAL output." /> 57 <option value="ah_selector">Assembly Hub</option>
58 <option value="vg_selector">VG file</option>
59 </param>
60 <when value="maf_selector">
61 <param name="ref_level" type="text" value="" label="Reference genome" help="Specify one of the Input Genomes as the reference level. This must match the label used in 'Genome Label'." />
40 </when> 62 </when>
41 <when value="false"> 63 <when value="ah_selector">
64 </when>
65 <when value="vg_selector">
66 <param name="ref_level" type="text" value="" label="Reference genome" help="Specify one of the Input Genomes as the reference level. This must match the label used in 'Genome Label'." />
42 </when> 67 </when>
43 </conditional> 68 </conditional>
44 <param name="vg_selector" type="boolean" checked="false" label="Generate a VG file" />
45 </inputs> 69 </inputs>
46 <outputs> 70 <outputs>
47 <data name="out_maf" format="maf" from_work_dir="alignment.maf" label="${tool.name} on ${on_string} (MAF file)" > 71 <data name="out_maf" format="maf" from_work_dir="alignment.maf" label="${tool.name} on ${on_string} (MAF file)" >
48 <filter>enable_maf['maf_selector']</filter> 72 <filter>export_select['format'] == 'maf_selector'</filter>
49 </data> 73 </data>
50 <data name="out_vg" format="vg" from_work_dir="alignment.pg" label="${tool.name} on ${on_string} (VG file)" > 74 <data name="out_vg" format="vg" from_work_dir="alignment.pg" label="${tool.name} on ${on_string} (VG file)" >
51 <filter>vg_selector</filter> 75 <filter>export_select['format'] == 'vg_selector'</filter>
76 </data>
77 <data name="out_ah" format="tar" from_work_dir="assemblyhub.tar" label="${tool.name} on ${on_string} (Assembly Hub)" >
78 <filter>export_select['format'] == 'ah_selector'</filter>
52 </data> 79 </data>
53 </outputs> 80 </outputs>
54 <tests> 81 <tests>
82 <!-- this fails because no reference level is set -->
83 <test expect_num_outputs="1" expect_failure="true">
84 <conditional name="export_select">
85 <param name="format" value="maf_selector" />
86 </conditional>
87 <param name="hal_file" ftype="h5" value="evolverMammals.hal" />
88 </test>
55 <!-- within-species mode --> 89 <!-- within-species mode -->
56 <test expect_num_outputs="1"> 90 <test expect_num_outputs="1">
57 <conditional name="enable_maf"> 91 <conditional name="export_select">
58 <param name="maf_selector" value="true" />
59 </conditional>
60 <param name="hal_file" ftype="h5" value="evolverMammals.hal" />
61 <output name="out_maf" file="hal2maf.maf" />
62 </test>
63 <!-- set reference level -->
64 <test expect_num_outputs="1">
65 <conditional name="enable_maf">
66 <param name="maf_selector" value="true" />
67 <param name="ref_level" value="simMouse_chr6" /> 92 <param name="ref_level" value="simMouse_chr6" />
93 <param name="format" value="maf_selector" />
68 </conditional> 94 </conditional>
69 <param name="hal_file" ftype="h5" value="within.hal" /> 95 <param name="hal_file" ftype="h5" value="within.hal" />
70 <output name="out_maf" file="set_reference.maf" /> 96 <output name="out_maf" file="set_reference.maf" />
71 </test> 97 </test>
72 <!-- between-species, select reference level --> 98 <!-- between-species -->
73 <test expect_num_outputs="1"> 99 <test expect_num_outputs="1">
74 <conditional name="enable_maf"> 100 <conditional name="export_select">
75 <param name="maf_selector" value="true" />
76 <param name="ref_level" value="simMouse_chr6" /> 101 <param name="ref_level" value="simMouse_chr6" />
102 <param name="format" value="maf_selector" />
77 </conditional> 103 </conditional>
78 <param name="hal_file" ftype="h5" value="evolverMammals_noroot.hal" /> 104 <param name="hal_file" ftype="h5" value="evolverMammals_noroot.hal" />
79 <output name="out_maf" file="evolverMammals_noroot.maf" /> 105 <output name="out_maf" file="evolverMammals_noroot.maf" />
80 </test> 106 </test>
81 <!-- vg format --> 107 <!-- assembly hub format -->
82 <test expect_num_outputs="1"> 108 <test expect_num_outputs="1">
83 <param name="vg_selector" value="true" /> 109 <conditional name="export_select">
110 <param name="format" value="ah_selector" />
111 </conditional>
84 <param name="hal_file" ftype="h5" value="within.hal" /> 112 <param name="hal_file" ftype="h5" value="within.hal" />
85 <output name="out_vg"> 113 <output name="out_ah">
86 <assert_contents> 114 <assert_contents>
87 <has_size value="3586577" delta="200000" /> 115 <has_archive_member path="assemblyhub/hub.txt"/>
88 </assert_contents> 116 </assert_contents>
89 </output> 117 </output>
90 </test> 118 </test>
91 <!-- vg and maf with reference level --> 119 <!-- vg format -->
92 <test expect_num_outputs="2"> 120 <test expect_num_outputs="1">
93 <conditional name="enable_maf"> 121 <conditional name="export_select">
94 <param name="maf_selector" value="true" /> 122 <param name="format" value="vg_selector" />
95 <param name="ref_level" value="simMouse_chr6" /> 123 <param name="ref_level" value="simMouse_chr6" />
96 </conditional> 124 </conditional>
97 <param name="vg_selector" value="true" /> 125 <param name="hal_file" ftype="h5" value="within.hal" />
98 <param name="hal_file" ftype="h5" value="evolverMammals_noroot.hal" /> 126 <output name="out_vg">
99 <output name="out_maf" file="evolverMammals_both.maf" />
100 <output name="out_vg" >
101 <assert_contents> 127 <assert_contents>
102 <has_size value="53055101" delta="200000" /> 128 <has_size value="860452" delta="200000" />
103 </assert_contents> 129 </assert_contents>
104 </output> 130 </output>
105 </test> 131 </test>
106 <!-- gfa format (gfa2): not implemented --> 132 <!-- gfa format (gfa2): not implemented -->
107 </tests> 133 </tests>
118 from `Cactus <root?tool_id=cactus_cactus>`__. 144 from `Cactus <root?tool_id=cactus_cactus>`__.
119 145
120 **Output** 146 **Output**
121 147
122 Currently, you can export a pangenome in VG format, for use with 148 Currently, you can export a pangenome in VG format, for use with
123 `vg <https://github.com/vgteam/vg>`__, and/or Multiple Alignment Format 149 `vg <https://github.com/vgteam/vg>`__, or Multiple Alignment Format
124 (MAF). Note that MAF is **reference-based**, so it will contain 150 (MAF). Note that these files are **reference-based**, so it will contain
125 alignments to a single reference from your list of inputs (i.e. not a 151 alignments to a single reference from your list of inputs (i.e. not a
126 graph). By default, the first input genome will be used as the 152 graph). You have to provide this with the ‘reference genome’ option.
127 reference. You can override this with the ‘reference genome’ option. 153
154 You can also export an Assembly Hub for use with the UCSC Genome Browser.
128 ]]></help> 155 ]]></help>
129 <expand macro="citations"/> 156 <expand macro="citations"/>
130 </tool> 157 </tool>