diff import.xml @ 0:0f85ad162439 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:35:43 +0000
parents
children d2646a23f6b2
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/import.xml	Mon Jul 22 12:35:43 2024 +0000
@@ -0,0 +1,54 @@
+<tool id="beacon2_import" name="Beacon2 Import" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
+    <description>Import JSON formatted datasets to beacon database</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="creators"/>
+    <expand macro="requirements"/>
+    <command detect_errors="exit_code"><![CDATA[    
+        ln -s '$input_json_file' ./input.json &&
+        beacon2-import
+        --input_json_file ./input.json
+        --db-host $db_host
+        --db-port $db_port
+        --database '$database'
+        --collection '$collection'
+        --advance-connection
+        --db-auth-config '$credentials' 
+        $advanced_settings.clearAll
+        #if $advanced_settings.clearColl:
+            $advanced_settings.clearColl
+            --removeCollection $advanced_settings.removeCollection
+        #end if 
+        > logs.txt
+    ]]></command>
+    <expand macro="configfile"/>
+    <inputs>
+        <expand macro="Connection_to_MongoDB" />
+        <expand macro="Database_Configuration" />
+        <param argument="--input_json_file" type="data" format="json" label="INPUT JSON FILE" help="Input the local path to the JSON file or its name on your Galaxy History to import to beacon" />
+        <section name="advanced_settings" title="Advanced settings" expanded="false">
+            <param argument="--clearAll" type="boolean" checked="false" truevalue="--clearAll" falsevalue="" label="CLEAR ALL COLLECTIONS" help="Delete all data before the new import" />
+            <param argument="--clearColl" type="boolean" checked="false" truevalue="--clearColl" falsevalue="" label="CLEAR SPECIFIC COLLECTION" help="Delete specific collection before the new import" />
+            <param argument="--removeCollection"  optional="true" type="text" label="REMOVED COLLECTION NAME" value="" help="Define the collection name for deletion" />
+        </section>
+    </inputs>
+    <outputs>
+        <data name="out_logs" format="txt" label="${tool.name} on ${on_string}: Log file" from_work_dir="logs.txt" />
+    </outputs>
+    <tests>
+        <test expect_num_outputs="1">
+            <param name="input_json_file" ftype="json" value="HG00096.json" />
+            <param name="db_host" value="20.108.51.167" />
+            <param name="database" value="beacon" />
+            <param name="collection" value="genomicvarients" />
+            <output name="out_logs">
+                <assert_contents><has_text_matching expression="inserted"/></assert_contents>
+            </output>
+        </test>
+    </tests>
+    <help><![CDATA[
+        Import JSON formatted datasets to Beacon MongoDB
+    ]]></help>
+    <expand macro="citations" />
+</tool>