<commit_before><tool id="gemini_@BINARY@" name="GEMINI @BINARY@" version="@VERSION@.0">
    <description>Querying the GEMINI database</description>
    <macros>
        <import>gemini_macros.xml</import>
        <token name="@BINARY@">query</token>
    </macros>
    <expand macro="requirements" />
    <expand macro="stdio" />
    <expand macro="version_command" />
    <command>
<![CDATA[
        gemini @BINARY@

            --in "${in}"

            #if $gt_filter.strip():
                --gt-filter "${gt_filter}"
            #end if

            #if $sample_filter.strip():
                --sample-filter "${sample_filter}"
            #end if

            $show_samples
            $show_families
            $family_wise
            $header
            $dgidb
            #if $region.strip():
                --region "${region}"
            #end if
            #if int($min_kindreds) > 0:
                --min-kindreds $min_kindreds
            #end if
            ##--format FORMAT       Format of output (JSON, TPED or default) # we will take default for the time being
            ##   --sample-delim STRING The delimiter to be used with the --show-samples option.

            #if $q.strip():
                -q "${q}"
            #end if

            "${ infile }"
            > "${ outfile }"
]]>
    </command>
                <!--
            ##TODO:
              - -carrier-summary-by-phenotype CARRIER_SUMMARY
                        Output columns of counts of carriers and non-carriers
                        stratified by the given sample phenotype column-->
    <inputs>
        <expand macro="infile" />

        <param name="q" type="text" area="True" size="5x50" label="The query to be issued to the database" help="(-q)">
            <expand macro="sanitize_query" />
        </param>
        <param name="gt_filter" type="text" area="True" size="5x50" label="Restrictions to apply to genotype values" help="(--gt-filer)">
            <expand macro="sanitize_query" />
        </param>
        <param name="sample_filter" type="text" area="True" size="5x50" label="SQL filter to use to filter the sample table" help="(--sample-filter)">
            <expand macro="sanitize_query" />
        </param>

        <param name="show_samples" type="boolean" truevalue="--show-samples" falsevalue="" checked="False"
            label="Add a column of all sample names with a variant to each variant" help="(--show-samples)"/>

        <param name="show_families" type="boolean" truevalue="--show-families" falsevalue="" checked="False"
            label="Add a column listing all of the families with a variant to each variant" help="(--show-families)"/>

        <param name="family_wise" type="boolean" truevalue="--family-wise" falsevalue="" checked="False"
            label="Perform the sample-filter on a family-wise basis" help="(--family-wise)"/>

        <expand macro="add_header_column" />
        <expand macro="min_kindreds" />

        <param name="dgidb" type="boolean" truevalue="--dgidb" falsevalue="" checked="False"
            label="Request drug-gene interaction info from DGIdb" help="(--dgidb)"/>

        <param name="in" type="select" label="A variant must be in either all, none or any samples passing the sample-query filter" help="(--in)">
            <option value="all">Return a variant if all samples matching the query have the variant. (all)</option>
            <option value="none">Return a variant if the variant does not appear in any of the matching samples. (none)</option>
            <option value="any">Return all of the variant which are in all of the matching samples and not in any of the non-matching samples. (any)</option>
            <option value="only">Return a variant if the variant is only in the matching samples and not in any of the non-matching samples. (only)</option>
        </param>

        <param name="region" type="text" value="" label="Restrict query to this region" help="e.g. chr1:10-20 (--region)"/>


    </inputs>
    <outputs>
        <data name="outfile" format="tabular" />
    </outputs>
    <tests>
        <test>
            <param name="infile" value="gemini_load_result.db" ftype="gemini.sqlite" />
            <param name="q" value="select start from variants limit 10" />
            <output name="outfile" file="gemini_query_result.tabular" />
        </test>
    </tests>
    <help>
**What it does**

The real power in the GEMINI framework lies in the fact that all of your genetic variants have been stored in a convenient database in the context of a wealth of genome annotations that facilitate variant interpretation.
The expressive power of SQL allows one to pose intricate questions of one’s variation data. This tool offers you an easy way to query your variants!

http://gemini.readthedocs.org/en/latest/content/querying.html

    </help>
    <expand macro="citations"/>
</tool><commit_msg>Added CDATA tags.<commit_after><tool id="gemini_@BINARY@" name="GEMINI @BINARY@" version="@VERSION@.0">
    <description>Querying the GEMINI database</description>
    <macros>
        <import>gemini_macros.xml</import>
        <token name="@BINARY@">query</token>
    </macros>
    <expand macro="requirements" />
    <expand macro="stdio" />
    <expand macro="version_command" />
    <command>
