annotate combineJSON.xml @ 1:661bc10b0612 draft default tip

planemo upload commit 67dd8ca7284a045d8b96fa2bcef60dd101693cca-dirty
author nml
date Fri, 13 Apr 2018 13:46:46 -0400
parents 116510205617
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
1 <tool id="combine_json" name="Combine Json" version="0.1">
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
2 <description>Combine multiple JSON Arrays</description>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
3 <command detect_errors="exit_code"><![CDATA[
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
4 python $__tool_directory__/combineJSON.py
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
5
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
6 -i
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
7
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
8 #for $f in $json_files.keys
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
9 $json_files[$f]
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
10 #end for
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
11
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
12 -o 'jsoncombined.json'
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
13 ]]></command>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
14 <inputs>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
15 <param name="json_files" type="data_collection" label="Collection of JSON arrays" help="" optional="false" collection_type="list"/>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
16 </inputs>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
17 <outputs>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
18 <data format="json" name="jsoncombined.json" from_work_dir="jsoncombined.json" label="Combined JSON Array"/>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
19 </outputs>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
20 <tests>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
21 <test>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
22 <param name="json_files">
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
23 <collection type="list">
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
24 <element name="json1" value="json1.json" />
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
25 <element name="json2" value="json2.json" />
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
26 </collection>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
27 </param>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
28 <output name="jsoncombined.json" file="jsoncombined.json" />
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
29 </test>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
30 </tests>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
31 <help><![CDATA[
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
32 ***************
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
33 combine_json
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
34 ***************
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
35
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
36 This tool takes two or more JSON arrays and combines them into one JSON array.
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
37
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
38 Usage
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
39 =====
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
40 1) Input JSON files in a dataset collection
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
41 2) Click Execute
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
42
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
43 Example
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
44 =======
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
45
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
46 .. code:: javascript
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
47
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
48 JsonArray1
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
49 [
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
50 {hello: test}
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
51 ]
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
52
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
53 JsonArray2
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
54 [
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
55 {world: testerson}
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
56 ]
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
57
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
58
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
59 `combineJson -JsonArray1.json -JsonArray2.json`
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
60
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
61 .. code:: javascript
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
62
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
63 JsonCombined
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
64 [
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
65 {hello: test},
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
66 {world: testerson}
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
67 ]
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
68
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
69 ]]></help>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
70 <citations>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
71 <citation type="bibtex">@ARTICLE{a1,
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
72 title = {JSON Combine}
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
73 author = {Matthew Gopez}
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
74 }
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
75 }</citation>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
76 </citations>
116510205617 planemo upload commit dd7f4dc22bbe2f26aafd07a345997db79d9e5ad1
nml
parents:
diff changeset
77 </tool>