view individuals.xml @ 1:72d8cb0fa73f draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2-import commit 23f6d9e5e91c43d5ab68e604205e06785635f42f
author iuc
date Mon, 19 Aug 2024 10:50:14 +0000
parents b648eb72552c
children
line wrap: on
line source

<tool id="beacon2_individuals" name="Beacon2 Individuals" version="1.0.0" profile="21.05">
    <description>Query the individuals collection in the beacon database</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="creators"/>
    <expand macro="requirements"/>
    <command detect_errors="exit_code">
        <![CDATA[
        beacon2-search individuals
        --db-host '$db_host'
        --db-port $db_port
        --database '$database'
        --collection '$collection'
        --advance-connection
        --db-auth-config '$credentials' 
        #if str($advanced_settings.ageGroup)
            --ageGroup '$advanced_settings.ageGroup'
        #end if
        #if str($advanced_settings.diseaseCode)
            --diseaseCode '$advanced_settings.diseaseCode'
        #end if
        #if str($advanced_settings.familyHistory) and $advanced_settings.familyHistory != ""
            --familyHistory '$advanced_settings.familyHistory'
        #end if
        #if str($advanced_settings.severity)
            --severity '$advanced_settings.severity'
        #end if
        #if str($advanced_settings.stage)
            --stage '$advanced_settings.stage'
        #end if
        #if str($advanced_settings.ethnicity)
            --ethnicity '$advanced_settings.ethnicity'
        #end if
        #if str($advanced_settings.geographicOrigin)
            --geographicOrigin '$advanced_settings.geographicOrigin'
        #end if
        #if str($advanced_settings.identification)
            --identification '$advanced_settings.identification'
        #end if
        #if str($advanced_settings.assayCode)
            --assayCode '$advanced_settings.assayCode'
        #end if
        #if str($advanced_settings.sex) and $advanced_settings.sex != ""
            --sex '$advanced_settings.sex'
        #end if
        > individuals_query_findings.json
        ]]>
    </command>
    <expand macro="configfile"/>
    <inputs>
        <expand macro="Connection_to_MongoDB"/>
        <expand macro="Database_Configuration"/>
        <section name="advanced_settings" title="Advanced settings" expanded="false">
            <param argument="--ageGroup" optional="true" type="text" label="AGE GROUP" value="" help="age af onset, e.g. Adult 18-65 Years Old" />
            <param argument="--diseaseCode" optional="true" type="text" label="DISEASE CODE" value="" help="Disease code, Spinocerebellar ataxia 1" />
            <param argument="--familyHistory" optional="true" type="select" label="FAMILY HISTORY" help="">
            <option value="true">true</option>
            <option value="false">false</option>
            <option value="" selected="True">unknown</option>
            </param>
            <param argument="--severity" optional="true" type="text" label="SEVERITY" value="" help="e.g. Profound" />
            <param argument="--stage" optional="true" type="text" label="STAGE" value="" help="e.g. acute onset" />
            <param argument="--ethnicity" optional="true" type="text" label="ETHNICITY" value="" help="e.g. European" />
            <param argument="--geographicOrigin" optional="true" type="text" label="GEOGRAPHIC ORIGIN" value="" help="e.g. Slovenia" />
            <param argument="--identification" optional="true" type="text" label="ID" value="" help="Individual identifier (internal ID)" />
            <param argument="--assayCode" optional="true" type="text" label="ASSAY CODE" value="" help="e.g. Platelets [#/volume] in Blood" />
            <param argument="--sex" optional="true" type="select" label="SEX" help="">
            <option value="male">male</option>
            <option value="female">female</option>
            <option value="" selected="True">non specific</option>
            </param>
        </section>
    </inputs>
    <outputs>
        <data name="out_individuals_query" format="json" label="${tool.name} on ${on_string}: Individuals Query" from_work_dir="individuals_query_findings.json" />
    </outputs>
    <tests>
        <test expect_num_outputs="1">
            <param name="database" value="beacon" />
            <param name="collection" value="test" />
            <param name="db_host" value="20.108.51.167" />
            <param name="sex" value="male" />
            <param name="geographicOrigin" value="United States of America" />
            <param name="diseaseCode" value="intolerance" />
            <param name="ethnicity" value="Han Chinese" />
            <output name="out_individuals_query">
                <assert_contents>
                    <has_text_matching expression="_id"/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
        Beacon2 Individuals queries the individuals collection in the Beacon database for either patients or healthy controls whose details (including phenotypic and clinical) are stored in the repository.
    ]]></help>
    <expand macro="citations" />
</tool>