<![CDATA[
        gemini @BINARY@

            --in "${in}"

            #if $gt_filter.strip():
                --gt-filter "${gt_filter}"
            #end if

            #if $sample_filter.strip():
                --sample-filter "${sample_filter}"
            #end if

            $show_samples
            $show_families
            $family_wise
            $header
            $dgidb
            #if $region.strip():
                --region "${region}"
            #end if
            #if int($min_kindreds) > 0:
                --min-kindreds $min_kindreds
            #end if
            ##--format FORMAT       Format of output (JSON, TPED or default) # we will take default for the time being
            ##   --sample-delim STRING The delimiter to be used with the --show-samples option.

            #if $q.strip():
                -q "${q}"
            #end if

            "${ infile }"
            > "${ outfile }"
]]>
    </command>
                <!--
            ##TODO:
              - -carrier-summary-by-phenotype CARRIER_SUMMARY
                        Output columns of counts of carriers and non-carriers
                        stratified by the given sample phenotype column-->
    <inputs>
        <expand macro="infile" />

        <param name="q" type="text" area="True" size="5x50" label="The query to be issued to the database" help="(-q)">
            <expand macro="sanitize_query" />
        </param>
        <param name="gt_filter" type="text" area="True" size="5x50" label="Restrictions to apply to genotype values" help="(--gt-filer)">
            <expand macro="sanitize_query" />
        </param>
        <param name="sample_filter" type="text" area="True" size="5x50" label="SQL filter to use to filter the sample table" help="(--sample-filter)">
            <expand macro="sanitize_query" />
        </param>

        <param name="show_samples" type="boolean" truevalue="--show-samples" falsevalue="" checked="False"
            label="Add a column of all sample names with a variant to each variant" help="(--show-samples)"/>

        <param name="show_families" type="boolean" truevalue="--show-families" falsevalue="" checked="False"
            label="Add a column listing all of the families with a variant to each variant" help="(--show-families)"/>

        <param name="family_wise" type="boolean" truevalue="--family-wise" falsevalue="" checked="False"
            label="Perform the sample-filter on a family-wise basis" help="(--family-wise)"/>

        <expand macro="add_header_column" />
        <expand macro="min_kindreds" />

        <param name="dgidb" type="boolean" truevalue="--dgidb" falsevalue="" checked="False"
            label="Request drug-gene interaction info from DGIdb" help="(--dgidb)"/>

        <param name="in" type="select" label="A variant must be in either all, none or any samples passing the sample-query filter" help="(--in)">
            <option value="all">Return a variant if all samples matching the query have the variant. (all)</option>
            <option value="none">Return a variant if the variant does not appear in any of the matching samples. (none)</option>
            <option value="any">Return all of the variant which are in all of the matching samples and not in any of the non-matching samples. (any)</option>
            <option value="only">Return a variant if the variant is only in the matching samples and not in any of the non-matching samples. (only)</option>
        </param>

        <param name="region" type="text" value="" label="Restrict query to this region" help="e.g. chr1:10-20 (--region)"/>


    </inputs>
    <outputs>
        <data name="outfile" format="tabular" />
    </outputs>
    <tests>
        <test>
            <param name="infile" value="gemini_load_result.db" ftype="gemini.sqlite" />
            <param name="q" value="select start from variants limit 10" />
            <output name="outfile" file="gemini_query_result.tabular" />
        </test>
    </tests>
    <help>
<![CDATA[
**What it does**

The real power in the GEMINI framework lies in the fact that all of your genetic variants have been stored in a convenient database in the context of a wealth of genome annotations that facilitate variant interpretation.
The expressive power of SQL allows one to pose intricate questions of one’s variation data. This tool offers you an easy way to query your variants!

http://gemini.readthedocs.org/en/latest/content/querying.html
]]>
    </help>
    <expand macro="citations"/>
</tool>
{'fraction_non_alphanumeric': 0.13081070084426813, 'fraction_numerical': 0.00366188587122368, 'mean_word_length': 2.3845094664371773, 'pattern_counts': {'":': 0, '<': 122, '<?xml version=': 0, '>': 126, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6061490', 'n_tokens_mistral': 2815, 'n_tokens_neox': 2673, 'n_words': 884}