Mercurial > repos > thanhlv > snippy
view snippy-core.xml @ 9:2e9f837e23db draft default tip
planemo upload commit bacf06ead51adad153dd083d60a4e6643637b978
| author | thanhlv |
|---|---|
| date | Tue, 24 Sep 2019 09:59:21 -0400 |
| parents | d9c204f7042c |
| children |
line wrap: on
line source
<?xml version="1.0" encoding="utf-8"?> <tool id="snippy_core" name="snippy-core" version="@VERSION@"> <description> Combine multiple Snippy outputs into a core SNP alignment </description> <macros> <import>macros.xml</import> </macros> <expand macro="requirements" /> <command detect_errors="exit_code"><![CDATA[ #if $reference_source.reference_source_selector == 'history' ln -sf '$reference_source.ref_file' 'ref' && #elif $reference_source.reference_source_selector == 'cached' ln -sf '$reference_source.ref_file.fields.path' 'ref' && #end if #for $indir in $indirs #set $sample_name = os.path.splitext(os.path.basename(str($indir.element_identifier)))[0] mkdir '$sample_name' && tar -xf '$indir' -C '$sample_name' --strip-components=1 && #end for #set snippy_dirs = " ".join(["'{0}'".format(os.path.splitext(os.path.basename(str($indir.element_identifier)))[0]) for $indir in $indirs]) snippy-core --ref 'ref' ${snippy_dirs} ]]></command> <inputs> <param name="indirs" type="data" multiple="true" format="zip" label="Snippy input zipped dirs" help="Select all the snippy inputs for alignment" /> <conditional name="reference_source"> <param name="reference_source_selector" type="select" label="Will you select a reference genome from your history or use a built-in index?" help="Built-ins were indexed using default options. See `Indexes` section of help below. If you would like to perform self-mapping select `history` here, then choose your input file as reference."> <option value="cached">Use a built-in genome index</option> <option value="history">Use a genome from history and build index</option> </param> <when value="cached"> <param name="ref_file" type="select" label="Using reference genome" help="Select genome from the list"> <options from_data_table="all_fasta"> <validator type="no_options" message="No reference genomes are available" /> </options> </param> </when> <when value="history"> <param name="ref_file" type="data" format="fasta,genbank" label="Use the following dataset as the reference sequence" help="You can upload a FASTA or FASTQ sequence to the history and use it as reference" /> </when> </conditional> <param name="outputs" type="select" multiple="true" display="checkboxes" label="Output selection"> <option value="outaln" selected="True">A core SNP alignment in the fasta format</option> <option value="outfull" selected="False">A whole genome SNP alignment (includes invariant sites)</option> <option value="outtab" selected="False">Tab-separated columnar list of core SNP sites with alleles and annotations</option> <option value="outtxt" selected="False">Tab-separated columnar list of alignment/core-size statistics</option> </param> </inputs> <outputs> <data format="fasta" name="alignment_fasta" label="${tool.name} on ${on_string} core alignment fasta" from_work_dir="core.aln"> <filter>outputs and 'outaln' in outputs</filter> </data> <data format="fasta" name="full_alignment_fasta" label="${tool.name} on ${on_string} full alignment fasta" from_work_dir="core.full.aln"> <filter>outputs and 'outfull' in outputs</filter> </data> <data format="tabular" name="alignment_table" label="${tool.name} on ${on_string} core alignment table" from_work_dir="core.tab"> <filter>outputs and 'outtab' in outputs</filter> </data> <data format="txt" name="alignment_summary" label="${tool.name} on ${on_string} core alignment summary" from_work_dir="core.txt"> <filter>outputs and 'outtxt' in outputs</filter> </data> </outputs> <tests> <test><!-- Test #1 - test with 3 zipped directories --> <param name="indirs" value="a.tgz,b.tgz,c.tgz" /> <param name="reference_source|reference_source_selector" value="history"/> <param name="reference_source|ref_file" value="reference.fasta" ftype="fasta"/> <param name="outputs" value="outtxt" /> <output name="alignment_summary" ftype="txt" file="a_b_c.core.txt" /> </test> <test><!-- Test #2 - test with 3 zipped directories --> <param name="indirs" value="a.tgz,b.tgz,c.tgz" /> <param name="reference_source|reference_source_selector" value="cached"/> <param name="reference_source|ref_file" value="test_id"/> <param name="outputs" value="outtxt" /> <output name="alignment_summary" ftype="txt" file="a_b_c.core.txt" /> </test> </tests> <help><![CDATA[ **snippy-core @VERSION@** Combine multiple Snippy outputs into a core SNP alignment If you call SNPs for multiple isolates from the same reference, you can produce an alignment of "core SNPs" which can be used to build a high-resolution phylogeny (ignoring possible recombination). A "core site" is a genomic position that is present in all the samples. A core site can have the same nucleotide in every sample ("monomorphic") or some samples can be different ("polymorphic" or "variant"). If we ignore the complications of "ins", "del" variant types, and just use variant sites, these are the "core SNP genome". **Inputs:** Multiple Snippy output directories. (At least 2 of) **Options:** - noreference Exclude reference (default '0'). **Note:** snippy **must** have been run with --cleanup False ]]></help> <expand macro="citations" /> </tool>
