view gemini_qc.xml @ 8:20f2ecf46dcb draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/gemini commit f7bdf08922aaf4119aefe7041e754a69cf64aebd
author iuc
date Wed, 13 Jul 2022 15:25:17 +0000
parents 8414eecc3828
children
line wrap: on
line source

<tool id="gemini_@BINARY@" name="GEMINI @BINARY@" version="@VERSION@">
    <description>Quality control tool</description>
    <expand macro="bio_tools"/>
    <macros>
        <import>gemini_macros.xml</import>
        <token name="@BINARY@">qc</token>
    </macros>
    <expand macro="requirements" />
    <expand macro="stdio" />
    <expand macro="version_command" />
    <command>
<![CDATA[
        gemini @BINARY@
        --mode sex
        --chrom '$chrom'

        '$infile'
        > '$outfile'
]]>
    </command>
    <inputs>
        <expand macro="infile" />
        <param name="chrom" type="text" value="chrX" label="Which chromosome should the sex test be applied to?" help="(--chrom)"/>

    </inputs>
    <outputs>
        <data name="outfile" format="tabular" />
    </outputs>
    <tests>
        <test>
            <param name="infile" value="gemini_load_result1.db" ftype="gemini.sqlite" />
            <!-- Testing needs to be done on a chromsome that exists
            in the test database even if that has little biological meaning
            -->
            <param name="chrom" value="chr1" ftype="gemini.sqlite" />
            <output name="outfile">
                <assert_contents>
                    <has_line_matching expression="sample&#009;sex&#009;.*" />
                </assert_contents>
            </output>
        </test>
    </tests>
    <help>
<![CDATA[
**What it does**

Checks whether the given sex of the samples are probable. It issues the query::

    SELECT gt_types
    FROM   variants
    WHERE  chrom = '$chrom'
    AND start > 2699520 and start < 154931044
    AND call_rate > 0.90
    AND depth > 1000
    AND filter is NULL
    ORDER BY random()
    LIMIT 10000

and returns the called variants on that region of the given chromosome in a table::

 sample  sex     X_homref  X_het  X_homalt  het_homref_ratio
 SMS173  male    7265      1975   8010      0.271851342051
 SMS254  male    5440      1316   3846      0.241911764706
 SMS255  female  6275      3188   5423      0.508047808765
 SMS253  male    5536      1355   3582      0.244761560694
 SMS243  male    6181      1506   4479      0.243649894839
 SMS242  male    6365      1437   4200      0.225765907306
 SMS193  male    6667      1864   5829      0.279586020699
 SMS238  male    6263      1638   4891      0.261536005109
 SMS239  female  6755      3669   7618      0.543153219837
 SMS244  female  6489      2953   5140      0.45507782401
 SMS230  male    7209      1784   7146      0.247468442225
 SMS231  female  7306      4659   9332      0.637695045168
]]>

    </help>
    <expand macro="citations"/>
</tool>