comparison 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
comparison
equal deleted inserted replaced
0:1a766d8d3883 1:34135dac85b0
1 <tool id="parameters_maystro" name="Parameters Maystro" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.09"> 1 <tool id="parameters_maystro" name="Workflow-0 Parameters Maystro" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.09">
2 <description>Store parameters of tools in a workflow to be used again</description> 2 <description>Store parameters of workflow-0 to be used again</description>
3 <macros> 3 <macros>
4 <token name="@VERSION_SUFFIX@">1</token> 4 <token name="@VERSION_SUFFIX@">3</token>
5 <token name="@TOOL_VERSION@">0.1.0</token> 5 <token name="@TOOL_VERSION@">1.1.0</token>
6 </macros> 6 </macros>
7 <command detect_errors="exit_code"><![CDATA[ 7 <command detect_errors="exit_code"><![CDATA[
8 #set $json_files = ' '.join(['"%s"' % file for file in $json_from_workflow]) 8 #if $user_json and str($user_json) != 'None':
9 #set $json_name_mapping = ",".join(["%s:%s" % (file.file_name, file.name) for file in $json_from_workflow]) 9 cp '$user_json' '$output_json'
10 python '$__tool_directory__/maystro.py' 10 #else
11 --distribute_json '$distribute_json' 11 python3 -c "import json; params = {
12 --json_from_workflow $json_files 12 'avoid_patterns': '$avoid_patterns',
13 --json_from_user '$json_from_user' 13 'hairpin_constraints': '$hairpin_constraints',
14 --json_name_mapping $json_name_mapping 14 'gc_constraints': '$gc_constraints',
15 --output_workflow '$output_workflow' 15 'kmer_size': '$kmer_size',
16 --output_user '$output_user' && echo 'DEBUB' && cat '$output_user' 16 'execution': '$execution',
17 'db_uri': '$db_uri',
18 'table': '$table_name',
19 'fragment_column': '$fragment_column',
20 'sequence_column': '$sequence_column',
21 'annotation_column': '$annotation_column'
22 }; f = open('$output_json', 'w'); json.dump(params, f, indent=4); f.close()" && echo DEBG && cat '$output_json'
23 #end if
24 && echo DEBG && cat '$output_json'
17 ]]></command> 25 ]]></command>
18 <inputs> 26 <inputs>
19 <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" /> 27 <param name="avoid_patterns" type="text" area="true" optional="true" label="Avoid Patterns (one per line)" />
20 <param name="json_from_workflow" type="data" format="json" multiple="true" optional="true" help='Only if Input Your Parameters As JSON is FALSE' /> 28 <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"/>
21 <param name="json_from_user" type="data" format="json" optional="true" help='Only if Input Your Parameters As JSON is TRUE' /> 29 <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"/>
30 <param name="kmer_size" type="integer" label="K-mer Uniqueness Size" value="" optional="true" help="e.g.: 15"/>
31 <param name="execution" type="boolean" label="Save To DB ?" checked ='false' optional="true" help="If True data will be saved in the DB" />
32 <param name="db_uri" type="text" optional="true" help='Only if Input Your Parameters As JSON is FALSE' />
33 <param name="table_name" type="text" optional="true" help='table name in DB' />
34 <param name="fragment_column" type="text" optional="true" help='Fragmnet column in DB' />
35 <param name="sequence_column" type="text" optional="true" help='Sequence column in DB' />
36 <param name="annotation_column" type="text" optional="true" help='Annotation column in DB' />
37 <param name="user_json" type="data" format="json" optional="true" help='Only if Input Your Parameters As JSON is TRUE' />
22 </inputs> 38 </inputs>
23 <outputs> 39 <outputs>
24 <data name="output_workflow" format="json" label="workflow param"/> 40 <data name="output_json" format="json" label="Workflow-0 Parameters"/>
25 <data name="output_user" format="json" label="user_workflow param"/>
26 </outputs> 41 </outputs>
27 <tests> 42 <tests>
28 <!--distribute_json is false--> 43 <!--manual parameters set-->
29 <test> 44 <test>
30 <param name="distribute_json" value='false'/> 45 <param name="avoid_patterns" value="BsaI_site
31 <param name="json_from_workflow" value="seq_from_db_param.json,seq_to_db_param.json"/> 46 BsmBI_site
32 <output name="output_user"> 47 BbsI_site
48 SapI_site
49 8x1mer
50 5x3mer
51 9x2mer" />
52 <param name="hairpin_constraints" value='stem_size=20, hairpin_window=200'/>
53 <param name="gc_constraints" value="mini=0.3, maxi=0.7, window=100
54 mini=0.1, maxi=0.9, window=100"/>
55 <param name="kmer_size" value="15" />
56 <param name="execution" value="true" />
57 <param name="db_uri" value="postgresql://postgres:RK17@localhost:5432/test_fragments_db" />
58 <param name="table_name" value="sample" />
59 <param name="fragment_column" value="fragment" />
60 <param name="sequence_column" value="sequence" />
61 <param name="annotation_column" value="annotation" />
62 <output name="output_json">
33 <assert_contents> 63 <assert_contents>
34 <has_n_lines n="17" /> 64 <has_n_lines n="12" />
35 </assert_contents>
36 </output>
37 <output name="output_workflow">
38 <assert_contents>
39 <has_n_lines n="0" />
40 </assert_contents> 65 </assert_contents>
41 </output> 66 </output>
42 </test> 67 </test>
43 <!--distribute_json is true --> 68 <!--JSON parameters set-->
44 <test> 69 <test>
45 <param name="distribute_json" value='true'/> 70 <param name="user_json" value='test_json.json'/>
46 <param name="json_from_workflow" value="seq_from_db_param.json,seq_to_db_param.json"/> 71 <output name="output_json">
47 <param name="json_from_user" value='merged_test.json'/>
48 <output name="output_workflow">
49 <assert_contents> 72 <assert_contents>
50 <has_n_lines n="17" /> 73 <has_n_lines n="12" />
51 </assert_contents>
52 </output>
53 <output name="output_user">
54 <assert_contents>
55 <has_n_lines n="0" />
56 </assert_contents> 74 </assert_contents>
57 </output> 75 </output>
58 </test> 76 </test>
59 </tests> 77 </tests>
60 <help><![CDATA[ 78 <help><![CDATA[
61 Parameters Maystro 79 Parameters Maystro
62 =================== 80 ===================
63 81
64 Store and Generate a JSON file to be used as a workflow configuration. This JSON file can later be used to pass workflow parameters 82 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
65 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. 83
66 ]]></help> 84 ]]></help>
67 <citations> 85 <citations>
68 <citation type="bibtex"> 86 <citation type="bibtex">
69 @unpublished{json_db_config_generating 87 @unpublished{json_db_config_generating
70 author = {Ramiz Khaled}, 88 author = {Ramiz Khaled},