diff cohorts.xml @ 0:8fc2c603a61f draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/beacon2-import commit f4151aa2d760f931f819f954f465ef66055bf258
author iuc
date Mon, 22 Jul 2024 12:37:13 +0000
parents
children d524bd42b89e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cohorts.xml	Mon Jul 22 12:37:13 2024 +0000
@@ -0,0 +1,81 @@
+<tool id="beacon2_cohorts" name="Beacon2 Cohorts" version="1.0.0" profile="21.05">
+    <description>Query the Cohorts 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 cohorts
+        --db-host '$db_host'
+        --db-port $db_port
+        --database '$database'
+        --collection '$collection'
+        --advance-connection
+        --db-auth-config '$credentials' 
+        #if str($advanced_settings.cohortDataTypes)
+            --cohortDataTypes '$advanced_settings.cohortDataTypes'
+        #end if
+        #if str($advanced_settings.cohortDesign)
+            --cohortDesign '$advanced_settings.cohortDesign'
+        #end if
+        #if str($advanced_settings.cohortSize)
+            --cohortSize $advanced_settings.cohortSize
+        #end if
+        #if str($advanced_settings.identification)
+            --identification '$advanced_settings.identification'
+        #end if
+        #if str($advanced_settings.cohortType)
+            --cohortType '$advanced_settings.cohortType'
+        #end if
+        #if str($advanced_settings.genders) and $advanced_settings.genders != ""
+            --genders '$advanced_settings.genders'
+        #end if
+        #if str($advanced_settings.name)
+            --name '$advanced_settings.name'
+        #end if
+        > cohorts_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="--cohortDataTypes" optional="true" type="text" label="COHORTDATA TYPES" value="" help="The type of data chorort, e.g. clinical history" />
+            <param argument="--cohortDesign" optional="true" type="text" label="COHORTDESIGN" value="" help="A plan specification comprised of protocols that are executed as part of an investigation, e.g. longitudinal study design" />
+            <param argument="--cohortSize" optional="true" type="integer" label="COHORT SIZE" value="" help="Count of unique Individuals in cohort" />
+            <param argument="--cohortType" optional="true" type="text" label="COHORT TYPE" value="" help="Cohort type by its definition, e.g. study-defined" />
+            <param argument="--identification" optional="true" type="text" label="ID" value="" help="Cohort identifier, e.g. cohort0001" />
+            <param argument="--genders" optional="true" type="select" label="GENDERS" help="">
+            <option value="male">male</option>
+            <option value="female">female</option>
+            <option value="" selected="True">non specific</option>
+            </param>
+            <param argument="--name" optional="true" type="text" label="NAME" value="" help="Name of the cohort" />
+        </section>
+    </inputs>
+    <outputs>
+        <data name="out_cohorts_query" format="json" label="${tool.name} on ${on_string}: Cohorts Query" from_work_dir="cohorts_query_findings.json" />
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="database" value="beacon" />
+            <param name="collection" value="cohorts" />
+            <param name="db_host" value="20.108.51.167" />
+            <param name="cohortType" value="study-defined" />
+            <param name="cohortDataTypes" value="demographic data" />
+            <param name="identification" value="refvar-668fcc22387cab4642e5f1a4" />
+            <output name="out_cohorts_query">
+                <assert_contents>
+                    <has_text_matching expression="_id"/>
+                </assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+        Beacon2 Cohorts queries the cohorts collection in the Beacon database to study the variants or individuals in a populations or  groups that share something in common.
+    ]]></help>
+    <expand macro="citations" />
+</tool>