view gemini_macros.xml @ 2:9511c648d044 draft

planemo upload for repository commit 11ee7ac206d41894c0b6a11f2439aaea490824f0
author iuc
date Thu, 09 Nov 2017 13:15:36 -0500
parents e1920f41a1ca
children 90021fffff70
line wrap: on
line source

    <xml name="requirements">
            <requirement type="package" version="0.18.1">gemini</requirement>
            <requirement type="package" version="0.2.6">tabix</requirement>
            <!-- for conda useage -->
            <!--requirement type="package" version="1.3.1">htslib</requirement-->
            <yield />

    <xml name="version_command">
        <version_command>gemini --version</version_command>

    <xml name="stdio">
            <exit_code range="1:" />
            <exit_code range=":-1" />
            <regex match="Error:" />
            <regex match="Exception:" />

    <xml name="annotation_dir">
        <param name="annotation_databases" type="select" optional="True" label="Choose a gemini annotation database">
            <options from_data_table="gemini_databases">
                <filter type="sort_by" column="0" />

    <xml name="add_header_column">
        <param name="header" type="boolean" truevalue="--header" falsevalue="" checked="False" 
            label="Add a header of column names to the output" help="(--header)"/>

    <xml name="radius">
        <param name="radius" type="integer" value="3" label="Set filter for Breadth-first search (BFS) in the Protein-Protein Interaction network" help="(-r)" >
            <validator type="in_range" min="0"/>
    <xml name="variant_mode">
        <param name="variant_mode" type="boolean" truevalue="--var" falsevalue="" checked="False" 
            label="Returns variant info (e.g. impact, biotype) for interacting genes" help="(--var)"/>

    <xml name="column_filter">
        <conditional name="report">
            <param name="report_selector" type="select" label="Columns to include in the report"
                help="By default, this tool reports all columns in the variants table. One may choose to report only a subset of the columns.">
                <option value="all" selected="True">all</option>
                <option value="column_filter">User given columns</option>
            <when value="all"/>
            <when value="column_filter">
                <param name="columns" type="select" display="checkboxes" multiple="True" label="Choose columns to include in the report" help="(--columns)">
                    <option value="gene">gene</option>
                    <option value="chrom">chrom</option>
                    <option value="start">start</option>
                    <option value="end">end</option>
                    <option value="ref">ref</option>
                    <option value="alt">alt</option>
                    <option value="impact">impact</option>
                    <option value="impact_severity">impact_severity</option>
                    <option value="max_aaf_all">alternative allele frequency</option>
                <param name="extra_cols" type="text" label="Additional columns." help="Separate by whitespace"/>

    <xml name="filter">
        <conditional name="filter">
            <param name="filter_selector" type="select" label="Apply additional constraints"
                help="By default, this tool will report all variants regardless of their putative functional impact. In order to apply additional constraints on the variants returned, you can this optional filter.">
                <option value="no">No additional constraints</option>
                <option value="yes">Apply additional constraints</option>
            <when value="no"/>
            <when value="yes">
                <param name="filter" type="text" label="Contraints in SQL syntax" help="Conditions applied here will become WHERE clauses in the query issued to the GEMINI database. E.g. alt='G' or impact_severity = 'HIGH'. (--filter)">
                    <expand macro="sanitize_query" />

    <xml name="sanitize_query">
        <sanitizer invalid_char="">
            <valid initial="string.printable"/>

        #if str($filter.filter_selector) == 'yes' and $filter.filter:
            #import pipes
            --filter ${ pipes.quote( str( $filter.filter ) ) or "''" }
        #end if

    <token name="@COLUMN_SELECT@">
        #if $report.report_selector != 'all':
            --columns "${report.columns}
            #if str($report.extra_cols).strip()
                #echo ','+','.join(str($report.extra_cols).split()) 
            #end if
        #end if

    <xml name="family">
        <param name="families" type="text" value="" label="Comma seperated list of families to restrict the analysis to." help="e.g. Family1,Family3 (--families)"/>

    <xml name="lenient">
        <param name="lenient" type="boolean" truevalue="--lenient" falsevalue="" checked="False" label="Loosen the restrictions on family structure"/>

    <xml name="unaffected">
        <param name="allow_unaffected" type="boolean" truevalue="--allow-unaffected" falsevalue="" checked="False" label="Report candidates that also impact samples labeled as unaffected." help="(--allow-unaffected)"/>

    <xml name="min_kindreds">
        <param name="min_kindreds" type="integer" value="1" label="The min. number of kindreds that must have a candidate variant in a gene" help="default: 1 (--min-kindreds)" />

    <xml name="min_sequence_depth">
        <param name="d" type="integer" value="0" min="0" label="The minimum aligned sequence depth (genotype DP) required for each sample"
                help="default: 0 (-d)" />

    <xml name="min_gq">
        <param name="min_gq" type="integer" value="0" label="the minimum genotype quality required for each sample in a family" help="default: 0 (--min-gq)">
            <validator type="in_range" min="0"/>

    <xml name="gt_pl_max">
        <param name="gt_pl_max" type="integer" value="-1" min="-1" label="The maximum phred-scaled genotype likelihod (PL) allowed for each sample in a family" help="default: -1 (not set) (--gt-pl-max)" />
    <token name="@VERSION@">0.18.1</token>

    <xml name="citations">
            <citation type="doi">10.1371/journal.pcbi.1003153</citation>
            <yield />

    <xml name="infile">
        <param name="infile" type="data" format="gemini.sqlite" label="GEMINI database" help="Only files with version @VERSION@ are accepted." >
            <options options_filter_attribute="metadata.gemini_version" >
                <filter type="add_value" value="@VERSION@" />
            <validator type="expression" message="This version of Gemini will only work with Gemini files that are for version @VERSION@.">value is not None and value.metadata.gemini_version == "@VERSION@"</validator>