1
|
1 <tool id="versioned_data" name="Versioned data retrieval" version="0.1.03">
|
|
2 <description>Retrieve versioned sequence files and/or their blast, bowtie, etc. database indexes</description>
|
|
3 <macros>
|
|
4 <token name="@BINARY@">versioned_data.py</token>
|
|
5 <import>bccdc_macros.xml</import>
|
|
6 </macros>
|
|
7 <expand macro="requirements" />
|
|
8 <command interpreter="python">
|
|
9 #assert $__user__, Exception( 'You must be logged in to use this tool.' )
|
|
10 versioned_data.py
|
|
11 #if $globalRetrievalDate.strip() > ''
|
|
12 -d "$globalRetrievalDate"
|
|
13 #end if
|
|
14 -r
|
|
15 "
|
|
16 #for $v in $versions:
|
|
17 ${v.database},
|
|
18 #for $r in $v.retrieval:
|
|
19 ${r.retrievalId}
|
|
20 #end for
|
|
21 ,
|
|
22 #for $w in $v.workflows:
|
|
23 ${w.workflow}
|
|
24 #end for
|
|
25 |
|
|
26 #end for
|
|
27 "
|
|
28 -o "$log"
|
|
29 -O "$__app__.security.encode_id($log.id)"
|
|
30 --api_info_path "$api_info_path" ##Actually a file path to configfile that holds api key
|
|
31 </command>
|
|
32 <!-- #:$log.hid:$log.id dataset_id -->
|
|
33 <expand macro="stdio" />
|
|
34
|
|
35 <inputs>
|
|
36 <!-- Implement as datepicker? http://www.learnfaceit.org/for-developers/adding-parameter-types-to-tool -->
|
|
37 <param name="globalRetrievalDate" type="text" label="Global retrieval date [YYYY-MM-DD]" help="The recall system will use this date to try to select the appropriate versions below. Leave empty to select current versions." size="25" />
|
|
38
|
|
39 <param name="api_info" display="radio" type="drill_down" label="For user with Galaxy API Key" dynamic_options="vdb_init_tool_user(__trans__)" />
|
|
40
|
|
41 <repeat name="versions" title="Data Source" min="1" max="15">
|
|
42
|
|
43 <param name="database" type="select" label="Data" dynamic_options="vdb_get_databases()" multiple="false" />
|
|
44
|
|
45 <repeat name="retrieval" title="Retrieval" min="0" max="1">
|
|
46 <param name="retrievalId" label="Version date/id" type="select" dynamic_options="vdb_get_versions(database, globalRetrievalDate)"/>
|
|
47 </repeat>
|
|
48
|
|
49 <repeat name="workflows" title="Workflow" min="0" max="5" >
|
|
50 <param name="workflow" type="select" label="Name" dynamic_options="vdb_get_workflows(database)" />
|
|
51 </repeat>
|
|
52
|
|
53 </repeat>
|
|
54
|
|
55 </inputs>
|
|
56
|
|
57 <configfiles>
|
|
58 <configfile name="api_info_path">${__user__.api_keys[0].key}
|
|
59 $api_info
|
|
60 </configfile>
|
|
61 </configfiles>
|
|
62
|
|
63 <outputs>
|
|
64 <data name="log" format="txt" label="Versioned Data Retrieval" />
|
|
65 </outputs>
|
|
66
|
|
67 <code file="versioned_data_form.py" />
|
|
68
|
|
69 <tests>
|
|
70 <test>
|
|
71 <param name="db_type" value="nucl"/>
|
|
72 <!-- ... -->
|
|
73 </test>
|
|
74 </tests>
|
|
75
|
|
76 <help>
|
|
77
|
|
78 .. class:: infomark
|
|
79
|
|
80
|
|
81 **What it does**
|
|
82
|
|
83 This tool retrieves links to current or past versions of fasta or other types of
|
|
84 data from a cache kept in the Galaxy data library called "Versioned Data". It then places
|
|
85 them into one's current history so that subsequent tools can work with that data.
|
|
86
|
|
87 For example, after using this tool to select a version of the NCBI nt database, a blast search can be carried out on it by selecting "BLAST database from your history" from the "Subject database/sequences" field of the NCBI BLAST+ search tool.
|
|
88
|
|
89 You can select one or more files or databases by version date or id. This list
|
|
90 is supplied from the Shared Data > Data Libraries > Versioned Data folder that has
|
|
91 been set up by an administrator.
|
|
92
|
|
93 The Workflows section allows you to select one or more pre-defined workflows
|
|
94 to execute on the versioned data. The results are placed in your history for use
|
|
95 by other tools or workflows.
|
|
96
|
|
97 A caching system exists to cache the versioned data or workflow data that the tool generates.
|
|
98 If you request versioned data or derivative data that isn't cached, it may take time to regenerate.
|
|
99
|
|
100 The top-level "Global retrieval date [YYYY-MM-DD]" field that the form starts with will be applied to
|
|
101 all selected databases. This can be overriden by a retrieval date or version that
|
|
102 you supply for a particular database. Leave it and any "Retrievals" inputs empty if you just need the latest version of selected databases.
|
|
103
|
|
104 -------
|
|
105
|
|
106 .. class:: warningmark
|
|
107
|
|
108 **Note**
|
|
109
|
|
110 Again, some past database versions can take time to regenerate if there is no cached version available, for example NCBI nt is a 50+ gigabyte file that needs to be read through to get a fasta version, and a makeblastdb workflow on top of that can take hours on the first call. Access to cached versions is immediate.
|
|
111
|
|
112 Setup of versioned data sources and workflow options can only be done by a Galaxy administrator.
|
|
113
|
|
114 -------
|
|
115
|
|
116 **References**
|
|
117
|
|
118 If you use this Galaxy tool in work leading to a scientific publication please
|
|
119 cite the following paper:
|
|
120
|
|
121 *Reference coming soon...*
|
|
122
|
|
123 </help>
|
|
124 </tool>
|