annotate dbkit_create.xml @ 3:03e124ff7e26 draft

"planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
author guerler
date Wed, 16 Dec 2020 13:11:35 +0000
parents 81c7d4668a7e
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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">
3
03e124ff7e26 "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 2
diff changeset
2 <description>database</description>
03e124ff7e26 "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 2
diff changeset
3 <requirements>
03e124ff7e26 "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 2
diff changeset
4 <requirement type="package" version="3.2">python-wget</requirement>
03e124ff7e26 "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 2
diff changeset
5 </requirements>
0
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
6 <command detect_errors="exit_code"><![CDATA[
2
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
7 #if str($source.type) == "false":
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
8 mkdir -p inputs &&
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
9 #for item in $source.inputs
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
10 cp '${str(item)}' 'inputs/${item.element_identifier}' &&
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
11 #end for
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
12 #end if
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
13 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
14 ]]></command>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
15 <inputs>
2
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
16 <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
17 <conditional name="source">
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
18 <param name="type" type="boolean" label="Download from URL"/>
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
19 <when value="true">
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
20 <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
21 <option value="https://files.rcsb.org/download/">https://files.rcsb.org/download/</option>
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
22 </param>
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
23 <param name="inputs" type="hidden"/>
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
24 </when>
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
25 <when value="false">
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
26 <param name="url" type="hidden"/>
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
27 <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
28 </when>
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
29 </conditional>
0
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
30 <conditional name="advanced">
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
31 <param name="type" type="boolean" label="Identifier Formatting Options" />
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
32 <when value="true">
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
33 <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
34 <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
35 <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
36 <option value="">Unformatted</option>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
37 <option value="lower">Lower</option>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
38 <option value="upper">Upper</option>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
39 </param>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
40 </when>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
41 <when value="false">
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
42 <param name="idextension" type="hidden" value="" />
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
43 <param name="idlength" type="hidden" value="0" />
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
44 <param name="idcase" type="hidden" value="" />
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
45 </when>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
46 </conditional>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
47 </inputs>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
48 <outputs>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
49 <data format="ffindex" name="index" label="DBKit Index"/>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
50 <data format="ffdata" name="database" label="DBKit Database" />
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
51 <data format="txt" name="log" label="DBKit Log" />
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
52 </outputs>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
53 <tests>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
54 <test>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
55 <param name="input" value="create/chains.tabular" />
2
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
56 <conditional name="source">
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
57 <param name="type" value="true"/>
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
58 <param name="url" value="https://files.rcsb.org/download/" />
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
59 </conditional>
0
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
60 <conditional name="advanced">
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
61 <param name="type" value="true" />
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
62 <param name="idextension" value="pdb" />
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
63 <param name="idlength" value="4" />
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
64 <param name="idcase" value="lower" />
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
65 </conditional>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
66 <param format="tabular" name="database" value="roc/biogrid_fret.txt" />
2
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
67 <output name="index" file="create/first.ffindex" />
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
68 <output name="database" file="create/first.ffdata" />
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
69 </test>
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
70 <test>
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
71 <param name="input" value="create/sequences.tabular" />
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
72 <conditional name="source">
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
73 <param name="type" value="false"/>
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
74 <param name="inputs">
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
75 <collection type="list">
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
76 <element name="NP_000282.1.hhr" value="create/NP_000282.1.hhr" />
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
77 <element name="NP_000290.2.hhr" value="create/NP_000290.2.hhr" />
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
78 <element name="NP_000548.2.hhr" value="create/NP_000548.2.hhr" />
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
79 <element name="NP_000836.2.hhr" value="create/NP_000836.2.hhr" />
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
80 </collection>
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
81 </param>
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 <conditional name="advanced">
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
84 <param name="type" value="false" />
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
85 </conditional>
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
86 <output name="index" file="create/sequences.ffindex" />
81c7d4668a7e "planemo upload commit bd03b7888eab0b010acfc3affd38bf4d4e2bb1ef-dirty"
guerler
parents: 1
diff changeset
87 <output name="database" file="create/sequences.ffdata" />
0
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
88 </test>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
89 </tests>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
90 <help><![CDATA[
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
91 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
92 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
93 ]]></help>
1914107cc967 "planemo upload commit 3632646bec5edbe47e06c894e32bfd215b895555-dirty"
guerler
parents:
diff changeset
94 </tool>