-
Notifications
You must be signed in to change notification settings - Fork 1
/
predict-path.html
254 lines (217 loc) · 15.1 KB
/
predict-path.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ggd predict-path — GGD documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
<link rel="stylesheet" type="text/css" href="_static/style.css" />
<link rel="stylesheet" type="text/css" href="_static/font-awesome-4.7.0/css/font-awesome.min.css" />
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/doctools.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="next" title="ggd uninstall" href="uninstall.html" />
<link rel="prev" title="ggd install" href="install.html" />
<link href="https://fonts.googleapis.com/css?family=Lato|Raleway" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="_static/ms-icon-144x144.png">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.6/css/selectize.bootstrap3.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/datatables/1.10.21/js/jquery.dataTables.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.6/js/standalone/selectize.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.3.1/js/bootstrap.bundle.min.js"></script>
</head><body>
<div class="document">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<p class="logo">
<a href="index.html">
<img class="logo" src="_static/logo/GoGetData_name_logo.png" alt="Logo"/>
</a>
</p>
<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="quick-start.html">GGD Quick Start</a></li>
<li class="toctree-l1"><a class="reference internal" href="using-ggd.html">Using GGD</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="GGD-CLI.html">GGD Commands</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="ggd-search.html">ggd search</a></li>
<li class="toctree-l2"><a class="reference internal" href="install.html">ggd install</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">ggd predict-path</a></li>
<li class="toctree-l2"><a class="reference internal" href="uninstall.html">ggd uninstall</a></li>
<li class="toctree-l2"><a class="reference internal" href="list.html">ggd list</a></li>
<li class="toctree-l2"><a class="reference internal" href="list-file.html">ggd get-files</a></li>
<li class="toctree-l2"><a class="reference internal" href="pkg-info.html">ggd pkg-info</a></li>
<li class="toctree-l2"><a class="reference internal" href="show-env.html">ggd show-env</a></li>
<li class="toctree-l2"><a class="reference internal" href="make-recipe.html">ggd make-recipe</a></li>
<li class="toctree-l2"><a class="reference internal" href="make-metarecipe.html">ggd make-meta-recipe</a></li>
<li class="toctree-l2"><a class="reference internal" href="check-recipe.html">ggd check-recipe</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="meta-recipes.html">GGD meta-recipes</a></li>
<li class="toctree-l1"><a class="reference internal" href="contribute.html">Contribute</a></li>
<li class="toctree-l1"><a class="reference internal" href="private_recipes.html">Private Recipes</a></li>
<li class="toctree-l1"><a class="reference internal" href="workflows.html">Using GGD in Workflows</a></li>
<li class="toctree-l1"><a class="reference internal" href="recipes.html">Available Data Packages</a></li>
</ul>
<ul>
<li class="toctree-l1"><a href="https://github.com/gogetdata/ggd-recipes">ggd-recipes @ Github</a></li>
<li class="toctree-l1"><a href="https://github.com/gogetdata/ggd-cli">ggd-cli @ Github</a></li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="ggd-predict-path">
<span id="id1"></span><h1>ggd predict-path<a class="headerlink" href="#ggd-predict-path" title="Permalink to this headline">¶</a></h1>
<p>[<a class="reference internal" href="index.html#home-page"><span class="std std-ref">Click here to return to the home page</span></a>]</p>
<p><code class="code docutils literal notranslate"><span class="pre">ggd</span> <span class="pre">predict-path</span></code> is used to predict that path of a data file from a ggd data package that has not been installed yet. Workflows, such as Snakemake,
require knowledge of the file path prior to running the workflow. Using the <cite>predict-path</cite> tool would allow someone using Snakemake to provide the predict file
paths of the data files they would like to use without having to pre-install the data packages.The installation of the data packages could take place later in the
workflow process.</p>
<div class="section" id="using-ggd-predict-path">
<h2>Using ggd predict-path<a class="headerlink" href="#using-ggd-predict-path" title="Permalink to this headline">¶</a></h2>
<p>Use <code class="code docutils literal notranslate"><span class="pre">ggd</span> <span class="pre">predict-path</span></code> to predict the path of a data file prior to installing the ggd data package.
Running <code class="code docutils literal notranslate"><span class="pre">ggd</span> <span class="pre">predict-path</span> <span class="pre">-h</span></code> will give you the following message:</p>
<p>predict-path arguments:</p>
<table class="docutils align-default">
<colgroup>
<col style="width: 26%" />
<col style="width: 74%" />
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>ggd predict-path</p></th>
<th class="head"><p>Get a predicted install file path for a data package before it is installed.
(Use for workflows, such as Snakemake)</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">-h</span></code>, <code class="docutils literal notranslate"><span class="pre">--help</span></code></p></td>
<td><p>show this help message and exit</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">-c</span></code>, <code class="docutils literal notranslate"><span class="pre">--channel</span></code></p></td>
<td><p>The ggd channel of the recipe to fine. (Deafult = genomics)</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">--prefix</span></code></p></td>
<td><p>(Optional) The name or the full directory path to an
conda environment. The predicted path will be based on
this conda environment. When installing, the data
package should also be installed in this environment.
(Only needed if not predicting for a path in the
current conda environment)</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">--id</span></code>, <code class="docutils literal notranslate"><span class="pre">meta-recipe</span> <span class="pre">ID</span></code></p></td>
<td><p>(Optional) The ID to predict the path for if the package is a meta-recipe. If it is
not a meta-recipe it will be ignored</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">-pn</span></code>, <code class="docutils literal notranslate"><span class="pre">--package-name</span></code></p></td>
<td><p><strong>Required</strong> The name of the data package to predict a
file path for</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">-fn</span></code>, <code class="docutils literal notranslate"><span class="pre">--file-name</span></code></p></td>
<td><p><strong>Required if –dir-path not used</strong> The name of the file to predict that path
for. It is best if you give the full and correct name
of the file to predict the path for. If not, ggd will
try to identify the right file, but won’t guarantee
that it is the right file</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">-dir-path</span></code></p></td>
<td><p><strong>Required if –file-name not used</strong> Whether or not to get the predicted directory
path rather then the predicted file path. If both –file-name and –dir-path are
provided the –file-name will be used and –dir-path will be ignored</p></td>
</tr>
</tbody>
</table>
<div class="section" id="additional-argument-explanation">
<h3>Additional argument explanation:<a class="headerlink" href="#additional-argument-explanation" title="Permalink to this headline">¶</a></h3>
<p>Required arguments:</p>
<ul class="simple">
<li><p><em>-pn:</em> The <code class="code docutils literal notranslate"><span class="pre">-pn</span></code> flag represents the data package name for which to predict a file path for. (NOTE: the file
path is for a data file from this data package and not the data package itself)</p></li>
</ul>
<p>One Argument Required:</p>
<ul class="simple">
<li><p><em>-fn:</em> The <code class="code docutils literal notranslate"><span class="pre">-fn</span></code> flag represents the name of the data file for which to predict the file path for. (NOTE: this is
the actual file from the data package to predict the path for) You can use <code class="code docutils literal notranslate"><span class="pre">ggd</span> <span class="pre">search</span></code> or check the
<a class="reference internal" href="recipes.html#recipes"><span class="std std-ref">Available packages</span></a> page to get the name of the files provided by the package</p></li>
<li><p><em>–dir-path</em> The <code class="code docutils literal notranslate"><span class="pre">--dir-path</span></code> flag is used to the the predicted directory path of the installed files rather then the
exact file path. This is specifically useful for meta-recipes, where the file-path cannot be predicted because of the
dynamic nature of meta-recipes.</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Either the <code class="code docutils literal notranslate"><span class="pre">--file-name</span></code> or the <code class="code docutils literal notranslate"><span class="pre">--dir-path</span></code> parameter is required. If both are provided then the <code class="code docutils literal notranslate"><span class="pre">--file-path</span></code>
will be used and the <code class="code docutils literal notranslate"><span class="pre">--dir-path</span></code> ignored. If neither one is given then the <code class="code docutils literal notranslate"><span class="pre">predict-path</span></code> command will exit and
prompt for one.</p>
</div>
<p>Optional arguments:</p>
<ul class="simple">
<li><p><em>-c:</em> The <code class="code docutils literal notranslate"><span class="pre">-c</span></code> flag represents the ggd channel. The default channel is <em>genomics</em>.</p></li>
<li><p><em>–prefix:</em> The <code class="code docutils literal notranslate"><span class="pre">--prefix</span></code> flag is used to get to the install path for a data file in a specific conda environment/prefix
that is different then the current environment.</p></li>
<li><p><em>–id</em> The <code class="code docutils literal notranslate"><span class="pre">--id</span></code> flag is used to for predicting the directory path of an ID specifc meta-recipe. It is not possible to predict
the file path of a meta-recipe due to the dynamic nature of the recipe iteself, however, it is possible to predict the directory path.
An ID is required when install a meta-recipe, and this ID represents the ID that would be used when install a desired meta-recipe.
This ID will be ignored if the path being predicted is NOT for a meta-recipe. Additionaly, if this parameter is not used then the
directory path to the non ID specifc meta-recipe will be provided, which is of no use.</p></li>
</ul>
</div>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="section" id="predict-the-path-of-the-chromsize-file">
<h3>1. Predict the path of the chromsize file:<a class="headerlink" href="#predict-the-path-of-the-chromsize-file" title="Permalink to this headline">¶</a></h3>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ ggd predict-path -pn hg19-chromsizes-ggd-v1 -fn hg19-chromsizes-ggd-v1.txt
<conda root>/share/ggd/Homo_sapiens/hg19/hg19-chromsizes-ggd-v1/1/hg19-chromsizes-ggd-v1.txt
</pre></div>
</div>
</div>
<div class="section" id="predict-the-path-of-the-chromsize-file-in-the-data-environment">
<h3>2. Predict the path of the chromsize file in the “data” environment:<a class="headerlink" href="#predict-the-path-of-the-chromsize-file-in-the-data-environment" title="Permalink to this headline">¶</a></h3>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ ggd predict-path -pn hg19-chromsizes-ggd-v1 -fn hg19-chromsizes-ggd-v1.txt --prefix data
<data environment>/share/ggd/Homo_sapiens/hg19/hg19-chromsizes-ggd-v1/1/hg19-chromsizes-ggd-v1.txt
</pre></div>
</div>
</div>
<div class="section" id="predict-the-directory-path-of-a-geo-meta-recipe">
<h3>3. Predict the directory path of a GEO meta-recipe:<a class="headerlink" href="#predict-the-directory-path-of-a-geo-meta-recipe" title="Permalink to this headline">¶</a></h3>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>$ ggd predict-path --package-name meta-recipe-geo-accession-geo-v1 --dir-path --id GSE123
<conda root>/share/ggd/meta-recipe/meta-recipe/gse123-geo-v1/1/
</pre></div>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>If you are getting the predicted path for a meta-recipe you need to add the <code class="code docutils literal notranslate"><span class="pre">--id</span></code> parameter, otherwise, you will get
the directory path to a main meta-recipe, which should never contain any data files. (The wrong path)</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
©2016-2021, The GoGetData team.
|
<a href="_sources/predict-path.rst.txt"
rel="nofollow">Page source</a>
</div>
</body>
</html>