Mercurial > repos > guerler > dbkit
annotate dbkit_create.xml @ 2:81c7d4668a7e draft
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
author | guerler |
---|---|
date | Wed, 16 Dec 2020 12:02:48 +0000 |
parents | 987e55ea29b8 |
children | 03e124ff7e26 |
rev | line source |
---|---|
0
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
1 <tool id="dbkit_create" name="DBKit Create" version="0.1.1" python_template_version="3.5" license="MIT"> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
2 <description>database generator</description> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
3 <command detect_errors="exit_code"><![CDATA[ |
2
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
4 #if str($source.type) == "false": |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
5 mkdir -p inputs && |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
6 #for item in $source.inputs |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
7 cp '${str(item)}' 'inputs/${item.element_identifier}' && |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
8 #end for |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
9 #end if |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
10 python3 '$__tool_directory__/dbkit_create.py' -l '$input' -u '$source.url' -p 'inputs' -o '$index' -d '$database' -g '$log' -il '$advanced.idlength' -ic '$advanced.idcase' -ie '$advanced.idextension' |
0
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
11 ]]></command> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
12 <inputs> |
2
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
13 <param format="tabular" name="input" type="data" label="List of Identifiers" help="Specify a list containing all entry identifiers to be downloaded."/> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
14 <conditional name="source"> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
15 <param name="type" type="boolean" label="Download from URL"/> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
16 <when value="true"> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
17 <param name="url" type="text" label="URL to External Source" help="Specify the URL to the external database source."> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
18 <option value="https://files.rcsb.org/download/">https://files.rcsb.org/download/</option> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
19 </param> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
20 <param name="inputs" type="hidden"/> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
21 </when> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
22 <when value="false"> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
23 <param name="url" type="hidden"/> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
24 <param name="inputs" type="data_collection" collection_type="list" label="Collection" help="Specify a collection containing the datasets."/> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
25 </when> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
26 </conditional> |
0
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
27 <conditional name="advanced"> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
28 <param name="type" type="boolean" label="Identifier Formatting Options" /> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
29 <when value="true"> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
30 <param name="idextension" type="text" label="Identifier Extensions" help="Specify the extension of the identifier (optional)."/> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
31 <param name="idlength" type="integer" label="Identifier Length" value="0" min="0" max="20" help="Specify the length of the identifier (disable=0)."/> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
32 <param name="idcase" type="select" label="Identifier Case" display="radio" help="Choose to format the identifier by changing its case (optional)."> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
33 <option value="">Unformatted</option> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
34 <option value="lower">Lower</option> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
35 <option value="upper">Upper</option> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
36 </param> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
37 </when> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
38 <when value="false"> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
39 <param name="idextension" type="hidden" value="" /> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
40 <param name="idlength" type="hidden" value="0" /> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
41 <param name="idcase" type="hidden" value="" /> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
42 </when> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
43 </conditional> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
44 </inputs> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
45 <outputs> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
46 <data format="ffindex" name="index" label="DBKit Index"/> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
47 <data format="ffdata" name="database" label="DBKit Database" /> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
48 <data format="txt" name="log" label="DBKit Log" /> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
49 </outputs> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
50 <tests> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
51 <test> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
52 <param name="input" value="create/chains.tabular" /> |
2
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
53 <conditional name="source"> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
54 <param name="type" value="true"/> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
55 <param name="url" value="https://files.rcsb.org/download/" /> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
56 </conditional> |
0
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
57 <conditional name="advanced"> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
58 <param name="type" value="true" /> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
59 <param name="idextension" value="pdb" /> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
60 <param name="idlength" value="4" /> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
61 <param name="idcase" value="lower" /> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
62 </conditional> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
63 <param format="tabular" name="database" value="roc/biogrid_fret.txt" /> |
2
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
64 <output name="index" file="create/first.ffindex" /> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
65 <output name="database" file="create/first.ffdata" /> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
66 </test> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
67 <test> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
68 <param name="input" value="create/sequences.tabular" /> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
69 <conditional name="source"> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
70 <param name="type" value="false"/> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
71 <param name="inputs"> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
72 <collection type="list"> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
73 <element name="NP_000282.1.hhr" value="create/NP_000282.1.hhr" /> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
74 <element name="NP_000290.2.hhr" value="create/NP_000290.2.hhr" /> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
75 <element name="NP_000548.2.hhr" value="create/NP_000548.2.hhr" /> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
76 <element name="NP_000836.2.hhr" value="create/NP_000836.2.hhr" /> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
77 </collection> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
78 </param> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
79 </conditional> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
80 <conditional name="advanced"> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
81 <param name="type" value="false" /> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
82 </conditional> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
83 <output name="index" file="create/sequences.ffindex" /> |
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
84 <output name="database" file="create/sequences.ffdata" /> |
0
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
85 </test> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
86 </tests> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
87 <help><![CDATA[ |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
88 This database creation tool downloads entries from an external resource and creates a datasets with all its contents. Additionally an index file is |
2
81c7d4668a7e
"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents:
1
diff
changeset
|
89 generated indicating the start and size of every entry within the database file. The tool can also operate on collections. |
0
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
90 ]]></help> |
1914107cc967
"planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff
changeset
|
91 </tool> |