view varreport.xml @ 1:bfcd121b99bf draft default tip

planemo upload for repository https://github.com/wm75/mimodd_galaxy_wrappers commit 44e872b808f88eacd05963fc2478da2c07b50228
author wolma
date Thu, 22 Mar 2018 10:32:39 -0400
parents f0f2795de2c7
children
line wrap: on
line source

<tool id="mimodd_varreport" name="MiModD Report Variants" 
version="@MIMODD_WRAPPER_VERSION@">
    <description>
    in a human-friendly format that simplifies data exploration
    </description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <expand macro="stdio" />
    <expand macro="version_command" />
    <command><![CDATA[
    #if $str($formatting.oformat) == 'html':
      mkdir '$ofile.files_path' &&
    #end if
  	mimodd varreport
  	  '$inputfile' --oformat ${formatting.oformat}
	  #if $str($formatting.oformat) == 'html':
	    #if $str($formatting.species):
	      --species '${formatting.species}'
	    #end if
	    #if $formatting.link_formatter:
	      --link '${formatting.link_formatter}'
	    #end if
	    --ofile '${ofile.files_path}/variant_report.html'
	    && echo
	    '<html><body><p>MiModD has generated the variant report you requested, but for technical reasons, we have to take you through this little detour to display the report in Galaxy.</p><p>Proceed to <a href="variant_report.html">the variant report</a>.</p></body></html>'
	    > '$ofile'
	  #else
        --ofile '$ofile'
	  #end if
    ]]></command>

    <inputs>
        <param name="inputfile" type="data" format="vcf"
        label="The VCF input with the variants to be reported" />
        <conditional name="formatting">
            <param name="oformat" type="select"
            label="Format to use for the report">
                <option value="html">HTML</option>
                <option value="text">Tab-separated plain text</option>
            </param>
            <when value="html">
                <param name="species" type="text" label="Species"
                help="If you declare the species your input data comes from, variant reports in html format can have hyperlinks to species-specific databases and genome browsers added. If you have used the MiModD Variant Annotation tool to generate the input dataset, the species information will already be recorded in the dataset, but you can overwrite it if you wish.">
                    <expand macro="lex_sam_header" message="Non-ASCII characters are not allowed in species names." />
                </param>
                <param name="link_formatter" type="data" format="txt" optional="true"
                label="Optional file with species-specific hyperlink formatting instructions"
                help="If the tool has no built-in support for your species, i.e., it does not know how to generate hyperlinks for it, you can provide a custom recipe here." />
            </when>
            <when value="text">
                <param name="species" type="hidden" value="" />
            </when>
        </conditional>
    </inputs>

    <outputs>
        <data name="ofile" format="html">
            <change_format>
	            <when input="formatting.oformat" value="text" format="tabular"/>
            </change_format>
        </data>
    </outputs>

    <tests>
        <test>
            <param name="inputfile" value="a.vcf" />
            <conditional name="formatting">
                <param name="oformat" value="html" />
                <param name="species" value="C. elegans" />
            </conditional>
            <output name="ofile" ftype="html">
                <extra_files type="file" name="variant_report.html" ftype="html">
                    <assert_contents>
                        <has_line_matching expression=".+tools/genome/gbrowse/c_elegans_PRJNA13758.+" />
                    </assert_contents>
                </extra_files>
            </output>
        </test>
        <test>
            <param name="inputfile" value="a.vcf" />
            <conditional name="formatting">
                <param name="oformat" value="text" />
            </conditional>
            <output name="ofile" ftype="tabular">
                <assert_contents>
                    <has_n_columns n="11" />
                    <has_line_matching expression="Chromosome&#009;Position&#009;Affected Gene&#009;Transcript&#009;Effects&#009;genotype N2&#009;.+genotype ot266&#009;.+" />
                    <has_line_matching expression="chrI&#009;.+" />
                </assert_contents>
            </output>
        </test>
    </tests>
    
    <help><![CDATA[
.. class:: infomark

   **What it does**

The tool turns a variant list in VCF format into a more readable summary table
listing variant sites and effects.


**Html output enriched with species-specific hyperlinks**

If you select html as the output format, the tool can insert species- and
variant-specific hyperlinks to public genome browsers and databases into the
report. This is a useful feature to explore medium-size lists of variants, but
requires that the tool knows:

1) the species that you are analyzing data for

   The tool can autodetect the species if the input dataset has been generated
   with the *MiModD Variant Annotation* tool. Alternatively, you can declare
   the species you are working with explicitly.
   
2) how to generate hyperlinks for this species
   
   The tool has built-in support for a number of standard model organisms.
   If your organism is not in that list or if you find that the default
   hyperlinks for a supported species are outdated, you can provide your own
   recipe to generate correct hyperlinks through a `custom hyperlink template
   file`_.
      
   **TIP:**
   MiModD's built-in hyperlink formatting tables are actively maintained and
   extended with every new version! If you find the tool produces outdated
   hyperlinks for any supported species or if you would like to see additional
   species supported, do not hesitate to `tell us about it`_.
   If you have a custom hyperlink template file that is working for you, that
   is even better. We may use it as a starting point for a built-in recipe and,
   while we are working on that and with your permission, we can post it on the
   package home page for other users who may need it.

.. _custom hyperlink template file: http://mimodd.readthedocs.io/en/@MIMODD_REAL_VERSION@/recipes.html#hyperlink-template-file
.. _tell us about it: mailto:mimodd@googlegroups.com

@HELP_FOOTER@
    ]]></help>
    <expand macro="citations" />
</tool>