Mercurial > repos > iuc > sansa_annotate
diff annotate.xml @ 0:fb00426402b0 draft
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/sansa commit b9066cb246cbae9a24020a79cf53d2dd4462b77d"
author | iuc |
---|---|
date | Mon, 25 Jan 2021 17:50:47 +0000 |
parents | |
children | e3862632706d |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/annotate.xml Mon Jan 25 17:50:47 2021 +0000 @@ -0,0 +1,297 @@ +<?xml version="1.0"?> +<tool id="sansa_annotate" name="sansa annotate" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="18.01"> + <description>structural variants</description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements"/> + <expand macro="version_command"/> + <command detect_errors="exit_code"><![CDATA[ +## initialize +## file format gtf.gz is required +#if $type_cond.type_sel == 'fg' or $type_cond.type_sel == 'sfg' + gzip -c '$type_cond.fg.gtf' > 'db.gtf.gz' && +#end if + +## run +sansa annotate +## sv annotation options +#if $type_cond.type_sel == 's' or $type_cond.type_sel == 'sfg' + --db '$type_cond.s.db' + --bpoffset $type_cond.s.bpoffset + --ratio $type_cond.s.ratio + --strategy '$type_cond.s.strategy' + $type_cond.s.notype + $type_cond.s.nomatch +#end if +## feature and gene annotation options +#if $type_cond.type_sel == 'fg' or $type_cond.type_sel == 'sfg' + --gtf 'db.gtf.gz' + --id '$type_cond.fg.id' + --feature '$type_cond.fg.feature' + --distance $type_cond.fg.distance +#end if +## input +'$input' + +## postprocessing +2>&1 | tee -a '$out_log' + ]]></command> + <inputs> + <param name="input" type="data" format="vcf" label="Select input file"/> + <conditional name="type_cond"> + <param name="type_sel" type="select" label="Select annotation mode(s)"> + <option value="s" selected="true">SV</option> + <option value="fg">Feature/Gene</option> + <option value="sfg">SV and Feature/Gene</option> + </param> + <when value="s"> + <expand macro="s"/> + </when> + <when value="fg"> + <expand macro="fg"/> + </when> + <when value="sfg"> + <expand macro="s"/> + <expand macro="fg"/> + </when> + </conditional> + <section name="oo" title="Output options" expanded="true"> + <param name="out" type="select" multiple="true" optional="false" label="Select output file(s)"> + <option value="anno" selected="true">Annotation</option> + <option value="log">Log</option> + <option value="query">Query SV</option> + </param> + </section> + </inputs> + <outputs> + <data name="out_anno" format="bcf" from_work_dir="anno.bcf" label="${tool.name} on ${on_string}: Annotation"> + <filter>'anno' in oo['out']</filter> + </data> + <data name="out_query" format="tabular.gz" from_work_dir="query.tsv.gz" label="${tool.name} on ${on_string}: Query SV"> + <filter>'query' in oo['out']</filter> + </data> + <data name="out_log" format="txt" label="${tool.name} on ${on_string}: Log"> + <filter>'log' in oo['out']</filter> + </data> + </outputs> + <tests> + <!-- #1 s, default --> + <test expect_num_outputs="3"> + <param name="input" value="input.vcf"/> + <conditional name="type_cond"> + <param name="type_sel" value="s"/> + <section name="s"> + <param name="db" value="db.vcf"/> + </section> + </conditional> + <section name="oo"> + <param name="out" value="anno,log,query"/> + </section> + <output name="out_anno"> + <assert_contents> + <has_size value="57072"/> + </assert_contents> + </output> + <output name="out_query"> + <assert_contents> + <has_size value="91"/> + </assert_contents> + </output> + <output name="out_log"> + <assert_contents> + <has_text_matching expression=".+Done.+"/> + </assert_contents> + </output> + </test> + <!-- #2 s, custom --> + <test expect_num_outputs="3"> + <param name="input" value="input.vcf"/> + <conditional name="type_cond"> + <param name="type_sel" value="s"/> + <section name="s"> + <param name="db" value="db.vcf"/> + <param name="bpoffset" value="51"/> + <param name="ratio" value="0.79"/> + <param name="strategy" value="all"/> + <param name="notype" value="true"/> + <param name="nomatch" value="true"/> + </section> + </conditional> + <section name="oo"> + <param name="out" value="anno,log,query"/> + </section> + <output name="out_anno"> + <assert_contents> + <has_size value="57072"/> + </assert_contents> + </output> + <output name="out_query"> + <assert_contents> + <has_size value="91"/> + </assert_contents> + </output> + <output name="out_log"> + <assert_contents> + <has_text_matching expression=".+Done.+"/> + </assert_contents> + </output> + </test> + <!-- #3 fg, default --> + <test expect_num_outputs="3"> + <param name="input" value="input.vcf"/> + <conditional name="type_cond"> + <param name="type_sel" value="fg"/> + <section name="fg"> + <param name="gtf" value="db.gtf"/> + </section> + </conditional> + <section name="oo"> + <param name="out" value="anno,log,query"/> + </section> + <output name="out_anno"> + <assert_contents> + <has_size value="2408"/> + </assert_contents> + </output> + <output name="out_query"> + <assert_contents> + <has_size value="91"/> + </assert_contents> + </output> + <output name="out_log"> + <assert_contents> + <has_text_matching expression=".+Done.+"/> + </assert_contents> + </output> + </test> + <!-- #4 fg, custom --> + <test expect_num_outputs="3"> + <param name="input" value="input.vcf"/> + <conditional name="type_cond"> + <param name="type_sel" value="fg"/> + <section name="fg"> + <param name="gtf" value="db.gtf"/> + <param name="id" value="gene_id"/> + <param name="feature" value="exon"/> + <param name="distance" value="1001"/> + </section> + </conditional> + <section name="oo"> + <param name="out" value="anno,log,query"/> + </section> + <output name="out_anno"> + <assert_contents> + <has_size value="2408"/> + </assert_contents> + </output> + <output name="out_query"> + <assert_contents> + <has_size value="91"/> + </assert_contents> + </output> + <output name="out_log"> + <assert_contents> + <has_text_matching expression=".+Done.+"/> + </assert_contents> + </output> + </test> + <!-- #5 sfg, default --> + <test expect_num_outputs="3"> + <param name="input" value="input.vcf"/> + <conditional name="type_cond"> + <param name="type_sel" value="sfg"/> + <section name="s"> + <param name="db" value="db.vcf"/> + </section> + <section name="fg"> + <param name="gtf" value="db.gtf"/> + </section> + </conditional> + <section name="oo"> + <param name="out" value="anno,log,query"/> + </section> + <output name="out_anno"> + <assert_contents> + <has_size value="57072"/> + </assert_contents> + </output> + <output name="out_query"> + <assert_contents> + <has_size value="91"/> + </assert_contents> + </output> + <output name="out_log"> + <assert_contents> + <has_text_matching expression=".+Done.+"/> + </assert_contents> + </output> + </test> + <!-- #5 sfg, custom --> + <test expect_num_outputs="3"> + <param name="input" value="input.vcf"/> + <conditional name="type_cond"> + <param name="type_sel" value="sfg"/> + <section name="s"> + <param name="db" value="db.vcf"/> + <param name="bpoffset" value="51"/> + <param name="ratio" value="0.79"/> + <param name="strategy" value="all"/> + <param name="notype" value="true"/> + <param name="nomatch" value="true"/> + </section> + <section name="fg"> + <param name="gtf" value="db.gtf"/> + <param name="id" value="gene_id"/> + <param name="feature" value="exon"/> + <param name="distance" value="1001"/> + </section> + </conditional> + <section name="oo"> + <param name="out" value="anno,log,query"/> + </section> + <output name="out_anno"> + <assert_contents> + <has_size value="57072"/> + </assert_contents> + </output> + <output name="out_query"> + <assert_contents> + <has_size value="91"/> + </assert_contents> + </output> + <output name="out_log"> + <assert_contents> + <has_text_matching expression=".+Done.+"/> + </assert_contents> + </output> + </test> + </tests> + <help><![CDATA[ +.. class:: infomark + +**What it does** + +Sansa *annotate* is a structural variant (SV) annotation tool. + +**Input** + +- sample (VCF) +- gene annotation file (GTF/GFF2/GFF3) +- annotation database, e.g. `gnomAD-SV <https://gnomad.broadinstitute.org/>`_ or `1000 Genomes phase 3 <https://www.internationalgenome.org/phase-3-structural-variant-dataset>`_ + +**Output** + +- anno (BCF) with annotation SVs augmented by a unique ID (INFO/ANNOID) +- query (tabular.gz) with query SVs matched to annotation IDs + +.. class:: infomark + +**References** + +More information are available on `GitHub <https://github.com/dellytools/sansa>`_. + ]]></help> + <citations> + <citation type="doi">10.1093/bioinformatics/bts378</citation> + </citations> +</tool> \ No newline at end of file