Mercurial > repos > iuc > hyphy_bgm
diff macros.xml @ 36:ab9d1d5d5e29 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hyphy/ commit d97b1b98a3a621c93a7ed9e7db16bda47eefcb92
author | iuc |
---|---|
date | Tue, 07 Oct 2025 20:47:30 +0000 |
parents | 35723f87964d |
children |
line wrap: on
line diff
--- a/macros.xml Thu Mar 02 15:13:13 2023 +0000 +++ b/macros.xml Tue Oct 07 20:47:30 2025 +0000 @@ -1,12 +1,13 @@ <?xml version="1.0"?> <macros> - <token name="@TOOL_VERSION@">2.5.47</token> + <token name="@TOOL_VERSION@">2.5.83</token> <token name="@VERSION_SUFFIX@">0</token> - <token name="@PROFILE@">21.05</token> + <token name="@PROFILE@">24.0</token> + <token name="@SHELL_OPTIONS@">export TERM="vt100"; </token> <xml name="inputs"> - <param name="input_file" type="data" format="fasta,fasta.gz,nex" label="Input FASTA or NEXUS file" help="If the input file type is NEXUS and it includes a valid newick tree, that tree will override an uploaded newick tree" /> - <param name="input_nhx" type="data" format="nhx,newick" optional="true" label="Input newick file"/> + <param name="input_file" type="data" format="fasta,fasta.gz,nex" label="Input FASTA or NEXUS file" help="An in-frame codon alignment in one of the formats supported by HyPhy" /> + <param name="input_nhx" type="data" format="nhx,newick" optional="true" label="Input newick file; this will override any trees included in the file" help="A phylogenetic tree (optionally annotated with {})"/> </xml> <xml name="bio_tools"> <xrefs> @@ -15,17 +16,11 @@ </xml> <xml name="substitution" tokens="argument"> <param argument="@ARGUMENT@" type="select" label="Substitution model"> - <option value="GTR">GTR - General time reversible - model</option> <option value="LG">LG - Generalist empirical model from Le and Gascuel (2008)</option> - <option value="HIVBm">HIVBm - Specialist empirical model - for between-host HIV sequences</option> - <option value="HIVWm">HIVWm - Specialist empirical model - for within-host HIV sequences</option> <option value="WAG">WAG - Generalist empirical model from Whelan and Goldman (2001)</option> - <option value="JTT">JTT - Generalist empirical model from + <option value="JTT" selected="true">JTT - Generalist empirical model from Jones, Taylor, and Thornton (1996)</option> <option value="JC69">JC69 - Generalist empirical model from with equal exchangeability rates</option> @@ -37,12 +32,18 @@ for invertebrate mitochondrial genomes</option> <option value="gcpREV">gcpREV - Specialist empirical model for green plant chloroplast genomes</option> + <option value="HIVBm">HIVBm - Specialist empirical model + for between-host HIV sequences</option> + <option value="HIVWm">HIVWm - Specialist empirical model + for within-host HIV sequences</option> + <option value="GTR" selected="true">GTR - General time reversible + model</option> </param> </xml> <xml name="conditional_posteriorEstimationMethod"> <conditional name="posteriorEstimationMethod"> - <param argument="--method" type="select" label="Posterior estimation method"> + <param argument="--method" type="select" label="Posterior estimation method" help="The inference method to use for estimating the posterior distribution."> <option value="Variational-Bayes">0-th order Variational Bayes approximation</option> <option value="Metropolis-Hastings">Full Metropolis-Hastings MCMC algorithm</option> <option value="Collapsed-Gibbs">Collapsed Gibbs sampler</option> @@ -68,14 +69,14 @@ </token> <xml name="mcmc_options"> - <param argument="--chains" type="integer" value="5" min="2" max="20" label="Number of MCMC chains" /> - <param argument="--chain-length" type="integer" value="2000000" min="500000" max="50000000" label="Length of each chain" /> - <param argument="--burn-in" name="samples" type="integer" value="1000000" min="100000" max="1900000" label="Samples to use for burn-in" /> - <param argument="--samples" name="samples_per_chain" type="integer" value="100" min="50" max="1000000" label="Samples to draw from each chain" /> + <param argument="--chains" type="integer" value="5" min="2" max="20" label="Number of MCMC chains" help="The number of MCMC chains to run." /> + <param argument="--chain-length" type="integer" value="2000000" min="500000" max="50000000" label="Length of each chain" help="The length of each MCMC chain." /> + <param argument="--burn-in" name="samples" type="integer" value="1000000" min="100000" max="1900000" label="Samples to use for burn-in" help="The number of samples to discard from the beginning of each MCMC chain." /> + <param argument="--samples" name="samples_per_chain" type="integer" value="100" min="50" max="1000000" label="Samples to draw from each chain" help="The number of samples to draw from each MCMC chain after the burn-in period." /> </xml> <xml name="gencode"> - <param argument="--code" name="gencodeid" type="select" label="Genetic code"> + <param argument="--code" name="gencodeid" type="select" label="Genetic code" help="Which genetic code should be used"> <option value="Universal">Universal code</option> <option value="Vertebrate-mtDNA">Vertebrate mitochondrial DNA code</option> @@ -99,38 +100,129 @@ code</option> <option value="Blepharisma-Nuclear">Blepharisma Nuclear code</option> + <option value="Chlorophycean-mtDNA">Chlorophycean-mtDNA</option> + <option value="Trematode-mtDNA">Trematode-mtDNA</option> + <option value="Scenedesmus-obliquus-mtDNA">Scenedesmus-obliquus-mtDNA</option> + <option value="Thraustochytrium-mtDNA">Thraustochytrium-mtDNA</option> + <option value="Pterobranchia-mtDNA">Pterobranchia-mtDNA</option> + <option value="SR1-and-Gracilibacteria">SR1-and-Gracilibacteria</option> + <option value="Pachysolen-Nuclear">Pachysolen-Nuclear</option> + <option value="Mesodinium-Nuclear">Mesodinium-Nuclear</option> + <option value="Peritrich-Nuclear">Peritrich-Nuclear</option> + <option value="Cephalodiscidae-mtDNA">Cephalodiscidae-mtDNA</option> + </param> + </xml> + + <xml name="kill_zero_lengths_param"> + <param argument="--kill-zero-lengths" type="select" label="Kill zero-length branches" help="Automatically delete internal zero-length branches for computational efficiency"> + <option value="Yes" selected="true">Automatically delete internal zero-length branches for computational efficiency (will not affect results otherwise)</option> + <option value="Constrain">Keep zero-length branches, but constrain their values to 0</option> + <option value="No">Keep all branches</option> </param> </xml> <xml name="srv"> <conditional name="advanced" label="Advanced options"> - <param name="srv_options" type="select" label="Set advanced parameters" help="If these parameters are not set, RELAX will calculate appropriate values at runtime"> - <option value="defaults">Calculate</option> + <param name="srv_options" type="select" label="Advanced parameters" help="Use default values or specify advanced parameters"> + <option value="defaults">Use defaults</option> + <option value="specify">Specify values</option> + </param> + <when value="defaults" /> + <when value="specify"> + <param argument="--grid-size" type="integer" value="250" label="Points in the initial distributional guess for likelihood fitting" max="5000"/> + <param argument="--starting-points" type="integer" value="1" label="Initial random guesses to seed rate values optimization" help="The number of initial random guesses to seed rate values optimization" max="1000"/> + <param argument="--syn-rates" type="integer" min="1" max="10" value="3" label="Synonymous rate classes" /> + <param argument="--rates" type="integer" min="2" max="10" value="3" label="Non-synonymous rate classes" /> + <param argument="--srv" type="select" label="Include synonymous rate variation"> + <option value="No" selected="true">No</option> + <option value="Yes">Yes</option> + <option value="Branch-site">Branch-site</option> + <option value="HMM">HMM</option> + </param> + </when> + </conditional> + </xml> + + <xml name="busted_advanced_options"> + <conditional name="advanced" label="Advanced options"> + <param name="srv_options" type="select" label="Advanced parameters" help="Use default values or specify advanced parameters"> + <option value="defaults">Use defaults</option> <option value="specify">Specify values</option> </param> <when value="defaults" /> <when value="specify"> - <param argument="--grid-size" type="integer" value="250" label="Points in the initial distributional guess for likelihood fitting" /> - <param argument="--starting-points" type="integer" value="1" label="Initial random guesses to seed rate values optimization" /> - <param argument="--syn-rates" type="integer" min="1" max="10" value="3" label="Alpha rate classes to include in the model" /> - <param argument="--rates" type="integer" min="2" max="10" value="3" label="Omega rate classes to include in the model" /> - <param argument="--srv" type="boolean" truevalue="Yes" falsevalue="No" label="Include synonymous rate variation" /> - <param name="save_alternative_model" type="boolean" label="Save alternative model fit" /> + <param argument="--grid-size" type="integer" value="250" max="5000" label="Points in the initial distributional guess for likelihood fitting" help="The number of points in the initial distributional guess for likelihood fitting"/> + <param argument="--starting-points" type="integer" value="1" label="Initial random guesses to seed rate values optimization" help="The number of initial random guesses to seed rate values optimization" max="1000"/> + <param argument="--syn-rates" type="integer" min="1" max="10" value="3" label="Synonymous rate classes" help="The number of synonymous rate classes to include in the model [1-10, default 3]"/> + <param argument="--rates" type="integer" min="2" max="10" value="3" label="Non-synonymous rate classes" help="The number of non-synonymous rate classes to include in the model [1-10, default 3]"/> + <param argument="--multiple-hits" type="select" label="Multiple hits correction" help="Include support for multiple nucleotide substitutions"> + <option value="None">None</option> + <option value="Double">Double</option> + <option value="Double+Triple">Double and Triple</option> + </param> + <param argument="--error-sink" type="boolean" truevalue="Yes" falsevalue="No" label="Include a rate class for misalignment artifacts (experimental)" help="Include a rate class to capture misalignment artifacts" checked="true"/> + <param name="save_alternative_model" type="boolean" label="Save alternative model fit" help="Save BUSTED model fit to this file (default is not to save)"/> + <conditional name="mss"> + <param name="enabled" type="select" label="Include support for multiple synonymous rate class substitutions"> + <option value="false" selected="true">No</option> + <option value="true">Yes</option> + </param> + <when value="false"/> + <when value="true"> + <conditional name="mss_type_cond"> + <param name="mss_type" type="select" label="How to partition synonymous codons into classes"> + <option value="Full">Each set of codons mapping to the same amino-acid class have a separate substitution rate (Valine == neutral)</option> + <option value="SynREV">Each set of codons mapping to the same amino-acid class have a separate substitution rate (mean = 1)</option> + <option value="SynREV2">Each pair of synonymous codons mapping to the same amino-acid class and separated by a transition have a separate substitution rate (no rate scaling))</option> + <option value="SynREV2g">Each pair of synonymous codons mapping to the same amino-acid class and separated by a transition have a separate substitution rate (Valine == neutral). All between-class synonymous substitutions share a rate.</option> + <option value="SynREVCodon">Each codon pair that is exchangeable gets its own substitution rate (fully estimated, mean = 1)</option> + <option value="Random">Random partition (specify how many classes; largest class = neutral)</option> + <option value="Empirical">Load a TSV file with an empirical rate estimate for each codon pair</option> + <option value="File">Load a TSV partition from file (prompted for neutral class)</option> + <option value="Codon-file">Load a TSV partition for pairs of codons from a file (prompted for neutral class)</option> + </param> + <when value="Full"/> + <when value="SynREV"/> + <when value="SynREV2"/> + <when value="SynREV2g"/> + <when value="SynREVCodon"/> + <when value="Random"> + <param name="mss_classes" type="integer" value="2" label="How many codon rate classes"/> + </when> + <when value="Empirical"> + <param name="mss_file" type="data" format="tabular" label="File defining empirical rates for each pair of codons"/> + </when> + <when value="File"> + <param name="mss_file" type="data" format="tabular" label="File defining the model partition"/> + <param name="mss_neutral" type="text" value="neutral" label="Designation for the neutral substitution rate"/> + </when> + <when value="Codon-file"> + <param name="mss_file" type="data" format="tabular" label="File defining the model partition for pairs of codons"/> + <param name="mss_neutral" type="text" value="neutral" label="Designation for the neutral substitution rate"/> + </when> + </conditional> + </when> + </conditional> </when> </conditional> </xml> + <xml name="alternative_model_output"> + <data name="alternative_model" format="nex" from_work_dir="alternative_model.nhx" label="${tool.name} on ${on_string}: Alternative model"> + <filter>advanced_options.save_alternative_model == True</filter> + </data> + </xml> <xml name="branches"> <conditional name="branch_cond"> - <param argument="--branches" name="branch_sel" type="select" label="Set of branches to test"> + <param argument="--branches" name="branch_sel" type="select" label="Set of branches to test" help="Branches to test"> <option value="All">All branches</option> <option value="Internal">Internal branches</option> <option value="Leaves">Leaf branches</option> <option value="'Unlabeled-branches'">Unlabeled branches</option> - <option value="specify">Enter a branch label</option> + <option value="specify">Custom</option> </param> <when value="specify"> - <param name="branch_label" type="text" value="Test" optional="false" label="Branch label"> + <param name="branch_label" type="text" value="Test" optional="false" label="Branch label" help="The label for the branches to be tested. These labels are case-sensitive and must be present in the Newick tree in {label} format."> <sanitizer invalid_char=""> <valid initial="default" /> </sanitizer> @@ -154,58 +246,112 @@ <yield/> </requirements> </xml> - <xml name="alternative_model_output"> - <data name="alternative_model" format="nhx" from_work_dir="alternative_model.nhx" label="${tool.name} on ${on_string}: Alternative model"> - <filter>advanced['save_alternative_model']</filter> - </data> + <xml name="regex_sanitizer"> + <sanitizer> + <valid initial="string.ascii_letters,string.digits"> + <add value="^"/> + <add value="$"/> + <add value="("/> + <add value=")"/> + <add value="|"/> + <add value="?"/> + <add value="*"/> + <add value="+"/> + <add value="{"/> + <add value="-"/> + <add value="}"/> + <add value="\"/> + <add value="["/> + <add value="]"/> + <add value="."/> + <add value=","/> + </valid> + </sanitizer> + <validator type="empty_field" /> + <validator type="regex" message="Pattern must not end with backslash.">.*[^\\]$</validator> </xml> <xml name="resample"> - <param argument="--resample" type="integer" value="0" min="0" optional="true" label="Perform parametric bootstrap resampling to derive site-level null LRT distributions" help="Warning: This will result in a significantly slower analysis. This parameter specifies the maximum number of replicates per site." /> + <param argument="--resample" type="integer" value="0" min="0" optional="true" label="Perform parametric bootstrap resampling to derive site-level null LRT distributions" help="Warning: This will result in a significantly slower analysis. A value of 0 means no resampling is performed. This parameter specifies the maximum number of replicates per site." /> </xml> <token name="@resample@"><![CDATA[ #if $resample: --resample $resample #end if - ]]> - </token> + ]]></token> <token name="@INPUT_TREE@"><![CDATA[ #if $input_nhx: --tree input.nhx #end if - ]]> - </token> + ]]></token> <token name="@branch_options@"><![CDATA[ #if $branch_cond.branch_sel == 'specify': --branches '$branch_cond.branch_label' #else: --branches $branch_cond.branch_sel #end if - ]]> - </token> + ]]></token> <token name="@advanced_options@"><![CDATA[ + #if $advanced.srv_options == 'specify': + --grid-size $advanced.grid_size + --starting-points $advanced.starting_points + --syn-rates $advanced.syn_rates + --rates $advanced.rates + --srv '$advanced.srv' + #end if + ]]></token> + <token name="@busted_advanced_options_command@"><![CDATA[ #if $advanced.srv_options == 'specify': --grid-size $advanced.grid_size --starting-points $advanced.starting_points --syn-rates $advanced.syn_rates --rates $advanced.rates - --srv $advanced.srv + #if $advanced.multiple_hits != 'None': + --multiple-hits $advanced.multiple_hits + #end if + #if $advanced.error_sink: + --error-sink Yes + #end if #if $advanced.save_alternative_model: --save-fit alternative_model.nhx #end if + #if $advanced.mss.enabled == "true": + --mss Yes + --mss-type $advanced.mss.mss_type_cond.mss_type + #if $advanced.mss.mss_type_cond.mss_type == "Random": + --mss-classes $advanced.mss.mss_type_cond.mss_classes + #elif $advanced.mss.mss_type_cond.mss_type == "Empirical": + --mss-file $advanced.mss.mss_type_cond.mss_file + #elif $advanced.mss.mss_type_cond.mss_type == "File": + --mss-file $advanced.mss.mss_type_cond.mss_file + --mss-neutral $advanced.mss.mss_type_cond.mss_neutral + #elif $advanced.mss.mss_type_cond.mss_type == "Codon-file": + --mss-file $advanced.mss.mss_type_cond.mss_file + --mss-neutral $advanced.mss.mss_type_cond.mss_neutral + #end if + #end if #end if ]]></token> - <token name="@HYPHYMPI@">\${GALAXY_MPIRUN:-mpirun -mca orte_tmpdir_base "\${TMPDIR:-.}" -np \${GALAXY_SLOTS:-1}} HYPHYMPI</token> + <token name="@srv_options@"><![CDATA[ + #if $srv_conditional.srv_enabled == 'true': + --srv Yes + #if $srv_conditional.syn_rates: + --syn-rates $srv_conditional.syn_rates + #end if + #end if + ]]></token> + <token name="@HYPHYMPI@">\${GALAXY_MPIRUN:-mpirun --allow-run-as-root --oversubscribe -mca orte_tmpdir_base "\${TMPDIR:-.}" -np \${GALAXY_SLOTS:-1}} HYPHYMPI </token> + <token name="@HYPHYMP@">hyphy CPU=\${GALAXY_SLOTS:-4} </token> <token name="@ERRORS@"><![CDATA[ ; EC=\$? ; [[ -f errors.* ]] && cat errors.* >&2 ; exit \$EC ]]></token> - <token name="@HYPHY_ENVIRONMENT@"><![CDATA[ - export HYPHY=`which hyphy` && - export HYPHY_PATH=`dirname \$HYPHY` && - export HYPHY_LIB=`readlink -f \$HYPHY_PATH/../share/hyphy` &&]]></token> - <token name="@HYPHY_INVOCATION@"><![CDATA[ + <token name="@HYPHY_ENVIRONMENT@"> + export HYPHY=`which hyphy` && + export HYPHY_PATH=`dirname \$HYPHY` && + export HYPHY_LIB=`readlink -f \$HYPHY_PATH/../share/hyphy` &&</token> + <token name="@HYPHY_INVOCATION@"> @HYPHY_ENVIRONMENT@ hyphy LIBPATH=\$HYPHY_LIB - ]]></token> + </token> <token name="@SYMLINK_FILES@"><![CDATA[ #if $input_nhx is not None: ln -s '$input_nhx' input.nhx && @@ -213,4 +359,7 @@ ln -s '$input_file' input.$input_file.extension && #set $input_file = 'input.%s' % $input_file.extension ]]></token> + <token name="@SYMLINK_FILES_NO_TREE@"><![CDATA[ + ln -s '$input_file' input.$input_file.extension && + ]]></token> </macros>