Mercurial > repos > tduigou > json_db_config_generating
comparison json_db_config_generating.xml @ 1:2909e53fac5b draft
planemo upload for repository https://github.com/brsynth commit 6ae809b563b40bcdb6be2e74fe2a84ddad5484ae
| author | tduigou |
|---|---|
| date | Mon, 02 Jun 2025 14:54:24 +0000 |
| parents | 95757ea6c333 |
| children | 33ebf3ea3eb6 |
comparison
equal
deleted
inserted
replaced
| 0:95757ea6c333 | 1:2909e53fac5b |
|---|---|
| 10 'JSON_db_uri': '$db_uri', | 10 'JSON_db_uri': '$db_uri', |
| 11 'JSON_table': '$table_name', | 11 'JSON_table': '$table_name', |
| 12 'JSON_fragment_column': '$fragment_column', | 12 'JSON_fragment_column': '$fragment_column', |
| 13 'JSON_sequence_column': '$sequence_column', | 13 'JSON_sequence_column': '$sequence_column', |
| 14 'JSON_annotation_column': '$annotation_column' | 14 'JSON_annotation_column': '$annotation_column' |
| 15 }; f = open('$output_json', 'w'); json.dump(params, f, indent=4); f.close()" | 15 }; f = open('$output_json', 'w'); json.dump(params, f, indent=4); f.close()" && echo DEBG && cat '$output_json' |
| 16 ]]></command> | 16 ]]></command> |
| 17 <inputs> | 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" /> | 18 <conditional name="db_request"> |
| 19 <param name="db_uri" type="text" label="DB Connection URI" optional="true" /> | 19 <param name="execution" type="select" label="Save To DB ?" help="If True the execution key in the json file will be true" optional="false"> |
| 20 <param name="table_name" type="text" label="DB Table Name" optional="true" /> | 20 <option value="false" selected="True">NO</option> |
| 21 <param name="fragment_column" type="text" label="DB IDs Column Name" optional="true" /> | 21 <option value="true">YES</option> |
| 22 <param name="sequence_column" type="text" label="DB Column Contains Sequence For ganbank File" optional="true" /> | 22 </param> |
| 23 <param name="annotation_column" type="text" label="DB Column Contains Annotation For Ganbank File" optional="true" /> | 23 <when value='true'> |
| 24 <section name='db_config' title='DB config' expanded='true'> | |
| 25 <param name="db_uri" type="text" label="DB Connection URI" optional="true" /> | |
| 26 <param name="table_name" type="text" label="DB Table Name" optional="true" /> | |
| 27 <param name="fragment_column" type="text" label="DB IDs Column Name" optional="true" /> | |
| 28 <param name="sequence_column" type="text" label="DB Column Contains Sequence For ganbank File" optional="true" /> | |
| 29 <param name="annotation_column" type="text" label="DB Column Contains Annotation For Ganbank File" optional="true" /> | |
| 30 </section> | |
| 31 </when> | |
| 32 <when value='false'> | |
| 33 <section name='db_config' title='DB config' expanded='false'> | |
| 34 <param name="db_uri" type="text" label="DB Connection URI" optional="true" /> | |
| 35 <param name="table_name" type="text" label="DB Table Name" optional="true" /> | |
| 36 <param name="fragment_column" type="text" label="DB IDs Column Name" optional="true" /> | |
| 37 <param name="sequence_column" type="text" label="DB Column Contains Sequence For ganbank File" optional="true" /> | |
| 38 <param name="annotation_column" type="text" label="DB Column Contains Annotation For Ganbank File" optional="true" /> | |
| 39 </section> | |
| 40 </when> | |
| 41 </conditional> | |
| 24 </inputs> | 42 </inputs> |
| 25 <outputs> | 43 <outputs> |
| 26 <data name="output_json" format="json" label="JSON Conf" /> | 44 <data name="output_json" format="json" label="JSON Conf" /> |
| 27 </outputs> | 45 </outputs> |
| 28 <tests> | 46 <tests> |
| 29 <!--test execution is true --> | 47 <!--test execution is true --> |
| 30 <test> | 48 <test> |
| 31 <param name="execution" value="True" /> | 49 <conditional name="db_request"> |
| 32 <param name="db_uri" value="postgresql://postgres:RK17@localhost:5432/test_fragments_db" /> | 50 <param name="execution" value="true" /> |
| 33 <param name="table_name" value="sample" /> | 51 <param name="db_config|db_uri" value="postgresql://postgres:RK17@localhost:5432/test_fragments_db" /> |
| 34 <param name="fragment_column" value="fragment" /> | 52 <param name="db_config|table_name" value="sample" /> |
| 35 <param name="sequence_column" value="sequence" /> | 53 <param name="db_config|fragment_column" value="fragment" /> |
| 36 <param name="annotation_column" value="annotation" /> | 54 <param name="db_config|sequence_column" value="sequence" /> |
| 55 <param name="db_config|annotation_column" value="annotation" /> | |
| 56 </conditional> | |
| 37 <output name="output_json"> | 57 <output name="output_json"> |
| 38 <assert_contents> | 58 <assert_contents> |
| 39 <has_json_property_with_text property="execution" text="true" /> | 59 <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" /> | 60 <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" /> | 61 <has_json_property_with_text property="JSON_table" text="sample" /> |
| 45 </assert_contents> | 65 </assert_contents> |
| 46 </output> | 66 </output> |
| 47 </test> | 67 </test> |
| 48 <!--test execution is false --> | 68 <!--test execution is false --> |
| 49 <test> | 69 <test> |
| 50 <param name="execution" value="False" /> | 70 <conditional name="db_request"> |
| 51 <param name="db_uri" value="postgresql://postgres:RK17@localhost:5432/test_fragments_db" /> | 71 <param name="execution" value="false" /> |
| 52 <param name="table_name" value="sample" /> | 72 </conditional> |
| 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"> | 73 <output name="output_json"> |
| 57 <assert_contents> | 74 <assert_contents> |
| 58 <has_json_property_with_text property="execution" text="false" /> | 75 <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" /> | 76 <has_json_property_with_text property="JSON_db_uri" text="" /> |
| 60 <has_json_property_with_text property="JSON_table" text="sample" /> | 77 <has_json_property_with_text property="JSON_table" text="" /> |
| 61 <has_json_property_with_text property="JSON_fragment_column" text="fragment" /> | 78 <has_json_property_with_text property="JSON_fragment_column" text="" /> |
| 62 <has_json_property_with_text property="JSON_sequence_column" text="sequence" /> | 79 <has_json_property_with_text property="JSON_sequence_column" text="" /> |
| 63 <has_json_property_with_text property="JSON_annotation_column" text="annotation" /> | 80 <has_json_property_with_text property="JSON_annotation_column" text="" /> |
| 64 </assert_contents> | 81 </assert_contents> |
| 65 </output> | 82 </output> |
| 66 </test> | 83 </test> |
| 67 </tests> | 84 </tests> |
| 68 | 85 |
