Mercurial > repos > tduigou > parameters_maystro
diff json_db_config_generating_boolean.xml @ 1:34135dac85b0 draft default tip
planemo upload for repository https://github.com/brsynth commit d8cc8b87fdb0374745b5420f2da7f08ae905c222-dirty
| author | tduigou |
|---|---|
| date | Wed, 16 Jul 2025 14:28:21 +0000 |
| parents | 1a766d8d3883 |
| children |
line wrap: on
line diff
--- a/json_db_config_generating_boolean.xml Fri Jul 11 10:10:16 2025 +0000 +++ b/json_db_config_generating_boolean.xml Wed Jul 16 14:28:21 2025 +0000 @@ -1,58 +1,76 @@ -<tool id="parameters_maystro" name="Parameters Maystro" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.09"> - <description>Store parameters of tools in a workflow to be used again</description> +<tool id="parameters_maystro" name="Workflow-0 Parameters Maystro" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.09"> + <description>Store parameters of workflow-0 to be used again</description> <macros> - <token name="@VERSION_SUFFIX@">1</token> - <token name="@TOOL_VERSION@">0.1.0</token> + <token name="@VERSION_SUFFIX@">3</token> + <token name="@TOOL_VERSION@">1.1.0</token> </macros> <command detect_errors="exit_code"><![CDATA[ - #set $json_files = ' '.join(['"%s"' % file for file in $json_from_workflow]) - #set $json_name_mapping = ",".join(["%s:%s" % (file.file_name, file.name) for file in $json_from_workflow]) - python '$__tool_directory__/maystro.py' - --distribute_json '$distribute_json' - --json_from_workflow $json_files - --json_from_user '$json_from_user' - --json_name_mapping $json_name_mapping - --output_workflow '$output_workflow' - --output_user '$output_user' && echo 'DEBUB' && cat '$output_user' + #if $user_json and str($user_json) != 'None': + cp '$user_json' '$output_json' + #else + python3 -c "import json; params = { + 'avoid_patterns': '$avoid_patterns', + 'hairpin_constraints': '$hairpin_constraints', + 'gc_constraints': '$gc_constraints', + 'kmer_size': '$kmer_size', + 'execution': '$execution', + 'db_uri': '$db_uri', + 'table': '$table_name', + 'fragment_column': '$fragment_column', + 'sequence_column': '$sequence_column', + 'annotation_column': '$annotation_column' + }; f = open('$output_json', 'w'); json.dump(params, f, indent=4); f.close()" && echo DEBG && cat '$output_json' + #end if + && echo DEBG && cat '$output_json' ]]></command> <inputs> - <param name="distribute_json" type="boolean" label="Input Your Parameters As JSON" checked ='false' help="If True user should set workflow parameters as json file" /> - <param name="json_from_workflow" type="data" format="json" multiple="true" optional="true" help='Only if Input Your Parameters As JSON is FALSE' /> - <param name="json_from_user" type="data" format="json" optional="true" help='Only if Input Your Parameters As JSON is TRUE' /> + <param name="avoid_patterns" type="text" area="true" optional="true" label="Avoid Patterns (one per line)" /> + <param name="hairpin_constraints" type="text" area="true" label="Hairpins Constraints" optional="true" help="e.g. (you can add others Hairpins Constraints on a new line): stem_size=20, hairpin_window=200"/> + <param name="gc_constraints" type="text" area="true" label="Enforce GC Content Constraints" optional="true" help="e.g. (you can add others Enforce GC Content Constraints on a new line): mini=0.3, maxi=0.7, window=100"/> + <param name="kmer_size" type="integer" label="K-mer Uniqueness Size" value="" optional="true" help="e.g.: 15"/> + <param name="execution" type="boolean" label="Save To DB ?" checked ='false' optional="true" help="If True data will be saved in the DB" /> + <param name="db_uri" type="text" optional="true" help='Only if Input Your Parameters As JSON is FALSE' /> + <param name="table_name" type="text" optional="true" help='table name in DB' /> + <param name="fragment_column" type="text" optional="true" help='Fragmnet column in DB' /> + <param name="sequence_column" type="text" optional="true" help='Sequence column in DB' /> + <param name="annotation_column" type="text" optional="true" help='Annotation column in DB' /> + <param name="user_json" type="data" format="json" optional="true" help='Only if Input Your Parameters As JSON is TRUE' /> </inputs> <outputs> - <data name="output_workflow" format="json" label="workflow param"/> - <data name="output_user" format="json" label="user_workflow param"/> + <data name="output_json" format="json" label="Workflow-0 Parameters"/> </outputs> <tests> - <!--distribute_json is false--> + <!--manual parameters set--> <test> - <param name="distribute_json" value='false'/> - <param name="json_from_workflow" value="seq_from_db_param.json,seq_to_db_param.json"/> - <output name="output_user"> + <param name="avoid_patterns" value="BsaI_site + BsmBI_site + BbsI_site + SapI_site + 8x1mer + 5x3mer + 9x2mer" /> + <param name="hairpin_constraints" value='stem_size=20, hairpin_window=200'/> + <param name="gc_constraints" value="mini=0.3, maxi=0.7, window=100 + mini=0.1, maxi=0.9, window=100"/> + <param name="kmer_size" value="15" /> + <param name="execution" value="true" /> + <param name="db_uri" value="postgresql://postgres:RK17@localhost:5432/test_fragments_db" /> + <param name="table_name" value="sample" /> + <param name="fragment_column" value="fragment" /> + <param name="sequence_column" value="sequence" /> + <param name="annotation_column" value="annotation" /> + <output name="output_json"> <assert_contents> - <has_n_lines n="17" /> - </assert_contents> - </output> - <output name="output_workflow"> - <assert_contents> - <has_n_lines n="0" /> + <has_n_lines n="12" /> </assert_contents> </output> </test> - <!--distribute_json is true --> + <!--JSON parameters set--> <test> - <param name="distribute_json" value='true'/> - <param name="json_from_workflow" value="seq_from_db_param.json,seq_to_db_param.json"/> - <param name="json_from_user" value='merged_test.json'/> - <output name="output_workflow"> + <param name="user_json" value='test_json.json'/> + <output name="output_json"> <assert_contents> - <has_n_lines n="17" /> - </assert_contents> - </output> - <output name="output_user"> - <assert_contents> - <has_n_lines n="0" /> + <has_n_lines n="12" /> </assert_contents> </output> </test> @@ -61,8 +79,8 @@ Parameters Maystro =================== -Store and Generate a JSON file to be used as a workflow configuration. This JSON file can later be used to pass workflow parameters -This tool is recieve parameters from tools in workflow and return them as a JSON file that can be used later to pass thos parameters again. +Store and Generate a JSON file to be used as workflow-0 configuration. This JSON file can later be used as input to pass workflow-0 parameters + ]]></help> <citations> <citation type="bibtex">
