annotate get_DB_data.xml @ 12:ee28ec28140d draft

planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
author tduigou
date Fri, 23 May 2025 12:45:20 +0000
parents 6c1e564bb278
children 5b16f2911491
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11
6c1e564bb278 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 10
diff changeset
1 <tool id="get_DB_data" name="Get Data From DB" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.09">
10
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
2 <description>Import GenBank data from a PostgreSQL database running in a Docker container and export it as .gb files</description>
3
72e99f02308e planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents: 0
diff changeset
3 <macros>
72e99f02308e planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents: 0
diff changeset
4 <token name="@VERSION_SUFFIX@">0</token>
72e99f02308e planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents: 0
diff changeset
5 <token name="@TOOL_VERSION@">0.1.0</token>
72e99f02308e planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents: 0
diff changeset
6 </macros>
0
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
7 <requirements>
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
8 <requirement type="package" version="2.2.3">pandas</requirement>
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
9 <requirement type="package" version="2.0.40">sqlalchemy</requirement>
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
10 <requirement type="package" version="2.9.9">psycopg2</requirement>
4
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
11 <requirement type="package" version="1.85">biopython</requirement>
0
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
12 </requirements>
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
13 <command detect_errors="exit_code"><![CDATA[
4
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
14 mkdir 'outdir' &&
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
15 python '$__tool_directory__/get_db_info.py'
0
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
16 --input '$input'
4
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
17 --sequence_column '$sequence_column'
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
18 --annotation_columns '$annotation_columns'
0
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
19 --db_uri '$db_uri'
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
20 --table '$table'
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
21 --fragment_column '$fragment_column'
4
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
22 --output 'outdir'
0
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
23 ]]></command>
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
24 <inputs>
10
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
25 <param name="input" type="data" format="csv" label="Input CSV File" />
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
26 <param name="table" type="text" label="DB Table Name" optional="false" />
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
27 <param name="sequence_column" type="text" label="DB Column Contains Sequence For ganbank File" optional="false" />
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
28 <param name="annotation_columns" type="text" label="DB Column Contains Annotation For Ganbank File" optional="false" />
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
29 <param name="fragment_column" type="text" label="DB IDs Column Name" optional="false" />
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
30 <param name="db_uri" type="text" label="DB Connection URI" help="postgresql+psycopg2://username:password@db_container_name:port/database" optional="false" />
0
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
31 </inputs>
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
32 <outputs>
4
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
33 <collection name="output_gb" type="list" label="GenBank Files collection" >
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
34 <discover_datasets pattern="(?P&lt;name&gt;.*).gb" format="genbank" directory="outdir" />
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
35 </collection>
0
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
36 </outputs>
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
37 <tests>
10
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
38 <!--python get_db_info.py -input 'test-data/test_input.csv' -sequence_column 'sequence' -annotation_column 'annotation' -db_uri 'postgresql://postgres:RK17@localhost:5432/test_fragments_db' -table 'sample' -fragment_column 'fragment' -output 'test-data/output'-->
0
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
39 <test>
9
6401a277ee72 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 8
diff changeset
40 <param name="input" value="test_input.csv" />
0
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
41 <param name="table" value="sample" />
4
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
42 <param name="sequence_column" value="sequence" />
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
43 <param name="annotation_columns" value="annotation" />
0
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
44 <param name="fragment_column" value="fragment" />
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
45 <param name="db_uri" value="postgresql://postgres:RK17@localhost:5432/test_fragments_db" />
4
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
46 <output_collection name="output_gb" type="list" count="4">
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
47 <element name="ACP10001AaCbbBS">
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
48 <assert_contents>
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
49 <has_n_lines min="3" />
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
50 </assert_contents>
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
51 </element>
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
52 <element name="CFP10002AaCbbBS">
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
53 <assert_contents>
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
54 <has_n_lines min="3" />
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
55 </assert_contents>
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
56 </element>
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
57 <element name="QWE10004AaCbbBS">
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
58 <assert_contents>
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
59 <has_n_lines min="3" />
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
60 </assert_contents>
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
61 </element>
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
62 <element name="XYZ10003AaCbbBS">
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
63 <assert_contents>
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
64 <has_n_lines min="3" />
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
65 </assert_contents>
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
66 </element>
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
67 </output_collection>
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
68 </test>
0
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
69 </tests>
4
61158f32e5c3 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 3
diff changeset
70
0
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
71 <help><![CDATA[
11
6c1e564bb278 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 10
diff changeset
72 Get Data From DB
0
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
73 ===================
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
74
10
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
75 Implemented a system to generate GenBank (.gb) files from CSV input, based on data retrieved from a PostgreSQL database via URI requests.
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
76 The tool is tested on a locally hosted PostgreSQL database running in a Docker container.
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
77
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
78 **Parameters**:
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
79 ---------------
12
ee28ec28140d planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 11
diff changeset
80 * **Input CSV File**: Contains construct IDs in the first column and their corresponding fragments in the following columns. (Without Header)
10
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
81 * **DB Table Name**: Name of the target table in the PostgreSQL database.
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
82 * **DB Column Contains Sequence For ganbank File**: Column storing sequence data, expected to start with "ORIGIN".
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
83 * **DB Column Contains Annotation For Ganbank File**: Column containing annotation data, starting with "FEATURES" and including "LOCUS" information. Other metadata is optional.
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
84 * **DB IDs Column Name**: Column holding the unique fragment IDs.
703fda6c48c5 planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
tduigou
parents: 9
diff changeset
85 * **DB Connection URI**: URI used to connect to the database (e.g., postgresql://user:password@host:port/DB_name).
0
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
86 ]]></help>
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
87 <citations>
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
88 <citation type="bibtex">
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
89 @unpublished{get_DB_data
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
90 author = {Ramiz Khaled},
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
91 title = {{get_DB_data}},
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
92 url = {https://github.com/brsynth/},
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
93 }
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
94 </citation>
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
95 </citations>
41ac63b5d221 planemo upload for repository https://github.com/brsynth commit 15dbdd1f0a222a8e1b0fb5c16b36885520a3d005
tduigou
parents:
diff changeset
96 </tool>