diff get_DB_data.xml @ 0:41ac63b5d221 draft

planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
author tduigou
date Thu, 10 Apr 2025 08:45:18 +0000
parents
children 72e99f02308e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/get_DB_data.xml	Thu Apr 10 08:45:18 2025 +0000
@@ -0,0 +1,51 @@
+<tool id="get_DB_data" name="get data from DB" version="0.1.0" profile="21.09">
+    <description>Import data from Sorbonne Biofondry DB</description>
+    <requirements>
+        <requirement type="package" version="2.2.3">pandas</requirement>
+        <requirement type="package" version="2.0.40">sqlalchemy</requirement>
+        <requirement type="package" version="2.9.9">psycopg2</requirement>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+        python '$__tool_directory__/get_db_info.py' 
+            --input '$input' 
+            --db_uri '$db_uri' 
+            --table '$table' 
+            --fragment_column '$fragment_column'
+            --output '$output'
+    ]]></command>
+    <inputs> 
+        <param name="input" type="data" format="csv" label="Input CSV file" />
+        <param name="table" type="text" label="Database Table Name" optional="false" />
+        <param name="fragment_column" type="text" label="Database Fragments Column Name" optional="false" />
+        <param name="db_uri" type="text" label="Database Connection URI" help="postgresql+psycopg2://username:password@db_container_name:port/database" optional="false" />
+    </inputs>    
+    <outputs>
+        <data name="output" format="json" label="DB Annotated Fragments (json)">
+        </data>
+    </outputs>
+    <!--python get_DB_info.py -input 'test-data/test_input.csv' -db_uri 'postgresql://postgres:RK17@localhost:5432/test_fragments_db' -table 'sample' -fragment_column 'fragment' -output 'test-data/output.json'-->
+    <tests>
+        <test> 
+            <param name="input" value="test_input.csv" />
+            <param name="table" value="sample" />
+            <param name="fragment_column" value="fragment" />
+            <param name="db_uri" value="postgresql://postgres:RK17@localhost:5432/test_fragments_db" />
+            <output name="output" file="output_annotations.json" ftype="json" />
+        </test>
+    </tests>
+    <help><![CDATA[
+Pick Data From DB
+===================
+
+DBget data from SQL DB in docker container.
+    ]]></help>
+    <citations>
+        <citation type="bibtex">
+            @unpublished{get_DB_data
+                author = {Ramiz Khaled},
+                title = {{get_DB_data}},
+                url = {https://github.com/brsynth/},
+            }
+        </citation>
+    </citations>
+</tool>