comparison hyphy_annotate.xml @ 12:5b4fd931a989 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:53:21 +0000
parents 91cf1290ba6f
children
comparison
equal deleted inserted replaced
11:91cf1290ba6f 12:5b4fd931a989
4 <import>macros.xml</import> 4 <import>macros.xml</import>
5 </macros> 5 </macros>
6 <expand macro="requirements"/> 6 <expand macro="requirements"/>
7 <command detect_errors="exit_code"><![CDATA[ 7 <command detect_errors="exit_code"><![CDATA[
8 cp '$input_tree' input.nhx && 8 cp '$input_tree' input.nhx &&
9 cp '$compressed_msa' input.$compressed_msa.extension && 9 hyphy label-tree
10 cp '$__tool_directory__/scripts/annotator.bf' annotator.bf && 10 --tree input.nhx
11 hyphy annotator.bf 11 --output labeled_tree.nhx
12 input.nhx '$root' input.$compressed_msa.extension '$label' labeled_tree_ 12 #if $regexp:
13 --regexp '$regexp'
14 #else:
15 --list '$list_file'
16 #end if
17 --label '$label'
18 --reroot '$reroot'
19 '$invert'
20 --internal-nodes '$internal_nodes'
21 --leaf-nodes '$leaf_nodes'
22 > annotate_stdout.md 2>/dev/null
13 @ERRORS@ 23 @ERRORS@
14 ]]></command> 24 ]]></command>
15 <inputs> 25 <inputs>
16 <param name="input_tree" type="data" format="nhx" label="Input tree" /> 26 <param name="input_tree" type="data" format="nhx" label="Input tree" help="The tree to annotate (Newick format)" />
17 <param name="compressed_msa" type="data" format="fasta,fasta.gz" label="Multiple alignments" /> 27 <conditional name="selection_method">
18 <param name="root" type="text" optional="false" value="REFERENCE" label="Root node" /> 28 <param name="method" type="select" label="Select branches by">
19 <param name="label" type="text" optional="false" value="Tree" label="Label for tree" /> 29 <option value="regexp">Regular Expression</option>
30 <option value="list">List of Sequences</option>
31 </param>
32 <when value="regexp">
33 <param name="regexp" type="text" optional="false" label="Regular expression" help="Use the following regular expression to select a subset of leaves">
34 <expand macro="regex_sanitizer"/>
35 </param>
36 </when>
37 <when value="list">
38 <param name="list_file" type="data" format="txt" optional="false" label="List of sequences" help="Line list of sequences to include in the set"/>
39 </when>
40 </conditional>
41 <param name="label" type="text" value="Foreground" label="Label for annotation" help="Use the following label for annotation" />
42 <param name="reroot" type="text" value="None" label="Reroot the tree on this node" help="Reroot the tree on this node ('None' to skip rerooting)" />
43 <param argument="--invert" type="boolean" truevalue="--invert Yes" falsevalue="--invert No" label="Invert selection" help="Invert selection" />
44 <param name="internal_nodes" type="select" label="Strategy for labeling internal nodes" help="Strategy for labeling internal nodes">
45 <option value="All descendants">All descendants</option>
46 <option value="None">None</option>
47 <option value="All descendants, no MRCA">All descendants, no MRCA</option>
48 <option value="Some descendants">Some descendants</option>
49 <option value="Parsimony">Parsimony</option>
50 </param>
51 <param name="leaf_nodes" type="select" label="Strategy for labeling selected leaves" help="Strategy for labeling selected leaves">
52 <option value="Label">Label</option>
53 <option value="Skip">Skip</option>
54 </param>
20 </inputs> 55 </inputs>
21 <outputs> 56 <outputs>
22 <data name="labeled_tree_int" format="nhx" from_work_dir="labeled_tree_int.nwk" label="${tool.name} on ${on_string} Labeled tree (int)" /> 57 <data name="labeled_tree" format="nhx" from_work_dir="labeled_tree.nhx" label="${tool.name} on ${on_string}: Labeled tree" />
23 <data name="labeled_tree_clade" format="nhx" from_work_dir="labeled_tree_clade.nwk" label="${tool.name} on ${on_string} Labeled tree (clade)" /> 58 <data name="annotate_md_report" format="markdown" from_work_dir="annotate_stdout.md" label="Annotate Report (Markdown) for ${tool.name} on ${on_string}" />
24 <data name="labeled_tree_full" format="nhx" from_work_dir="labeled_tree_full.nwk" label="${tool.name} on ${on_string} Labeled tree (full)" />
25 <data name="labeled_tree_json" format="hyphy_results.json" from_work_dir="labeled_tree_labels.json" label="${tool.name} on ${on_string} Labels" />
26 </outputs> 59 </outputs>
27 <tests> 60 <tests>
28 <test> 61 <test expect_num_outputs="2">
29 <param name="compressed_msa" ftype="fasta.gz" value="annotate-in1.fa.gz"/>
30 <param name="input_tree" ftype="nhx" value="annotate-in1.nhx"/> 62 <param name="input_tree" ftype="nhx" value="annotate-in1.nhx"/>
31 <param name="root" value="REFERENCE" /> 63 <conditional name="selection_method">
32 <param name="label" value="Annotated" /> 64 <param name="method" value="regexp"/>
33 <output name="labeled_tree_int" file="annotate-out1-int.nhx" /> 65 <param name="regexp" value="USA"/>
34 <output name="labeled_tree_full" file="annotate-out1-full.nhx" /> 66 </conditional>
35 <output name="labeled_tree_clade" file="annotate-out1-clade.nhx" /> 67 <param name="label" value="Annotated"/>
36 <output name="labeled_tree_json" file="annotate-out1.json" /> 68 <param name="reroot" value="None"/>
69 <param name="invert" value="No"/>
70 <param name="internal_nodes" value="All descendants"/>
71 <param name="leaf_nodes" value="Label"/>
72 <output name="labeled_tree" file="annotate-out1-full.nhx" />
73 <output name="annotate_md_report">
74 <assert_contents>
75 <has_text text="Analysis Description"/>
76 </assert_contents>
77 </output>
78
37 </test> 79 </test>
38 </tests> 80 </tests>
39 <help><![CDATA[ 81 <help><![CDATA[
40 HyPhy Annotate 82 HyPhy Annotate (label-tree)
41 ============== 83 ===========================
42 84
43 Given a set of alignments and a newick tree, this tool produces an annotated tree with 85 Brief description
44 the specified root node and label. 86 -----------------
45 ]]></help> 87
88 This tool uses the `label-tree` function from HyPhy to annotate a phylogenetic tree. It allows users to select a subset of leaves using either a regular expression or a list of sequence names, and then apply a specified label to these selected branches. The tool also provides options for rerooting the tree, inverting the selection, and defining strategies for labeling internal and leaf nodes. This functionality is crucial for customizing tree visualizations and focusing on specific evolutionary events or clades.
89
90 Input
91 -----
92
93 1. A phylogenetic tree in Newick format.
94 2. A regular expression or a list of sequence names to define the subset of leaves for annotation.
95
96 Output
97 ------
98
99 1. Labeled tree: A Newick file containing the annotated phylogenetic tree.
100 2. Annotate Report: A Markdown file with a summary of the analysis.
101
102 Tool options
103 ------------
104 ::
105
106 --tree The tree to annotate (Newick format).
107
108 --regexp Use the following regular expression to select a subset of leaves.
109
110 --list Line list of sequences to include in the set (required if --regexp is not supplied).
111
112 --label Use the following label for annotation.
113
114 --reroot Reroot the tree on this node ('None' to skip rerooting).
115
116 --invert Invert selection.
117
118 --internal-nodes Strategy for labeling internal nodes.
119 None: Do not label internal nodes.
120 All descendants: Label all descendants of the selected internal node.
121 All descendants, no MRCA: Label all descendants of the selected internal node, excluding the most recent common ancestor.
122 Some descendants: Label some descendants of the selected internal node.
123 Parsimony: Label internal nodes based on parsimony.
124
125 --leaf-nodes Strategy for labeling selected leaves.
126 Label: Apply the specified label to selected leaf nodes.
127 Skip: Do not label leaf nodes.
128 ]]>
129 </help>
46 <expand macro="citations"> 130 <expand macro="citations">
47 <citation type="doi">10.1093/molbev/msv022</citation> 131 <citation type="doi">10.1093/molbev/msv022</citation>
48 </expand> 132 </expand>
49 </tool> 133 </tool>