Mercurial > repos > tduigou > json_db_config_generating
comparison json_db_config_generating.xml @ 0:95757ea6c333 draft
planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
| author | tduigou |
|---|---|
| date | Mon, 02 Jun 2025 13:39:41 +0000 |
| parents | |
| children | 2909e53fac5b |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:95757ea6c333 |
|---|---|
| 1 <tool id="json_db_config_generating" name="JSON DB_Config Generating" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.09"> | |
| 2 <description>Genarate a JSON file used as DB config</description> | |
| 3 <macros> | |
| 4 <token name="@VERSION_SUFFIX@">1</token> | |
| 5 <token name="@TOOL_VERSION@">0.1.0</token> | |
| 6 </macros> | |
| 7 <command detect_errors="exit_code"><![CDATA[ | |
| 8 python3 -c "import json; params = { | |
| 9 'execution': '$execution', | |
| 10 'JSON_db_uri': '$db_uri', | |
| 11 'JSON_table': '$table_name', | |
| 12 'JSON_fragment_column': '$fragment_column', | |
| 13 'JSON_sequence_column': '$sequence_column', | |
| 14 'JSON_annotation_column': '$annotation_column' | |
| 15 }; f = open('$output_json', 'w'); json.dump(params, f, indent=4); f.close()" | |
| 16 ]]></command> | |
| 17 <inputs> | |
| 18 <param name="execution" type="boolean" label="execution key" checked="False" help="If True the execution key in the json file will be true" optional="true" /> | |
| 19 <param name="db_uri" type="text" label="DB Connection URI" optional="true" /> | |
| 20 <param name="table_name" type="text" label="DB Table Name" optional="true" /> | |
| 21 <param name="fragment_column" type="text" label="DB IDs Column Name" optional="true" /> | |
| 22 <param name="sequence_column" type="text" label="DB Column Contains Sequence For ganbank File" optional="true" /> | |
| 23 <param name="annotation_column" type="text" label="DB Column Contains Annotation For Ganbank File" optional="true" /> | |
| 24 </inputs> | |
| 25 <outputs> | |
| 26 <data name="output_json" format="json" label="JSON Conf" /> | |
| 27 </outputs> | |
| 28 <tests> | |
| 29 <!--test execution is true --> | |
| 30 <test> | |
| 31 <param name="execution" value="True" /> | |
| 32 <param name="db_uri" value="postgresql://postgres:RK17@localhost:5432/test_fragments_db" /> | |
| 33 <param name="table_name" value="sample" /> | |
| 34 <param name="fragment_column" value="fragment" /> | |
| 35 <param name="sequence_column" value="sequence" /> | |
| 36 <param name="annotation_column" value="annotation" /> | |
| 37 <output name="output_json"> | |
| 38 <assert_contents> | |
| 39 <has_json_property_with_text property="execution" text="true" /> | |
| 40 <has_json_property_with_text property="JSON_db_uri" text="postgresql://postgres:RK17__at__localhost:5432/test_fragments_db" /> | |
| 41 <has_json_property_with_text property="JSON_table" text="sample" /> | |
| 42 <has_json_property_with_text property="JSON_fragment_column" text="fragment" /> | |
| 43 <has_json_property_with_text property="JSON_sequence_column" text="sequence" /> | |
| 44 <has_json_property_with_text property="JSON_annotation_column" text="annotation" /> | |
| 45 </assert_contents> | |
| 46 </output> | |
| 47 </test> | |
| 48 <!--test execution is false --> | |
| 49 <test> | |
| 50 <param name="execution" value="False" /> | |
| 51 <param name="db_uri" value="postgresql://postgres:RK17@localhost:5432/test_fragments_db" /> | |
| 52 <param name="table_name" value="sample" /> | |
| 53 <param name="fragment_column" value="fragment" /> | |
| 54 <param name="sequence_column" value="sequence" /> | |
| 55 <param name="annotation_column" value="annotation" /> | |
| 56 <output name="output_json"> | |
| 57 <assert_contents> | |
| 58 <has_json_property_with_text property="execution" text="false" /> | |
| 59 <has_json_property_with_text property="JSON_db_uri" text="postgresql://postgres:RK17__at__localhost:5432/test_fragments_db" /> | |
| 60 <has_json_property_with_text property="JSON_table" text="sample" /> | |
| 61 <has_json_property_with_text property="JSON_fragment_column" text="fragment" /> | |
| 62 <has_json_property_with_text property="JSON_sequence_column" text="sequence" /> | |
| 63 <has_json_property_with_text property="JSON_annotation_column" text="annotation" /> | |
| 64 </assert_contents> | |
| 65 </output> | |
| 66 </test> | |
| 67 </tests> | |
| 68 | |
| 69 <help><![CDATA[ | |
| 70 JSON DB_Config Generating | |
| 71 ========================= | |
| 72 | |
| 73 Generate a JSON file to be used as a DB configuration. This JSON file can later be used to access the database via the specified URI, as well as the defined table and column names. | |
| 74 This tool is primarily designed to control the execution of the save_to_db tool by enabling or disabling its execution and by providing the database configuration through a JSON file. | |
| 75 | |
| 76 **Parameters**: | |
| 77 --------------- | |
| 78 * **execution key**: The value of execution key in the JSON (true or false) | |
| 79 * **DB Table Name**: Name of the target table in the PostgreSQL database. | |
| 80 * **DB Column Contains Sequence For ganbank File**: Column storing sequence data, expected to start with "ORIGIN". | |
| 81 * **DB Column Contains Annotation For Ganbank File**: Column containing annotation data, to save al part before "ORIGIN" in the .gb file. | |
| 82 * **DB IDs Column Name**: Column holding the unique fragment IDs. | |
| 83 * **DB Connection URI**: URI used to connect to the database (e.g., postgresql://user:password@host:port/DB_name). | |
| 84 * NOTE: This tool is designed to manage the execution of save_to_db within a workflow. If parameters are set directly in save_to_db via the user interface, the JSON file data will be ignored. | |
| 85 ]]></help> | |
| 86 <citations> | |
| 87 <citation type="bibtex"> | |
| 88 @unpublished{json_db_config_generating | |
| 89 author = {Ramiz Khaled}, | |
| 90 title = {{json_db_config_generating}}, | |
| 91 url = {https://github.com/brsynth/}, | |
| 92 } | |
| 93 </citation> | |
| 94 </citations> | |
| 95 </tool> |
