Mercurial > repos > iuc > usher_matutils
diff matutils.xml @ 0:79e2ee4e6ebb draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/usher commit c1531745ea5f5c4fbd22ad18e290b47fdcb01bb1"
author | iuc |
---|---|
date | Tue, 11 May 2021 17:54:51 +0000 |
parents | |
children | 52fd1d491417 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/matutils.xml Tue May 11 17:54:51 2021 +0000 @@ -0,0 +1,501 @@ +<tool id='usher_matutils' name='UShER matUtils' version='@TOOL_VERSION@+@GALAXY_TOOL_VERSION@' profile='20.01'> + <description>analyze, edit, and manipulate mutation annotated tree files</description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro='edam_ontology' /> + <expand macro='requirements' /> + <version_command>usher --version</version_command> + <command detect_errors='exit_code'><![CDATA[ + matUtils + $matutils_mode.options_mode + --input-mat $mutation_annotation_file + #if $matutils_mode.options_mode == 'extract' + #if $matutils_mode.operation_mode.operation == 'samples' + #if $matutils_mode.operation_mode.samples + --samples '${matutils_mode.operation_mode.samples}' + #end if + $matutils_mode.operation_mode.prune + #elif $matutils_mode.operation_mode.operation == 'clade' + --clade '${matutils_mode.operation_mode.clade}' + $matutils_mode.operation_mode.prune + #elif $matutils_mode.operation_mode.operation == 'mutation' + --mutation '${matutils_mode.operation_mode.mutation}' + $matutils_mode.operation_mode.prune + #elif $matutils_mode.operation_mode.operation == 'max-epps' + --max-epps $matutils_mode.operation_mode.max_epps + $matutils_mode.operation_mode.prune + #elif $matutils_mode.operation_mode.operation == 'max-parsimony' + --max-parsimony $matutils_mode.operation_mode.max_parsimony + $matutils_mode.operation_mode.prune + #elif $matutils_mode.operation_mode.operation == 'nearest-k' + --nearest-k '${matutils_mode.operation_mode.nearest_k}' + $matutils_mode.operation_mode.prune + #elif $matutils_mode.operation_mode.operation == 'max-branch-length' + --max-branch-length $matutils_mode.operation_mode.max_branch_length + #end if + $matutils_mode.get_representative + $matutils_mode.resolve_polytomies + #if 'used-samples' in $matutils_mode.outputs_extract + --used-samples selected_samples.txt ##$selected_samples + #end if + #if 'sample-paths' in $matutils_mode.outputs_extract + --sample-paths path_mutations.tabular ##$path_mutations + #end if + #if 'clade-paths' in $matutils_mode.outputs_extract + --clade-paths path_clades.tabular ##$path_clades + #end if + #if 'all-paths' in $matutils_mode.outputs_extract + --all-paths all_paths.txt ##$all_paths + #end if + #if 'write-vcf' in $matutils_mode.outputs_extract + --write-vcf subtree_vcf.vcf ##$subtree_vcf + #end if + #if 'write-vcf-no-genotypes' in $matutils_mode.outputs_extract and 'write-vcf' not in $matutils_mode.outputs_extract + --write-vcf subtree_vcf_no_genotypes.vcf --no-genotypes + #end if + #if 'write-mat' in $matutils_mode.outputs_extract + --write-mat mutation_annotated.pb ##$mutation_annotated + #end if + #if 'write-mat-collapsed' in $matutils_mode.outputs_extract and 'write-mat' not in $matutils_mode.outputs_extract + --write-mat mutation_annotated_collapsed.pb --collapsed-tree + #end if + #if 'write-json' in $matutils_mode.outputs_extract + --write-json subtree_json.json ##$subtree_json + #end if + #if 'write-tree' in $matutils_mode.outputs_extract + --write-tree tree_newick.nh ##$tree_newick + #end if + #if 'write-tree-retain-branch' in $matutils_mode.outputs_extract and 'write-tree' not in $matutils_mode.outputs_extract + --write-tree tree_newick_retain_branch.nh --retain-branch-length + #end if + #elif $matutils_mode.options_mode == 'summary' + #if 'samples' in $matutils_mode.summary_options + --samples samples_stats.tabular + #end if + #if 'clades' in $matutils_mode.summary_options + --clades clades_stats.tabular + #end if + #if 'mutations' in $matutils_mode.summary_options + --mutations mutations_stats.tabular + #end if + #if 'aberrant' in $matutils_mode.summary_options + --aberrant aberrant_stats.tabular + #end if + --output-directory ./ + #elif $matutils_mode.options_mode == 'annotate' + #if $matutils_mode.clade_names + --clade-names '${matutils_mode.clade_names}' + #if $matutils_mode.allele_frequency + --allele-frequency $matutils_mode.allele_frequency + #end if + #if $matutils_mode.set_overlap + --set-overlap $matutils_mode.set_overlap + #end if + #if $matutils_mode.mask_frequency + --mask-frequency $matutils_mode.mask_frequency + #end if + #if $matutils_mode.clip_sample_frequency + --clip-sample-frequency $matutils_mode.clip_sample_frequency + #end if + #end if + #if $matutils_mode.clade_to_nid + --clade-to-nid '${matutils_mode.clade_to_nid}' + #end if + $matutils_mode.clear_current + --output-mat output_mat.pb ##$output_mat + #elif $matutils_mode.options_mode == 'uncertainty' + --samples '${matutils_mode.samples}' + #if 'get-parsimony' in $matutils_mode.uncertainty_options + --get-parsimony + #end if + #if 'find-epps' in $matutils_mode.uncertainty_options + --find-epps equally_parsimonious.tabular + #end if + #if 'find-neighborhood' in $matutils_mode.uncertainty_options + --find-neighborhood neighborhood.tabular + #end if + #elif $matutils_mode.options_mode == 'mask' + #if $matutils_mode.restricted_samples + --restricted-samples '${matutils_mode.restricted_samples}' + #end if + #if $matutils_mode.rename_samples + --rename-samples '${matutils_mode.rename_samples}' + #end if + $$matutils_mode.simplify + --output-mat output_mat.pb ##$output_mat + #end if + --threads \${GALAXY_SLOTS:-1} > output_stdout.txt + + ]]> </command> + <inputs> + <param name="mutation_annotation_file" type="data" format="protobuf3" label="Mutation-annotated tree object" help="Load a mutation annotated tree file, in protocol-buffers format (protobuf3)."/> + <conditional name="matutils_mode"> + <param name="options_mode" type="select" label="matUtils mode"> + <option value="extract">Extract: subsetting and converting a MAT pb to other file formats</option> + <option value="summary">Summary: get basic statistics and attribute information about the MAT</option> + <option value="annotate">Annotate: adding clade annotation information to the MAT</option> + <option value="uncertainty">Uncertainty: calculates two specific metrics for sample placement certainty</option> + <option value="mask">Mask: mask specific samples out of the MAT, removing their mutations from visibility</option> + </param> + <when value="extract"> + <conditional name="operation_mode"> + <param name="operation" type="select" label="Operation mode"> + <option value="samples">Select samples by naming them</option> + <option value="clade">Select samples by clade(s)</option> + <option value="mutation">Select samples by mutation</option> + <option value="max-epps">Select samples by parsimonious placements</option> + <option value="max-parsimony">Select samples by parsimonious score</option> + <option value="nearest-k">Select samples by sample and context</option> + <option value="max-branch-length">Remove samples by branch length</option> + </param> + <when value="samples"> + <param argument="--samples" type="data" format="txt" optional="True" label="Select samples by explicitly naming them, one per line in a plain text file" /> + <param argument="--prune" type="boolean" truevalue="--prune" falsevalue="" label="Remove the selected samples" help="Remove the selected samples instead of keeping them in the output files" /> + </when> + <when value="clade"> + <param argument="--clade" type="text" value="" label="Select samples by membership in any of the indicated clade(s), comma delimited- e.g. -c clade1,clade2"> + <expand macro="sanitize_string" /> + </param> + <param argument="--prune" type="boolean" truevalue="--prune" falsevalue="" label="Remove the selected samples" help="Remove the selected samples instead of keeping them in the output files" /> + </when> + <when value="mutation"> + <param argument="--mutation" type="text" value="" label="Select samples by whether they contain any of the indicated mutation(s), comma delimited- e.g. -m mutation1,mutation2"> + <expand macro="sanitize_string" /> + </param> + <param argument="--prune" type="boolean" truevalue="--prune" falsevalue="" label="Remove the selected samples" help="Remove the selected samples instead of keeping them in the output files" /> + </when> + <when value="max-epps"> + <param argument="--max-epps" type="integer" min="0" max="1000" value="" label="Select samples by whether they have less than or equal to the maximum number of indicated equally parsimonious placements" /> + <param argument="--prune" type="boolean" truevalue="--prune" falsevalue="" label="Remove the selected samples" help="Remove the selected samples instead of keeping them in the output files" /> + </when> + <when value="max-parsimony"> + <param argument="--max-parsimony" type="integer" min="0" max="1000" value="" label="Select samples by whether they have less than or equal to the indicated maximum parsimony score (terminal branch length)" /> + <param argument="--prune" type="boolean" truevalue="--prune" falsevalue="" label="Remove the selected samples" help="Remove the selected samples instead of keeping them in the output files" /> + </when> + <when value="nearest-k"> + <param argument="--nearest-k" type="text" value="" label="Select a specific sample and X context samples, formatted as 'sample_name:X'"> + <expand macro="sanitize_string" /> + </param> + <param argument="--prune" type="boolean" truevalue="--prune" falsevalue="" label="Remove the selected samples" help="Remove the selected samples instead of keeping them in the output files" /> + </when> + <when value="max-branch-length"> + <param argument="--max-branch-length" type="integer" min="0" max="1000" value="" label="Remove samples which have branches of greater than the indicated length in their ancestry" /> + </when> + </conditional> + <param argument="--get-representative" type="boolean" truevalue="--get-representative" falsevalue="" label="Select two representative samples per clade" help=" Toggle to automatically select two representative samples per clade currently included in the tree, pruning all other samples from the tree. Applies after other selection steps" /> + <param argument="--resolve-polytomies" type="boolean" truevalue="--resolve-polytomies" falsevalue="" label="Resolve all polytomies" help="Resolve all polytomies by assigning branch length 0 relationships arbitrarily. Applied after selection; prevents recondensing of the MAT" /> + <param name="outputs_extract" type="select" display="checkboxes" multiple="true" label="Select the desired output"> + <option value="used-samples">Write a simple text file containing selected sample names (--used-samples)</option> + <option value="sample-paths">Write the path of mutations defining each sample in the subtree (--sample-paths)</option> + <option value="clade-paths">Write the path of mutations defining each clade in the subtree (--clade-paths)</option> + <option value="all-paths">Write mutations assigned to each node in the subtree in depth-first traversal order (--all-paths)</option> + <option value="write-vcf">Output VCF file representing selected subtree (--write-vcf)</option> + <option value="write-vcf-no-genotypes">Output VCF file representing selected subtree without including genotype column (--write-vcf --no-genotypes) </option> + <option value="write-mat">Write the selected subtree as a mutation annotated tree (--write-math)</option> + <option value="write-mat-collapsed">Write the selected subtree as a collapsed mutation annotated tree (--write-mat --collapsed)</option> + <option value="write-json">Write an Auspice-compatbile json representing the selected subtree (--write-json)</option> + <option value="write-tree"> Write a newick string representing the selected subtree (--write-tree)</option> + <option value="write-tree-retain-branch"> Write a newick string representing the selected subtree without recalculating branch lengths (--write-tree --retain-branch)</option> + </param> + </when> + <when value="summary"> + <param name="summary_options" type="select" display="checkboxes" multiple="true" label="Select statistics and attribute information"> + <option value="general">Number of nodes, number of samples, number of condensed nodes, and total tree parsimony</option> + <option value="samples">Samples in the tree and their parsimony score (--samples)</option> + <option value="clades">Clades and the count of associated samples in the tree (--clades)</option> + <option value="mutations">Mutations in the tree and their occurrence count (--mutations)</option> + <option value="aberrant">Potentially problematic nodes (--aberrant)</option> + </param> + </when> + <when value="annotate"> + <param argument="--clade-names" type="data" format="tabular" optional="True" label="File containing clade asssignments of samples" help="An algorithm automatically locates and annotates clade root nodes."/> + <param argument="--clade-to-nid" type="data" format="tabular" optional="True" label="File mapping clades to their respective internal node identifiers" help="Internal node names are not maintained when saving and loading from a .pb file. It is not guaranteed that internal node names will correspond directly between two .pb files, so use the direct assignment method with caution."/> + <param argument="--set-overlap" type="float" min="0" max="1" value="" optional="True" label="Minimum fraction of the lineage samples" help="Minimum fraction of the lineage samples that should be desecendants of the assigned clade root. Used only with --clade-names" /> + <param argument="--clear-current" type="boolean" truevalue="--clear-current" falsevalue="" label="Remove current annotations" help="Use to remove current annotations before applying new annotations." /> + <param argument="--allele-frequency" type="float" min="0" max="1" value="" optional="True" label="Minimum allele frequency for finding the best clade root" help="Minimum allele frequency in input samples for finding the best clade root. Used only with 'remove current annotation'. Used only with --clade-names" /> + <param argument="--mask-frequency" type="float" min="0" max="1" value="" optional="True" label="Minimum allele frequency for being masked" help="Minimum allele frequency in input samples that should be masked for finding the best clade root. Used only with --clade-names" /> + <param argument="--clip-sample-frequency" type="float" min="0" max="1" value="" optional="True" label="Clip sample frequency" help="Maximum proportion of samples in a branch that are exemplars from --clade-names to consider when sorting candidate clade root nodes." /> + </when> + <when value="uncertainty"> + <param argument="--samples" type="data" format="txt" label="Select samples by explicitly naming them, one per line in a plain text file" /> + <param name="uncertainty_options" type="select" display="checkboxes" multiple="true" label="Metrics for sample placement certainty"> + <option value="get-parsimony">Total tree parsimony score (--get-parsimony)</option> + <option value="find-epps">Number of equally parsimonious placements for each sample (--find-epps)</option> + <option value="find-neighborhood">Neighborhood size scores (--find-neighborhood)</option> + </param> + </when> + <when value="mask"> + <param argument="--restricted-samples" type="data" format="txt" optional="True" label="Select samples by explicitly naming them, one per line in a plain text file" help="Sample names to restrict. Use to perform masking"/> + <param argument="--rename-samples" type="data" format="tabular" optional="True" label="TSV file containing names of the samples to be renamed and their new names"/> + <param argument="--simplify" type="boolean" truevalue="--simplify" falsevalue="" label="Use to automatically remove identifying information from the tree, including all sample names and private mutations" /> + </when> + </conditional> + </inputs> + <outputs> + <data name="selected_samples" format="txt" from_work_dir='selected_samples.txt' label="${tool.name} on ${on_string}: selected samples"> + <filter>matutils_mode['options_mode'] == 'extract' and 'used-samples' in matutils_mode['outputs_extract'] </filter> + </data> + <data name="path_mutations" format="tabular" from_work_dir='path_mutations.tabular' label="${tool.name} on ${on_string}: sample mutations"> + <filter>matutils_mode['options_mode'] == 'extract' and 'sample-paths' in matutils_mode['outputs_extract']</filter> + </data> + <data name="path_clades" format="tabular" from_work_dir='path_clades.tabular' label="${tool.name} on ${on_string}: clade mutations"> + <filter>matutils_mode['options_mode'] == 'extract' and 'clade-paths' in matutils_mode['outputs_extract']</filter> + </data> + <data name="all_paths" format="txt" from_work_dir='all_paths.txt' label="${tool.name} on ${on_string}: node mutations"> + <filter>matutils_mode['options_mode'] == 'extract' and 'all-paths' in matutils_mode['outputs_extract']</filter> + </data> + <data name="subtree_vcf" format="vcf" from_work_dir='subtree_vcf.vcf' label="${tool.name} on ${on_string}: subtree"> + <filter>matutils_mode['options_mode'] == 'extract' and 'write-vcf' in matutils_mode['outputs_extract']</filter> + </data> + <data name="subtree_no_genotype_vcf" format="vcf" from_work_dir='subtree_vcf_no_genotypes.vcf' label="${tool.name} on ${on_string}: subtree without genotype"> + <filter>matutils_mode['options_mode'] == 'extract' and 'write-vcf-no-genotypes' in matutils_mode['outputs_extract'] and 'write-vcf' not in matutils_mode['outputs_extract']</filter> + </data> + <data name="mutation_annotated" format="protobuf3" from_work_dir='mutation_annotated.pb' label="${tool.name} on ${on_string}: mutation annotated tree"> + <filter>matutils_mode['options_mode'] == 'extract' and 'write-mat' in matutils_mode['outputs_extract'] </filter> + </data> + <data name="mutation_annotated_collapsed" format="protobuf3" from_work_dir='mutation_annotated_collapsed.pb' label="${tool.name} on ${on_string}: mutation annotated tree collapsed"> + <filter>matutils_mode['options_mode'] == 'extract' and 'write-mat-collapse' in matutils_mode['outputs_extract'] and 'write-mat' not in matutils_mode['outputs_extract']</filter> + </data> + <data name="subtree_json" format="json" from_work_dir='subtree_json.json' label="${tool.name} on ${on_string}: subtree (json)"> + <filter>matutils_mode['options_mode'] == 'extract' and 'write-json' in matutils_mode['outputs_extract']</filter> + </data> + <data name="tree_newick" format="newick" from_work_dir='tree_newick.nh' label="${tool.name} on ${on_string}: subtree (newick)"> + <filter>matutils_mode['options_mode'] == 'extract' and 'write-tree' in matutils_mode['outputs_extract']</filter> + </data> + <data name="tree_newick_retain_branch" format="newick" from_work_dir='tree_newick_retain_branch.nh' label="${tool.name} on ${on_string}: subtree retain branch (newick)"> + <filter>matutils_mode['options_mode'] == 'extract' and 'write-tree-retain-branch' in matutils_mode['outputs_extract'] and 'write-tree' not in matutils_mode['outputs_extract']</filter> + </data> + <data name="general_stats" format="txt" from_work_dir='output_stdout.txt' label="${tool.name} on ${on_string}: general stats"> + <filter>matutils_mode['options_mode'] == 'summary' and 'general' in matutils_mode['summary_options']</filter> + </data> + <data name="samples_stats" format="tabular" from_work_dir='samples_stats.tabular' label="${tool.name} on ${on_string}: samples stats"> + <filter>matutils_mode['options_mode'] == 'summary' and 'samples' in matutils_mode['summary_options']</filter> + </data> + <data name="clades_stats" format="tabular" from_work_dir='clades_stats.tabular' label="${tool.name} on ${on_string}: clades stats"> + <filter>matutils_mode['options_mode'] == 'summary' and 'clades' in matutils_mode['summary_options']</filter> + </data> + <data name="mutations_stats" format="tabular" from_work_dir='mutations_stats.tabular' label="${tool.name} on ${on_string}: mutations stats"> + <filter>matutils_mode['options_mode'] == 'summary' and 'mutations' in matutils_mode['summary_options']</filter> + </data> + <data name="aberrant_stats" format="tabular" from_work_dir='aberrant_stats.tabular' label="${tool.name} on ${on_string}: aberrant stats"> + <filter>matutils_mode['options_mode'] == 'summary' and 'aberrant' in matutils_mode['summary_options']</filter> + </data> + <data name="output_mat" format="protobuf3" from_work_dir='output_mat.pb' label="${tool.name} on ${on_string}: mutation annotated tree"> + <filter>matutils_mode['options_mode'] == 'annotate' or matutils_mode['options_mode'] == 'mask'</filter> + </data> + <data name="total_parsimony_tree" format="txt" from_work_dir='output_stdout.txt' label="${tool.name} on ${on_string}: parsimony tree"> + <filter>matutils_mode['options_mode'] == 'uncertainty' and 'get-parsimony' in matutils_mode['uncertainty_options']</filter> + </data> + <data name="equally_parsimonious" from_work_dir='equally_parsimonious.tabular' format="tabular" label="${tool.name} on ${on_string}: equally parsimonious placements"> + <filter>matutils_mode['options_mode'] == 'uncertainty' and 'find-epps' in matutils_mode['uncertainty_options']</filter> + </data> + <data name="neighbourhood" format="tabular" from_work_dir='neighborhood.tabular' label="${tool.name} on ${on_string}: neighborhood size scores"> + <filter>matutils_mode['options_mode'] == 'uncertainty' and 'find-neighborhood' in matutils_mode['uncertainty_options']</filter> + </data> + </outputs> + <tests> + <test expect_num_outputs="3"> + <param name="mutation_annotation_file" value="mutation_annotation.pb"/> + <conditional name="matutils_mode"> + <param name="options_mode" value="extract"/> + <param name="resolve_polytomies" value="true"/> + <param name="outputs_extract" value="used-samples,sample-paths,clade-paths"/> + <conditional name="operation_mode"> + <param name="operation" value="samples"/> + <param name="samples" value="sample_names.txt"/> + <param name="prune" value="true"/> + </conditional> + </conditional> + <output name="selected_samples" file="test_13_sample_names.txt" ftype="txt"/> + <output name="path_mutations" file="test_13_path_mutations.tabular" ftype="tabular"/> + <output name="path_clades" file="test_13_path_clades.tabular" ftype="tabular"/> + </test> + <test expect_num_outputs="5"> + <param name="mutation_annotation_file" value="mutation_annotation.pb"/> + <conditional name="matutils_mode"> + <param name="options_mode" value="extract"/> + <param name="outputs_extract" value="used-samples,sample-paths,clade-paths,all-paths,write-vcf"/> + <conditional name="operation_mode"> + <param name="operation" value="samples"/> + <param name="samples" value="sample_names.txt"/> + </conditional> + </conditional> + <output name="selected_samples" file="test_14_sample_names.txt" ftype="txt"/> + <output name="path_mutations" file="test_14_path_mutations.tabular" ftype="tabular"/> + <output name="path_clades" file="test_14_path_clades.tabular" ftype="tabular"/> + <output name="all_paths" file="test_14_all_paths.txt" ftype="txt"/> + <output name="subtree_vcf" ftype="vcf"> + <assert_contents> + <has_size value="7219100" delta="300"/> + </assert_contents> + </output> + </test> + <test expect_num_outputs="4"> + <param name="mutation_annotation_file" value="mutation_annotation.pb"/> + <conditional name="matutils_mode"> + <param name="options_mode" value="extract"/> + <param name="outputs_extract" value="write-vcf-no-genotypes,write-mat,write-json,write-tree"/> + <conditional name="operation_mode"> + <param name="operation" value="mutation"/> + <param name="mutation" value="C241T"/> + </conditional> + </conditional> + <output name="subtree_no_genotype_vcf" file="test_15_subtree_no_genotype.vcf" ftype="vcf"/> + <output name="mutation_annotated" file="test_15_mutation_annotated_tree.pb" ftype="protobuf3"/> + <output name="subtree_json" file="test_15_subtree.json" ftype="json"/> + <output name="tree_newick" file="test_15_tree.nh" ftype="newick"/> + </test> + <test expect_num_outputs="3"> + <param name="mutation_annotation_file" value="mutation_annotation.pb"/> + <conditional name="matutils_mode"> + <param name="options_mode" value="extract"/> + <param name="outputs_extract" value="used-samples,sample-paths,write-vcf"/> + <conditional name="operation_mode"> + <param name="operation" value="clades"/> + <param name="clade" value="B.1.160.7, B.1.258.4"/> + </conditional> + </conditional> + <output name="selected_samples" file="test_16_sample_names.txt" ftype="txt"/> + <output name="path_mutations" file="test_16_path_mutations.tabular" ftype="tabular"/> + <output name="subtree_vcf" ftype="vcf"> + <assert_contents> + <has_size value="8999600" delta="300"/> + </assert_contents> + </output> + </test> + <test expect_num_outputs="5"> + <param name="mutation_annotation_file" value="mutation_annotation.pb"/> + <conditional name="matutils_mode"> + <param name="options_mode" value="extract"/> + <param name="outputs_extract" value="used-samples,sample-paths,clade-paths,all-paths,write-vcf"/> + <conditional name="operation_mode"> + <param name="operation" value="max-epps"/> + <param name="max_epps" value="0"/> + </conditional> + </conditional> + <output name="selected_samples" file="test_17_sample_names.txt" ftype="txt"/> + <output name="path_mutations" file="test_17_path_mutations.tabular" ftype="tabular"/> + <output name="path_clades" file="test_17_path_clades.tabular" ftype="tabular"/> + <output name="all_paths" file="test_17_all_paths.txt" ftype="txt"/> + <output name="subtree_vcf" ftype="vcf"> + <assert_contents> + <has_size value="8999600" delta="300"/> + </assert_contents> + </output> + </test> + <test expect_num_outputs="5"> + <param name="mutation_annotation_file" value="mutation_annotation.pb"/> + <conditional name="matutils_mode"> + <param name="options_mode" value="extract"/> + <param name="outputs_extract" value="used-samples,sample-paths,clade-paths,all-paths,write-vcf"/> + <conditional name="operation_mode"> + <param name="operation" value="max-parsimony"/> + <param name="max_parsimony" value="1"/> + </conditional> + </conditional> + <output name="selected_samples" file="test_18_sample_names.txt" ftype="txt"/> + <output name="path_mutations" file="test_18_path_mutations.tabular" ftype="tabular"/> + <output name="path_clades" file="test_18_path_clades.tabular" ftype="tabular"/> + <output name="all_paths" file="test_18_all_paths.txt" ftype="txt"/> + <output name="subtree_vcf" ftype="vcf"> + <assert_contents> + <has_size value="1183300" delta="300"/> + </assert_contents> + </output> + </test> + <test expect_num_outputs="3"> + <param name="mutation_annotation_file" value="mutation_annotation.pb"/> + <conditional name="matutils_mode"> + <param name="options_mode" value="extract"/> + <param name="outputs_extract" value="used-samples,sample-paths,clade-paths"/> + <conditional name="operation_mode"> + <param name="operation" value="max-branch-length"/> + <param name="max_branch_length" value="2"/> + </conditional> + </conditional> + <output name="selected_samples" file="test_19_sample_names.txt" ftype="txt"/> + <output name="path_mutations" file="test_19_path_mutations.tabular" ftype="tabular"/> + <output name="path_clades" file="test_19_path_clades.tabular" ftype="tabular"/> + </test> + <test expect_num_outputs="1"> + <param name="mutation_annotation_file" value="mutation_annotation.pb"/> + <conditional name="matutils_mode"> + <param name="options_mode" value="summary"/> + <param name="summary_options" value="general"/> + </conditional> + <output name="general_stats" file="test_20_general_stats.txt" ftype="txt"/> + </test> + <test expect_num_outputs="4"> + <param name="mutation_annotation_file" value="mutation_annotation.pb"/> + <conditional name="matutils_mode"> + <param name="options_mode" value="summary"/> + <param name="summary_options" value="samples,clades,mutations,aberrant"/> + </conditional> + <output name="samples_stats" file="test_21_sample_stats.tabular" ftype="tabular"/> + <output name="clades_stats" file="test_21_clades_stats.tabular" ftype="tabular"/> + <output name="mutations_stats" file="test_21_mutations_stats.tabular" ftype="tabular"/> + <output name="aberrant_stats" file="test_21_aberrant_stats.tabular" ftype="tabular"/> + </test> + <test expect_num_outputs="1"> + <param name="mutation_annotation_file" value="mutation_annotation.pb"/> + <conditional name="matutils_mode"> + <param name="options_mode" value="uncertainty"/> + <param name="samples" value="sample_names.txt"/> + <param name="uncertainty_options" value="get-parsimony"/> + </conditional> + <output name="total_parsimony_tree" file="test_22_total_parsimony_tree.txt" ftype="txt"/> + </test> + <test expect_num_outputs="2"> + <param name="mutation_annotation_file" value="mutation_annotation.pb"/> + <conditional name="matutils_mode"> + <param name="options_mode" value="uncertainty"/> + <param name="samples" value="sample_names.txt"/> + <param name="uncertainty_options" value="find-epps,find-neighborhood"/> + </conditional> + <output name="equally_parsimonious" file="test_23_equally_parsimoniou.tabular" ftype="tabular"/> + <output name="neighbourhood" file="test_23_neighbourhood.tabular" ftype="tabular"/> + </test> + <test expect_num_outputs="1"> + <param name="mutation_annotation_file" value="mutation_annotation.pb"/> + <conditional name="matutils_mode"> + <param name="options_mode" value="mask"/> + <param name="restricted_samples" value="sample_names.txt"/> + <param name="simplify" value="true"/> + </conditional> + <output name="output_mat" file="test_24_restricted.pb" ftype="protobuf3"/> + </test> + <test expect_num_outputs="1"> + <param name="mutation_annotation_file" value="mutation_annotation.pb"/> + <conditional name="matutils_mode"> + <param name="options_mode" value="mask"/> + <param name="rename_samples" value="rename_samples.tabular"/> + </conditional> + <output name="output_mat" file="test_25_renamed.pb" ftype="protobuf3"/> + </test> + </tests> + <help><![CDATA[ + +.. class:: infomark + +**Purpose** + +matUtils is a suite of tools used to analyze, edit, and manipulate mutation annotated tree (.pb) files. + +---- + +.. class:: infomark + +**matUtils Common Options** + +**Extract**: matUtils extract serves as a flexible prebuilt pipeline, and serves as the primary tool for subsetting and converting a MAT pb to other file formats. +**Sumary**: matUtils summary is used to get basic statistics and attribute information about the mat. +**Annotate**: matUtils annotate is a function for adding clade annotation information to the pb. +**Uncertainly**: matUtils uncertainty calculates two specific metrics for sample placement certainty. These metrics can be very important to support contact tracing and reliable identification of the origin of a newly placed sample. +**Mask**: matUtils mask is used to mask specific samples out of the pb, removing their mutations from visibility. + +You can find more information in the `matUtils official documentation page <https://usher-wiki.readthedocs.io/en/latest/matUtils.html>`_. + + ]]> </help> + <expand macro="citations" /> +</tool>