Mercurial > repos > iuc > hyphy_absrel
comparison hyphy_absrel.xml @ 36:16093bcfe525 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:43:05 +0000 |
| parents | aa96474b3a87 |
| children |
comparison
equal
deleted
inserted
replaced
| 35:aa96474b3a87 | 36:16093bcfe525 |
|---|---|
| 6 <expand macro="bio_tools"/> | 6 <expand macro="bio_tools"/> |
| 7 <expand macro="requirements"/> | 7 <expand macro="requirements"/> |
| 8 <command detect_errors="exit_code"><![CDATA[ | 8 <command detect_errors="exit_code"><![CDATA[ |
| 9 @SYMLINK_FILES@ | 9 @SYMLINK_FILES@ |
| 10 ln -s '$absrel_output' ${input_file}.aBSREL.json && | 10 ln -s '$absrel_output' ${input_file}.aBSREL.json && |
| 11 @HYPHYMPI@ absrel | 11 @HYPHYMP@ absrel |
| 12 --alignment ./$input_file | 12 --alignment ./$input_file |
| 13 @INPUT_TREE@ | 13 @INPUT_TREE@ |
| 14 --code '$gencodeid' | 14 --code '$gencodeid' |
| 15 @branch_options@ | 15 @branch_options@ |
| 16 --output '$absrel_output' | 16 --output '$absrel_output' |
| 17 --multiple-hits $multiple_hits | 17 --multiple-hits $multiple_hits |
| 18 $srv | 18 @srv_options@ |
| 19 --blb $blb | |
| 20 --kill-zero-lengths $kill_zero_lengths > absrel_stdout.md | |
| 19 @ERRORS@ | 21 @ERRORS@ |
| 20 ]]></command> | 22 ]]></command> |
| 21 <inputs> | 23 <inputs> |
| 22 <expand macro="inputs"/> | 24 <expand macro="inputs"/> |
| 23 <expand macro="gencode"/> | 25 <expand macro="gencode"/> |
| 24 <param argument="--multiple-hits" type="select" label="Include support for multiple nucleotide substitutions"> | |
| 25 <option value="None">Use standard models which permit only single nucleotide changes to occur instantly</option> | |
| 26 <option value="Double">Include branch-specific rates for double nucleotide substitutions</option> | |
| 27 <option value="Double+Triple">Include branch-specific rates for double and triple nucleotide substitutions</option> | |
| 28 </param> | |
| 29 <param argument="--srv" type="boolean" truevalue="--srv Yes" falsevalue="" label="Include synonymous rate variation" /> | |
| 30 <expand macro="branches"/> | 26 <expand macro="branches"/> |
| 27 <section name="advanced_options" title="Advanced Options" expanded="false"> | |
| 28 <param argument="--multiple-hits" type="select" label="Include support for multiple nucleotide substitutions" help="Include support for multiple nucleotide substitutions."> | |
| 29 <option value="Double">Include branch-specific rates for double nucleotide substitutions</option> | |
| 30 <option value="Double+Triple">Include branch-specific rates for double and triple nucleotide substitutions</option> | |
| 31 <option value="None" selected="true">Use standard models which permit only single nucleotide changes to occur instantly</option> | |
| 32 </param> | |
| 33 <param argument="--blb" type="float" value="1.0" label="Bag of little bootstrap alignment resampling rate" help="[Advanced option] Bag of Little Bootstraps (BLB) alignment resampling rate (default: 1.0). This parameter controls the fraction of sites to resample for each bootstrap replicate. BLB uses down/upsampling approaches to speed up inference for very long alignments by analyzing subsets of the data."/> | |
| 34 <conditional name="srv_conditional"> | |
| 35 <param name="srv_enabled" type="select" label="Include synonymous rate variation" help="Include synonymous rate variation."> | |
| 36 <option value="true" selected="true">Yes</option> | |
| 37 <option value="false">No</option> | |
| 38 </param> | |
| 39 <when value="true"> | |
| 40 <param argument="--syn-rates" type="integer" value="3" min="1" max="10" label="Synonymous rate classes" help="The number of alpha rate classes to include in the model [1-10, default 3]"/> | |
| 41 </when> | |
| 42 <when value="false"> | |
| 43 </when> | |
| 44 </conditional> | |
| 45 <expand macro="kill_zero_lengths_param"/> | |
| 46 </section> | |
| 31 </inputs> | 47 </inputs> |
| 32 <outputs> | 48 <outputs> |
| 49 <data name="absrel_md_report" format="markdown" from_work_dir="absrel_stdout.md" label="aBSREL Report (Markdown) for ${tool.name} on ${on_string}" /> | |
| 33 <data name="absrel_output" format="hyphy_results.json" /> | 50 <data name="absrel_output" format="hyphy_results.json" /> |
| 34 </outputs> | 51 </outputs> |
| 35 <tests> | 52 <tests> |
| 36 <test> | 53 <test expect_num_outputs="2"> |
| 37 <param name="input_file" ftype="fasta" value="absrel-in1.fa"/> | 54 <param name="input_file" ftype="fasta" value="absrel-in1.fa"/> |
| 38 <param name="input_nhx" ftype="nhx" value="absrel-in1.nhx"/> | 55 <param name="input_nhx" ftype="nhx" value="absrel-in1.nhx"/> |
| 39 <param name="multiple_hits" value="None" /> | |
| 40 <output name="absrel_output"> | 56 <output name="absrel_output"> |
| 41 <assert_contents> | 57 <assert_contents> |
| 42 <has_size value="10512" delta="100"/> | |
| 43 <has_text text="fits"/> | 58 <has_text text="fits"/> |
| 44 <has_text text="branch attributes"/> | 59 <has_text text="branch attributes"/> |
| 45 <has_text text="Full adaptive model"/> | 60 <has_text text="Full adaptive model"/> |
| 46 </assert_contents> | 61 </assert_contents> |
| 47 </output> | 62 </output> |
| 48 <assert_stdout> | 63 <output name="absrel_md_report"> |
| 49 <has_text text="found **2** branches under selection among **5** tested"/> | 64 <assert_contents> |
| 50 </assert_stdout> | 65 <has_text text="found **1** branches under selection among **5** tested"/> |
| 66 </assert_contents> | |
| 67 </output> | |
| 51 </test> | 68 </test> |
| 52 <test> | 69 <test expect_num_outputs="2"> |
| 53 <param name="input_file" ftype="fasta" value="absrel-in1.fa"/> | 70 <param name="input_file" ftype="fasta" value="absrel-in1.fa"/> |
| 54 <param name="input_nhx" ftype="nhx" value="absrel-in1.nhx"/> | 71 <param name="input_nhx" ftype="nhx" value="absrel-in1.nhx"/> |
| 55 <param name="multiple_hits" value="Double" /> | 72 <section name="advanced_options"> |
| 73 <param name="multiple_hits" value="Double" /> | |
| 74 </section> | |
| 56 <output name="absrel_output"> | 75 <output name="absrel_output"> |
| 57 <assert_contents> | 76 <assert_contents> |
| 58 <has_size value="11117" delta="100"/> | |
| 59 <has_text text="fits"/> | 77 <has_text text="fits"/> |
| 60 <has_text text="branch attributes"/> | 78 <has_text text="branch attributes"/> |
| 61 <has_text text="Full adaptive model"/> | 79 <has_text text="Full adaptive model"/> |
| 62 </assert_contents> | 80 </assert_contents> |
| 63 </output> | 81 </output> |
| 64 <assert_stdout> | 82 <output name="absrel_md_report"> |
| 65 <has_text text="found **0** branches under selection among **5** tested"/> | 83 <assert_contents> |
| 66 </assert_stdout> | 84 <has_text text="found **0** branches under selection among **5** tested"/> |
| 85 <has_text text="Branch-level rate at which 2 nucleotides are changed instantly"/> | |
| 86 </assert_contents> | |
| 87 </output> | |
| 67 </test> | 88 </test> |
| 68 <test> | 89 <test expect_num_outputs="2"> |
| 69 <param name="input_file" ftype="fasta" value="absrel-in1.fa"/> | 90 <param name="input_file" ftype="fasta" value="absrel-in1.fa"/> |
| 70 <param name="input_nhx" ftype="nhx" value="absrel-in1.nhx"/> | 91 <param name="input_nhx" ftype="nhx" value="absrel-in1.nhx"/> |
| 71 <param name="multiple_hits" value="Double" /> | 92 <section name="advanced_options"> |
| 72 <param name="srv" value="true" /> | 93 <param name="multiple_hits" value="Double" /> |
| 94 <conditional name="srv_conditional"> | |
| 95 <param name="srv_enabled" value="true" /> | |
| 96 </conditional> | |
| 97 </section> | |
| 73 <output name="absrel_output"> | 98 <output name="absrel_output"> |
| 74 <assert_contents> | 99 <assert_contents> |
| 75 <has_size value="23396" delta="100"/> | |
| 76 <has_text text="fits"/> | 100 <has_text text="fits"/> |
| 77 <has_text text="branch attributes"/> | 101 <has_text text="branch attributes"/> |
| 78 <has_text text="Full adaptive model"/> | 102 <has_text text="Full adaptive model"/> |
| 79 </assert_contents> | 103 </assert_contents> |
| 80 </output> | 104 </output> |
| 81 <assert_stdout> | 105 <output name="absrel_md_report"> |
| 82 <has_text text="found **0** branches under selection among **5** tested"/> | 106 <assert_contents> |
| 83 </assert_stdout> | 107 <has_text text="found **0** branches under selection among **5** tested"/> |
| 84 </test> | 108 <has_text text="Branch-level rate at which 2 nucleotides are changed instantly"/> |
| 109 <has_text text="The following rate distribution for site-to-site **synonymous** rate variation was inferred"/> | |
| 110 </assert_contents> | |
| 111 </output> | |
| 112 </test> | |
| 85 </tests> | 113 </tests> |
| 86 <help><![CDATA[ | 114 <help><![CDATA[ |
| 87 | 115 aBSREL: Adaptive Branch-Site Random Effects Likelihood |
| 88 aBSREL : Adaptive Branch-Site Random Effects Likelihood | 116 ====================================================== |
| 89 ======================================================= | 117 |
| 90 | 118 **What question does this method answer?** |
| 91 What question does this method answer? | 119 |
| 92 -------------------------------------- | 120 aBSREL (adaptive Branch-Site Random Effects Likelihood) is a powerful method for detecting episodic positive selection. It identifies instances where a proportion of sites along specific branches or lineages of a phylogeny have undergone positive selection. |
| 93 | 121 |
| 94 Is some proportion of sites is subject to positive selection along specific branches or lineages of a phylogeny? | 122 **Recommended Applications** |
| 95 | 123 |
| 96 Recommended Applications | 124 1. **Detecting Episodic Diversifying Selection:** Ideal for exploratory testing to find evidence of lineage-specific positive diversifying selection in alignments of various sizes. |
| 97 ------------------------ | 125 2. **Targeted Branch Testing:** Suitable for targeted testing of branches hypothesized to be under positive selection, even in alignments that would be computationally prohibitive for older branch-site models. |
| 98 | 126 |
| 99 1. Exploratory testing for evidence of lineage-specific positive diversifying selection in small to medium sized alignments (up to 100 sequences). | 127 **Methodology** |
| 100 2. Targeted testing of branches selected a priori for positive diversifying selection, including alignments with prohibitive runtimes under older branch-site models (up to 1,000 sequences) | 128 |
| 101 | 129 aBSREL is an adaptive branch-site random effects likelihood model that allows the dN/dS ratio to vary across sites and branches. The key innovation of aBSREL is its adaptive nature: it infers the optimal number of dN/dS rate classes for each branch, providing a more nuanced and powerful test for positive selection compared to traditional fixed-rate models. |
| 102 Brief description | 130 |
| 103 ----------------- | 131 **The Intuition** |
| 104 | 132 |
| 105 aBSREL (Adaptive branch-site random effects likelihood) uses an adaptive | 133 Imagine a gene evolving across a phylogeny. On some branches, the gene might be under strong purifying selection, with most non-synonymous mutations being deleterious. On other branches, the gene might be evolving neutrally. And on a few key branches, the gene might be under positive selection, with non-synonymous mutations providing a fitness advantage. |
| 106 random effects branch-site model framework to test whether each branch | 134 |
| 107 has evolved under positive selection, using a procedure which infers an | 135 Traditional branch-site models test for positive selection by fitting a model with a fixed number of dN/dS rate classes to each branch. This can be problematic because the evolutionary process is not always so uniform. Some branches might have a simple evolutionary history that can be described by one or two dN/dS rates, while others might have a more complex history that requires more rate classes. |
| 108 optimal number of rate categories per branch. | 136 |
| 109 | 137 aBSREL addresses this by starting with a simple model for each branch and incrementally adding more rate classes until the model fit no longer improves. This "adaptive" approach allows the model to tailor itself to the complexity of the evolutionary process on each branch, leading to a more accurate and powerful test for positive selection. |
| 110 | 138 |
| 111 Input | 139 **The Test** |
| 112 ----- | 140 |
| 141 For each branch, aBSREL performs a likelihood ratio test to determine if a model that allows for positive selection (i.e., a dN/dS ratio > 1) is a significantly better fit than a model that does not. The p-values from these tests are then corrected for multiple testing to identify branches that show statistically significant evidence of positive selection. | |
| 142 | |
| 143 **Input** | |
| 113 | 144 |
| 114 1. A *FASTA* sequence alignment. | 145 1. A *FASTA* sequence alignment. |
| 115 2. A phylogenetic tree in the *Newick* format | 146 2. A phylogenetic tree in the *Newick* format |
| 116 | 147 |
| 117 Note: the names of sequences in the alignment must match the names of the sequences in the tree. | 148 Note: the names of sequences in the alignment must match the names of the sequences in the tree. |
| 118 | 149 |
| 119 | 150 |
| 120 Output | 151 **Output** |
| 121 ------ | |
| 122 | 152 |
| 123 A JSON file with analysis results (http://hyphy.org/resources/json-fields.pdf). | 153 A JSON file with analysis results (http://hyphy.org/resources/json-fields.pdf). |
| 124 | 154 |
| 125 For each tested branch the analysis will infer the appropriate number of selective regimes, | 155 For each tested branch the analysis will infer the appropriate number of selective regimes, |
| 126 and whether or not there is statistical evidence of positive selection on that branch. | 156 and whether or not there is statistical evidence of positive selection on that branch. |
| 127 | 157 |
| 128 A custom visualization module for viewing these results is available (see http://vision.hyphy.org/aBSREL for an example) | 158 A custom visualization module for viewing these results is available (see http://vision.hyphy.org/aBSREL for an example) |
| 129 | 159 |
| 130 Further reading | 160 **Further reading** |
| 131 --------------- | |
| 132 | 161 |
| 133 http://hyphy.org/methods/selection-methods/#absrel | 162 http://hyphy.org/methods/selection-methods/#absrel |
| 134 | 163 |
| 135 | 164 |
| 136 Tool options | 165 **Tool options** |
| 137 ------------ | |
| 138 :: | 166 :: |
| 139 | 167 |
| 140 | 168 --alignment [required] An in-frame codon alignment in one of the formats supported by HyPhy |
| 141 --code Which genetic code to use | 169 |
| 170 --tree [conditionally required] A phylogenetic tree (optionally annotated with {}) | |
| 171 | |
| 172 --code Which genetic code to use (see tool form for available options) | |
| 142 | 173 |
| 143 --branches Which branches should be tested for selection? | 174 --branches Which branches should be tested for selection? |
| 144 All [default] : test all branches | 175 All [default] |
| 145 | 176 Internal |
| 146 Internal : test only internal branches (suitable for | 177 Leaves |
| 147 intra-host pathogen evolution for example, where terminal branches | 178 Unlabeled branches |
| 148 may contain polymorphism data) | 179 Custom : Enter a branch label |
| 149 | 180 |
| 150 Leaves: test only terminal (leaf) branches | 181 --multiple-hits Include support for multiple nucleotide substitutions |
| 151 | 182 Double : Include branch-specific rates for double nucleotide substitutions |
| 152 Unlabeled: if the Newick string is labeled using the {} notation, | 183 Double+Triple : Include branch-specific rates for double and triple nucleotide substitutions |
| 153 test only branches without explicit labels | 184 None [default] : Use standard models which permit only single nucleotide changes to occur instantly |
| 154 (see http://hyphy.org/tutorials/phylotree/) | 185 |
| 186 --srv Include synonymous rate variation (default: No) | |
| 187 If Yes, then: | |
| 188 --syn-rates The number alpha rate classes to include in the model [1-10, default 3] | |
| 189 | |
| 190 --blb [Advanced option] Bag of Little Bootstraps (BLB) alignment resampling rate (default: 1.0). This parameter controls the fraction of sites to resample for each bootstrap replicate. BLB uses down/upsampling approaches to speed up inference for very long alignments by analyzing subsets of the data. For more details, see https://www.nature.com/articles/s43588-021-00129-5. | |
| 191 | |
| 192 --output Write the resulting JSON to this file (default is to save to the same path as the alignment file + 'ABSREL.json') | |
| 193 | |
| 194 | |
| 195 | |
| 196 --kill-zero-lengths Automatically delete internal zero-length branches for computational efficiency | |
| 197 Yes [default] : Automatically delete internal zero-length branches for computational efficiency (will not affect results otherwise) | |
| 198 Constrain : Keep zero-length branches, but constrain their values to 0 | |
| 199 No : Keep all branches | |
| 200 | |
| 201 --save-fit Save full adaptive aBSREL model fit to this file (default is not to save) | |
| 155 | 202 |
| 156 | 203 |
| 157 | 204 |
| 158 ]]></help> | 205 ]]></help> |
| 159 <expand macro="citations"> | 206 <expand macro="citations"> |
