Mercurial > repos > galaxy-australia > cactus_export
changeset 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 | d390fe1567dc |
children | 764845535798 |
files | cactus_export.xml macros.xml |
diffstat | 2 files changed, 76 insertions(+), 49 deletions(-) [+] |
line wrap: on
line diff
--- a/cactus_export.xml Tue Sep 20 05:36:18 2022 +0000 +++ b/cactus_export.xml Wed Nov 09 03:13:09 2022 +0000 @@ -6,26 +6,44 @@ <expand macro="xrefs"/> <expand macro="requirements"/> <command detect_errors="exit_code"><![CDATA[ + export TMPDIR=\${_GALAXY_JOB_TMP_DIR} && + + ## check if the reference level was specified + #if $export_select.format in ['maf_selector', 'vg_selector']: + #if $export_select.ref_level == '': + echo "You must provide a reference level" && + exit 1 + #end if + #end if + ln -s '$hal_file' alignment.hal ## make a MAF - - #if $enable_maf.maf_selector: + #if $export_select.format == 'maf_selector': && - hal2maf alignment.hal - #if str($enable_maf.ref_level): - --refGenome $enable_maf.ref_level - #end if + hal2maf + --refGenome $export_select.ref_level + alignment.hal alignment.maf #end if - ## make a VG + ## make an assemblyHub + #if $export_select.format == 'ah_selector': + && + hal2assemblyHub.py + --maxCores \${GALAXY_SLOTS:-4} + --maxMemory \${GALAXY_MEMORY_MB:-8192}M + ./jobStore + alignment.hal + assemblyhub + && + tar -cv assemblyhub > assemblyhub.tar + #end if - #if $vg_selector: + ## make a VG + #if $export_select.format == 'vg_selector': && hal2vg alignment.hal - --hdf5InMemory - --chop 32 --progress > alignment.pg #end if @@ -33,73 +51,81 @@ ]]></command> <inputs> <param name="hal_file" type="data" format="h5" label="HAL file" help="Multiple-genome alignment generated by Cactus" /> - <conditional name="enable_maf"> - <param name="maf_selector" type="boolean" checked="false" label="Generate a MAF file" /> - <when value="true"> - <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." /> + <conditional name="export_select"> + <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."> + <option value="maf_selector" selected="true">MAF file</option> + <option value="ah_selector">Assembly Hub</option> + <option value="vg_selector">VG file</option> + </param> + <when value="maf_selector"> + <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'." /> </when> - <when value="false"> + <when value="ah_selector"> + </when> + <when value="vg_selector"> + <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'." /> </when> </conditional> - <param name="vg_selector" type="boolean" checked="false" label="Generate a VG file" /> </inputs> <outputs> <data name="out_maf" format="maf" from_work_dir="alignment.maf" label="${tool.name} on ${on_string} (MAF file)" > - <filter>enable_maf['maf_selector']</filter> + <filter>export_select['format'] == 'maf_selector'</filter> </data> <data name="out_vg" format="vg" from_work_dir="alignment.pg" label="${tool.name} on ${on_string} (VG file)" > - <filter>vg_selector</filter> + <filter>export_select['format'] == 'vg_selector'</filter> + </data> + <data name="out_ah" format="tar" from_work_dir="assemblyhub.tar" label="${tool.name} on ${on_string} (Assembly Hub)" > + <filter>export_select['format'] == 'ah_selector'</filter> </data> </outputs> <tests> - <!-- within-species mode --> - <test expect_num_outputs="1"> - <conditional name="enable_maf"> - <param name="maf_selector" value="true" /> + <!-- this fails because no reference level is set --> + <test expect_num_outputs="1" expect_failure="true"> + <conditional name="export_select"> + <param name="format" value="maf_selector" /> </conditional> <param name="hal_file" ftype="h5" value="evolverMammals.hal" /> - <output name="out_maf" file="hal2maf.maf" /> </test> - <!-- set reference level --> + <!-- within-species mode --> <test expect_num_outputs="1"> - <conditional name="enable_maf"> - <param name="maf_selector" value="true" /> + <conditional name="export_select"> <param name="ref_level" value="simMouse_chr6" /> + <param name="format" value="maf_selector" /> </conditional> <param name="hal_file" ftype="h5" value="within.hal" /> <output name="out_maf" file="set_reference.maf" /> </test> - <!-- between-species, select reference level --> + <!-- between-species --> <test expect_num_outputs="1"> - <conditional name="enable_maf"> - <param name="maf_selector" value="true" /> + <conditional name="export_select"> <param name="ref_level" value="simMouse_chr6" /> + <param name="format" value="maf_selector" /> </conditional> <param name="hal_file" ftype="h5" value="evolverMammals_noroot.hal" /> <output name="out_maf" file="evolverMammals_noroot.maf" /> </test> - <!-- vg format --> + <!-- assembly hub format --> <test expect_num_outputs="1"> - <param name="vg_selector" value="true" /> + <conditional name="export_select"> + <param name="format" value="ah_selector" /> + </conditional> <param name="hal_file" ftype="h5" value="within.hal" /> - <output name="out_vg"> + <output name="out_ah"> <assert_contents> - <has_size value="3586577" delta="200000" /> + <has_archive_member path="assemblyhub/hub.txt"/> </assert_contents> </output> </test> - <!-- vg and maf with reference level --> - <test expect_num_outputs="2"> - <conditional name="enable_maf"> - <param name="maf_selector" value="true" /> + <!-- vg format --> + <test expect_num_outputs="1"> + <conditional name="export_select"> + <param name="format" value="vg_selector" /> <param name="ref_level" value="simMouse_chr6" /> </conditional> - <param name="vg_selector" value="true" /> - <param name="hal_file" ftype="h5" value="evolverMammals_noroot.hal" /> - <output name="out_maf" file="evolverMammals_both.maf" /> - <output name="out_vg" > + <param name="hal_file" ftype="h5" value="within.hal" /> + <output name="out_vg"> <assert_contents> - <has_size value="53055101" delta="200000" /> + <has_size value="860452" delta="200000" /> </assert_contents> </output> </test> @@ -120,11 +146,12 @@ **Output** Currently, you can export a pangenome in VG format, for use with -`vg <https://github.com/vgteam/vg>`__, and/or Multiple Alignment Format -(MAF). Note that MAF is **reference-based**, so it will contain +`vg <https://github.com/vgteam/vg>`__, or Multiple Alignment Format +(MAF). Note that these files are **reference-based**, so it will contain alignments to a single reference from your list of inputs (i.e. not a -graph). By default, the first input genome will be used as the -reference. You can override this with the ‘reference genome’ option. +graph). You have to provide this with the ‘reference genome’ option. + +You can also export an Assembly Hub for use with the UCSC Genome Browser. ]]></help> <expand macro="citations"/> </tool>
--- a/macros.xml Tue Sep 20 05:36:18 2022 +0000 +++ b/macros.xml Wed Nov 09 03:13:09 2022 +0000 @@ -1,8 +1,8 @@ <macros> - <token name="@TOOL_VERSION@">2.2.1</token> - <token name="@VERSION_SUFFIX@">1</token> + <token name="@TOOL_VERSION@">2.2.4</token> + <token name="@VERSION_SUFFIX@">0</token> <token name="@PROFILE@">20.09</token> - <token name="@DIGEST@">e871d782967a66d29488e4f6971aafb4568407f6d6833010bb521cba79e61500</token> + <token name="@DIGEST@">b22eb2ef1d8c6f152d12d0e4300ac68affea5aafb2f7022f9078e8e72e41654d</token> <xml name="requirements"> <requirements> <!-- Cactus is not in bioconda -->