comparison mtbls-dwnld.xml @ 0:8dab200e02cb draft

"planemo upload commit 239561a6401593c5f87df40ac971a9aa393c4663-dirty"
author prog
date Tue, 07 Jan 2020 09:05:21 -0500
parents
children 1fd8547867be
comparison
equal deleted inserted replaced
-1:000000000000 0:8dab200e02cb
1 <!-- vi: se fdm=marker : -->
2 <tool id="mtbls-dwnld" name="Metabolights downloader" version="4.1.4">
3
4 <description>Import public and private MetaboLights studies</description>
5
6 <requirements>
7 <requirement type="package" version="0.10.3">isatools</requirement>
8 </requirements>
9
10 <!-- Command {{{1 -->
11
12 <command><![CDATA[
13 ## @@@BEGIN_CHEETAH@@@
14
15 $__tool_directory__/mtbls-dwnld
16
17 -q -T
18 #if $token:
19 -t "$token"
20 #end if
21 #if $type == 'private':
22 -p
23 #end if
24 #if $downloader == 'aspera':
25 -a
26 #end if
27
28 ## Download only the metadata
29 #if $only_metadata == 'yes':
30 -M
31 #end if
32
33 ## Set output file
34 -H "$isastudy"
35 -o "$isastudy.files_path"
36
37 ## Factor slicing
38 #if $factor_slicing.factor_name:
39 -f "$factor_slicing.factor_name=$factor_slicing.factor_value"
40 #end if
41
42 ## Study to output
43 "$study"
44
45 ## @@@END_CHEETAH@@@
46 ]]></command>
47
48 <!-- Inputs {{{1 -->
49
50 <inputs>
51
52 <!-- Study name -->
53 <param name="study" type="text" label="Study name" help="Study name in the form MTBLSXXXX. For downloading a private study with Aspera client, set to the full path of the study. See details below." refresh_on_change="true"/>
54
55 <!-- Public or private -->
56 <param name="type" label="Study type" type="select" help="Indicate here if the study you want to download is public or private.">
57 <option value="public">Public</option>
58 <option value="private">Private</option>
59 </param>
60
61 <!-- Downloader -->
62 <param name="downloader" label="Downloader" type="select" help="If downloading only the metadata prefer wget, otherwise you can choose aspera.">
63 <option value="wget">wget</option>
64 <option value="aspera">Aspera</option>
65 </param>
66
67 <!-- Token -->
68 <param name="token" type="text" optional="true" format="txt" label="Token" help="A token is required for private studies. A default token is provided for downloading public studies with aspera, but you can set your own if you wish."/>
69
70 <!-- Metadata -->
71 <param name="only_metadata" label="Content to download" type="select" display="radio" help="Specify here what files you want to download from the study.">
72 <option value="yes">ISA-Tab metadata only.</option>
73 <option value="no">Full study including raw data and ISA-Tab metadata.</option>
74 </param>
75
76 <!-- Factor slicing -->
77 <section name="factor_slicing" title="Slicing by factor value" expanded="true" help="With this option, you can restrict the set of files you download from the study.">
78 <param name="factor_name" type="text" size="128" label="Factor title"/>
79 <param name="factor_value" type="text" size="128" label="Factor value"/>
80 </section>
81 </inputs>
82
83 <!-- Outputs {{{1 -->
84
85 <outputs>
86 <data name="isastudy" label="${study}" format="isa-tab"/>
87 </outputs>
88
89 <!-- Tests {{{1 -->
90 <tests>
91 <!-- Simple retrieving with wget -->
92 <test>
93 <param name="study" value="MTBLS2"/>
94 <param name="type" value="public"/>
95 <param name="downloader" value="wget"/>
96 <param name="metadata" value="yes"/>
97 <param name="token" value=""/>
98 <output name="isastudy" file="MTBLS2.html"/>
99 </test>
100
101 <!-- Slicing -->
102 <test>
103 <param name="study" value="MTBLS2"/>
104 <param name="type" value="public"/>
105 <param name="downloader" value="wget"/>
106 <param name="metadata" value="yes"/>
107 <param name="token" value=""/>
108 <param name="factor_name" value="Factor Value[genotype]"/>
109 <param name="factor_value" value="cyp79"/>
110 <output name="isastudy" file="MTBLS2.html"/>
111 </test>
112 </tests>
113
114 <!-- Help {{{1 -->
115 <help>
116 <!-- @@@BEGIN_RST@@@ -->
117
118 =======================
119 Metabolights Downloader
120 =======================
121
122 A tool to download data from MetaboLights studies. You can download either a private or a public study, using `wget` as well as `aspera` methods.
123 The output is an ISA dataset.
124
125 -------------
126 Input setting
127 -------------
128
129 Study name
130 ==========
131
132 Fill this field with the name of the study you want to download.
133
134 .. class:: warningmark
135
136 In case of the download of a private study with *aspera* downloader, you must write the full path of the study, not only the name.
137 It is a requirement that you have requested an "FTP folder" for the private study from the metabolights-curation@ebi.ac.uk team.
138
139 Study type
140 ==========
141
142 You must select here the type of the study, which can be either *public* or *private*. In case of a *private* study, you will have to input a security token.
143
144 Downloader
145 ==========
146
147 With this field, you can control the program used for downloading the study. You have the choice between standard *wget* and *aspera*. *wget* will download the data through *http*, while *aspera* will do it through *ftp*. If you are only interested in the metadata, choose *wget* since it is able to download only these data. If you are interested in *mzML* or *mzData* files, choose *aspera* as it is a faster downloader.
148
149 Metadata
150 ========
151
152 If you are only interested in metadata, choose *Yes*, and make sure to select *wget* as well in the **Downloader** field.
153 If you set this field to *No*, then the tool will try to extract *mzData* and *mzML* files and output them as collections.
154
155 Token
156 =====
157
158 You need to provide a token when downloading with *aspera* (both for private and public studies), or when downloading a private study with *wget*.
159
160 ------
161 Output
162 ------
163
164 The output is an ISA-Tab dataset that can be used in subsequent tools like isa2w4m.
165 The ISA-Tab dataset stores all files contain in the downloaded Metabolights study.
166
167 ---------------------
168 Developer information
169 ---------------------
170
171 The Metabolights downloader downloads a compressed archive from Metabolights database and extract it inside Galaxy dataset folder. It creates an HTML file (used as primary file) and extract all files from archive inside the subfolder ``&lt;name_of_the_HTML_file&gt;_files``.
172
173 Note that neither the uploader nor the ISA Galaxy data type are involved during this process. This is the reason why the downloader has to create itself an HTML file that will serve as primary file and to extract files inside ``*_files`` subfolder.
174
175 A subsequent tool that would use the output of the Metabolights downloader has to declare the input as ISA type::
176
177 &lt;param name="isa" label="ISA" type="data" format="isa"/&gt;
178
179 Then to use it inside the command tag, one must use the variable ``$isa.extra_files_path`` to get the path of the folder where all ISA archive files have been extracted::
180
181 &lt;command&gt;&lt;![CDATA[some-program-to-run --the-isa-folder "$isa.extra_files_path" ]]&gt;&lt;/command&gt;
182
183 The easiest way to use the ISA archive inside the run program is then to use the Python3 library isatools to load it. See https://github.com/ISA-tools/isa-api for information.
184
185 ----------------------
186 Network considerations
187 ----------------------
188
189 The networking of the Galaxy instance needs to allow UDP connections with source port 33001 for the fast Aspera download. This is the case for most commercial providers, including Amazon AWS and Google GCP, but some local installations might have additional firewall rules in place. See also https://test-connect.asperasoft.com/ for more information. If these connections are not allowed, the fallback to the wget download via is still possible.
190
191 <!-- @@@END_RST@@@ -->
192 </help>
193
194 <!-- Citations {{{1 -->
195 <citations>
196 <citation type="doi">10.1002/0471250953.bi1413s53</citation> <!-- Metabolights -->
197 <citation type="doi">10.1007/s11306-015-0879-3</citation> <!-- Metabolights -->
198 <citation type="doi">10.1038/ng.1054</citation> <!-- ISA -->
199 </citations>
200 </tool>