view manhattan_plot.xml @ 0:c4bf5e913c2e draft default tip

"planemo upload commit b1883bac95e73fc6ffe2a36db3115ad5e5a1eba4"
author iuc
date Fri, 11 Oct 2019 17:31:09 -0400
parents
children
line wrap: on
line source

<tool id="gwastools_manhattan_plot" name="Manhattan plot" version="0.1.0" python_template_version="3.5">
    <description>Generate plots for use with GWAS pipelines</description>
    <requirements>
        <requirement type="package" version="3.6">r-base</requirement>
        <requirement type="package" version="1.30.0">bioconductor-gwastools</requirement>
        <requirement type="package" version="1.6.4">r-optparse</requirement>
    </requirements>
    <command detect_errors="exit_code"><![CDATA[
        Rscript '$__tool_directory__/manhattan.R'
        --file '${file}'
        --pval ${pvals}
        --chromosome ${chromosome}
        #if $ymax:
            --ymax ${ymax}
        #end if
        #if $ymin:
            --ymin ${ymin}
        #end if
        ${trunc}
        #if $sig:
            --sig ${sig}
        #end if
        #if $thinselect.thinning == 'Yes':
            --thin ${thinselect.thin}
            #if $thinselect.ppb:
                --ppb ${thinselect.ppb}
            #end if
        #end if
    ]]></command>
    <inputs>
        <param name="file" type="data" format="tsv,tabular" label="GWAS data file"/>
        <param name="chromosome" type="data_column" data_ref="file" label="Chromosome column number"/>
        <param name="pvals" type="data_column" data_ref="file" label="P-values column number"/>
        <param name="ymax" type = "float" optional="true" label="Y max"/>
        <param name="ymin" type = "float" optional="true" label="Y min"/>
        <param name="trunc" type="boolean" truevalue="--trunc" falsevalue="" label="Show truncation lines?"/>
        <param name="sig" type="float" optional="true" label="Genome-wide significance level for plotting horizontal line." help="If not specified, no line will be drawn."/>
        <conditional name="thinselect">
            <param name="thinning" type="select" label='Specify thinning value?'>
                <option value="Yes"/>
                <option value="No"/>
            </param>
            <when value="Yes">
                <param name="thin" type="float" value="0" label="Threshold for thinning points" help="If not specified, value is -log10(val)"/>
                <param name="ppb" type="integer" optional="true" label="Points per bin"/>
            </when>
            <when value="No"/>
        </conditional>
    </inputs>
    <outputs>
        <data name="manhattanout" format="pdf" from_work_dir="manhattan.pdf" label="Manhattan plot on ${on_string}"/>
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="file" value="sampledata.tsv"/>
            <param name="chromosome" value="2"/>
            <param name="pvals" value="4"/>
            <param name="ymin" value="0.2"/>
            <param name="trunc" value="--trunc"/>
            <param name="ymax" value="2"/>
            <param name="sig" value="0.05"/>
            <conditional name="thinselect">
                <param name="thinning" value="yes"/>
                <param name="thin" value="1"/>
                <param name="ppb" value="1"/>
            </conditional>
            <output name="manhattanout" ftype="pdf" value="testgraph.pdf" compare="sim_size"/>
        </test>
    </tests>
    <help><![CDATA[
        Generates a manhattan plot for GWAS data

        Input data format example:

            SNP CHR  Pos  P
            rs1   1  1 0.9148
            rs2   1  2 0.9371
            rs3   1  3 0.2861
            rs4   1  4 0.8304
            rs5   1  5 0.6417
            rs6   1  6 0.5191
            rs16468  22 533 0.1779

    ]]></help>
    <citations>
        <citation type="doi">10.1093/bioinformatics/bts610</citation>
    </citations>
</tool>