Mercurial > repos > iuc > fgbio_findswitchbackreads
diff macros.xml @ 0:9d593c42f037 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tool_collections/fgbio commit 88711b338e90adc003a90930a43df3315b2ece70
| author | iuc |
|---|---|
| date | Tue, 04 Nov 2025 12:26:56 +0000 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Tue Nov 04 12:26:56 2025 +0000 @@ -0,0 +1,101 @@ +<macros> + <xml name="requirements"> + <requirements> + <requirement type="package" version="@TOOL_VERSION@">fgbio</requirement> + <requirement type="package" version="1.22">samtools</requirement> + <yield/> + </requirements> + </xml> + <token name="@TOOL_VERSION@">2.1.0</token> + <token name="@VERSION_SUFFIX@">0</token> + <token name="@PROFILE@">22.05</token> + + <xml name="optional_reference" token_help="" token_argument=""> + <conditional name="addref_cond"> + <param name="addref_select" type="select" label="Use a reference sequence"> + <help>@HELP@</help> + <option value="no">No</option> + <option value="history">Use a genome/index from the history</option> + <option value="cached">Use a built-in genome</option> + </param> + <when value="no"/> + <when value="history"> + <param argument="@ARGUMENT@" type="data" format="fasta,fasta.gz" label="Reference"/> + </when> + <when value="cached"> + <param argument="@ARGUMENT@" type="select" label="Reference"> + <options from_data_table="fasta_indexes"> + <filter type="data_meta" ref="input" key="dbkey"/> + </options> + <validator type="no_options" message="No reference genome is available for the build associated with the selected input dataset"/> + </param> + </when> + </conditional> + </xml> + + <xml name="mandatory_reference" token_help="" token_argument=""> + <conditional name="addref_cond"> + <param name="addref_select" type="select" label="Use a reference sequence"> + <help>@HELP@</help> + <option value="history">Use a genome/index from the history</option> + <option value="cached">Use a built-in genome</option> + </param> + <when value="history"> + <param argument="@ARGUMENT@" type="data" format="fasta,fasta.gz" label="Reference"/> + </when> + <when value="cached"> + <param argument="@ARGUMENT@" type="select" label="Reference"> + <options from_data_table="fasta_indexes"> + <filter type="data_meta" ref="input" key="dbkey"/> + <validator message="No reference genome is available for the build associated with the selected input dataset" type="no_options" /> + </options> + </param> + </when> + </conditional> + </xml> + + <token name="@PREPARE_FASTA_IDX@"><![CDATA[ + #set use_ref=True + #if $addref_cond.addref_select == "history": + #if $addref_cond.ref.is_of_type('fasta'): + reffa="reference.fa" && + ln -s '${addref_cond.ref}' \$reffa && + samtools faidx \$reffa && + #else: + reffa="reference.fa.gz" && + ln -s '${addref_cond.ref}' \$reffa && + { + samtools faidx \$reffa || + { + echo "Failed to index compressed reference. Trying decompressed ..." 1>&2 && + gzip -dc \$reffa > reference.fa && + reffa="reference.fa" && + samtools faidx \$reffa; + } + } && + #end if + reffai=\$reffa.fai && + #elif $addref_cond.addref_select == "cached": + reffa='${addref_cond.ref.fields.path}' && + reffai=\$reffa.fai && + #else + #set use_ref=False + #end if + ]]></token> + + <xml name="citations"> + <citations> + <citation type="doi">10.5281/zenodo.16878970</citation> + </citations> + </xml> + + <xml name="version_command"> + <version_command><![CDATA[fgbio --version 2>&1 | grep Version]]></version_command> + </xml> + + <xml name="stdio"> + <stdio> + <exit_code range="1:" level="fatal" description="Error" /> + </stdio> + </xml> +</macros>
