annotate versioned_data.xml @ 2:269d246ce6d0 draft default tip

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