view gnali.xml @ 4:b6e197aac430 draft

"planemo upload for repository https://github.com/phac-nml/gnali/ commit 8b9f79cbb46fb4c935cf2c81726f1d41eb69bcd8"
author nml
date Fri, 19 Mar 2021 13:29:55 +0000
parents 02d368ec14cf
children 65521c432f58
line wrap: on
line source

<tool id="gnali" name="gNALI" version="1.0.3" python_template_version="3.7">
    <description>Get nonessential, LoF variants</description>
    <macros>
        <import>macros.xml</import>
    </macros>  
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[
        gnali -i '$test_genes' -o output -d '$database_info.database'
        #if $database_info.predefined_filters != "None":
            --predefined_filters '$database_info.predefined_filters'
        #end if
        #if len($additional_filters) > 0:
            --additional_filters 
            #for $filt in $additional_filters
                '$filt.filter' 
            #end for
        #end if
        #if $vcf_output:
            '$vcf_output'
        #end if
        #if $pop_freqs:
            '$pop_freqs'
        #end if
    ]]></command>
    <inputs>
        <param type="data" name="test_genes" label="Test genes" format="txt" help="Specify a list of genes as HGNC symbols, separated by newline characters" />
        <param name="vcf_output" type="boolean" truevalue="--vcf" falsevalue="" optional="false" checked="false" label="VCF output" help="Generate vcf file for filtered variants" />
        <param name="pop_freqs" type="boolean" truevalue="--pop_freqs" falsevalue="" optional="false" checked="false" label="Population frequencies" help="Generate population frequency data for variants that passed filtering" />
        <conditional name="database_info">
            <param type="select" name="database" label="Database" format="txt" help="Database to query" >
                <option value="gnomadv2.1.1" selected="true">gnomADv2.1.1 (GRCh37/hg19)</option>
                <option value="gnomadv3">gnomADv3 (GRCh38/hg38)</option>
            </param>
            <when value="gnomadv2.1.1">
                <param name="predefined_filters" type="select" display="checkboxes" multiple="True" label="Predefined filters" help="Filter variants by selected filters">
                    <option value="homozygous-controls">homozygous controls (controls_nhomalt>0)</option>
                    <option value="heterozygous-controls">heterozygous controls (controls_nhomalt=0)</option>
                    <option value="nhomalt>0">homozygous (nhomalt>0)</option>
                </param>
            </when>
            <when value="gnomadv3">
                <param name="predefined_filters" type="select" display="checkboxes" multiple="True" label="Predefined filters" help="Filter variants by selected filters">
                    <option value="homozygous">homozygous (nhomalt>0)</option>
                    <option value="heterozygous">heterozygous (nhomalt=0)</option>
                </param>
            </when>
        </conditional>
        <repeat name="additional_filters" title="Additional filters" min="0" default="0" help="Additional filters (as expressions, ex. AC>10) to apply" >
            <param name="filter" type="text" optional="False" label="Filter">
                <sanitizer invalid_char="">
                    <valid initial="string.ascii_letters,string.digits">
                        <add value="&gt;" />
                        <add value="&lt;" />
                        <add value="=" />
                    </valid>
                </sanitizer>
            </param>
        </repeat>
    </inputs>
    <outputs>
        <data name="basic_output" label="gNALI basic output on ${test_genes.element_identifier}" format="txt" from_work_dir="output/Nonessential_Host_Genes_\(Basic\).txt" />
        <data name="detailed_output" label="gNALI detailed output on ${test_genes.element_identifier}" format="txt" from_work_dir="output/Nonessential_Host_Genes_\(Detailed\).txt" />
        <data name="variants_vcf_output" label="gNALI variants vcf on ${test_genes.element_identifier}" format="vcf" from_work_dir="output/Nonessential_Gene_Variants.vcf" >
            <filter>vcf_output</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="test_genes" value="test_genes.txt"/>
            <param name="predefined_filters" value="homozygous-controls"/>
            <param name="pop_freqs" value="--pop_freqs"/>
            <param name="vcf_output" value="--vcf"/>
            <output name="basic_output"
                value="results/Nonessential_Host_Genes_Basic.txt"
                ftype="txt"
                compare="diff">
            </output>
            <output name="detailed_output"
                value="results/Nonessential_Host_Genes_Detailed.txt"
                ftype="txt"
                compare="diff">
            </output>
            <output name="variants_vcf_output"
                value="results/Nonessential_Gene_Variants.vcf"
                ftype="vcf"
                compare="diff">
            </output>
        </test>
    </tests>
    <help><![CDATA[

Introduction
------------------

gNALI (gene nonessentiality and loss-of-function identifier) is a tool to find (high confidence) 
potential loss of function variants of genes.

NOTE: loss-of-function is influenced by the genome build. Not all variants available in gnomADv2.1.1 are
available in gnomADv3 and vice versa.

Usage
-----------

Your input file must be of format .csv, .txt, or tsv and should contain a list of genes
(as HGNC symbols) to test, separated by newline characters.
It should not contain any blank lines until the end of the list.


**Population Frequencies**

When using the population frequencies feature:

Per population group:

* AC denotes allele count

* AN denotes allele number

* AF denotes allele frequency

    ]]></help>
    <citations>
        <citation type="bibtex">
    @misc{GitHubgnali,
    author = {Xia, Liu},
    year = {2020},
    title = {gnali},
    publisher = {phac-nml},
    journal = {GitHub repository},
    url = {https://github.com/phac-nml/gnali/},
    }</citation>
    </citations>
</tool>