-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathbwCommon_8h.html
344 lines (320 loc) · 18.8 KB
/
bwCommon_8h.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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libBigWig: bwCommon.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libBigWig
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">bwCommon.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p><a href="bwCommon_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a7dff7d19c1f094d5ff6a88553badffe0"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="bwCommon_8h.html#a7dff7d19c1f094d5ff6a88553badffe0">bwSetPos</a> (<a class="el" href="structbigWigFile__t.html">bigWigFile_t</a> *fp, size_t pos)</td></tr>
<tr class="memdesc:a7dff7d19c1f094d5ff6a88553badffe0"><td class="mdescLeft"> </td><td class="mdescRight">Like fsetpos, but for local or remote bigWig files. This will set the file position indicator to the specified point. For local files this literally is <code>fsetpos</code>, while for remote files it fills a memory buffer with data starting at the desired position. <a href="bwCommon_8h.html#a7dff7d19c1f094d5ff6a88553badffe0">More...</a><br /></td></tr>
<tr class="separator:a7dff7d19c1f094d5ff6a88553badffe0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adc16c73076856035477e460ea4ea3d17"><td class="memItemLeft" align="right" valign="top">size_t </td><td class="memItemRight" valign="bottom"><a class="el" href="bwCommon_8h.html#adc16c73076856035477e460ea4ea3d17">bwRead</a> (void *data, size_t sz, size_t nmemb, <a class="el" href="structbigWigFile__t.html">bigWigFile_t</a> *fp)</td></tr>
<tr class="memdesc:adc16c73076856035477e460ea4ea3d17"><td class="mdescLeft"> </td><td class="mdescRight">A local/remote version of <code>fread</code>. Reads data from either local or remote bigWig files. <a href="bwCommon_8h.html#adc16c73076856035477e460ea4ea3d17">More...</a><br /></td></tr>
<tr class="separator:adc16c73076856035477e460ea4ea3d17"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab55fdfee13cf1d6f16440d8c6bc7a4fe"><td class="memItemLeft" align="right" valign="top">long </td><td class="memItemRight" valign="bottom"><a class="el" href="bwCommon_8h.html#ab55fdfee13cf1d6f16440d8c6bc7a4fe">bwTell</a> (<a class="el" href="structbigWigFile__t.html">bigWigFile_t</a> *fp)</td></tr>
<tr class="memdesc:ab55fdfee13cf1d6f16440d8c6bc7a4fe"><td class="mdescLeft"> </td><td class="mdescRight">Determine what the file position indicator say. This is equivalent to <code>ftell</code> for local or remote files. <a href="bwCommon_8h.html#ab55fdfee13cf1d6f16440d8c6bc7a4fe">More...</a><br /></td></tr>
<tr class="separator:ab55fdfee13cf1d6f16440d8c6bc7a4fe"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a1efdd9f510597b0a6ab449f33d4d0966"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structbwRTree__t.html">bwRTree_t</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="bwCommon_8h.html#a1efdd9f510597b0a6ab449f33d4d0966">bwReadIndex</a> (<a class="el" href="structbigWigFile__t.html">bigWigFile_t</a> *fp, uint64_t offset)</td></tr>
<tr class="memdesc:a1efdd9f510597b0a6ab449f33d4d0966"><td class="mdescLeft"> </td><td class="mdescRight">Reads a data index (either full data or a zoom level) from a bigWig file. There is little reason for end users to use this function. This must be freed with <code>bwDestroyIndex</code> <a href="bwCommon_8h.html#a1efdd9f510597b0a6ab449f33d4d0966">More...</a><br /></td></tr>
<tr class="separator:a1efdd9f510597b0a6ab449f33d4d0966"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac783a22d0eba14f369d7122c19b601ca"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="bwCommon_8h.html#ac783a22d0eba14f369d7122c19b601ca">bwDestroyIndexNode</a> (<a class="el" href="structbwRTreeNode__t.html">bwRTreeNode_t</a> *node)</td></tr>
<tr class="memdesc:ac783a22d0eba14f369d7122c19b601ca"><td class="mdescLeft"> </td><td class="mdescRight">Destroy an <a class="el" href="structbwRTreeNode__t.html" title="A node within an R-tree holding the index for data.">bwRTreeNode_t</a> and all of its children. <a href="bwCommon_8h.html#ac783a22d0eba14f369d7122c19b601ca">More...</a><br /></td></tr>
<tr class="separator:ac783a22d0eba14f369d7122c19b601ca"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a28fafebf80e74cc1802bcc45d415560e"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="bwCommon_8h.html#a28fafebf80e74cc1802bcc45d415560e">bwDestroyIndex</a> (<a class="el" href="structbwRTree__t.html">bwRTree_t</a> *idx)</td></tr>
<tr class="memdesc:a28fafebf80e74cc1802bcc45d415560e"><td class="mdescLeft"> </td><td class="mdescRight">Frees space allocated by <code>bwReadIndex</code> There is generally little reason to use this, since end users should typically not need to run <code>bwReadIndex</code> themselves. <a href="bwCommon_8h.html#a28fafebf80e74cc1802bcc45d415560e">More...</a><br /></td></tr>
<tr class="separator:a28fafebf80e74cc1802bcc45d415560e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a704e7ffb4907a0afcd63d8dbc73dea27"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="bwCommon_8h.html#a704e7ffb4907a0afcd63d8dbc73dea27">bwFinalize</a> (<a class="el" href="structbigWigFile__t.html">bigWigFile_t</a> *fp)</td></tr>
<tr class="memdesc:a704e7ffb4907a0afcd63d8dbc73dea27"><td class="mdescLeft"> </td><td class="mdescRight">Finishes what's needed to write a bigWigFile Flushes the buffer, converts the index linked list to a tree, writes that to disk, handles zoom level stuff, writes magic at the end. <a href="bwCommon_8h.html#a704e7ffb4907a0afcd63d8dbc73dea27">More...</a><br /></td></tr>
<tr class="separator:a704e7ffb4907a0afcd63d8dbc73dea27"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>You have no reason to use these functions. They may change without warning because there's no reason for them to be used outside of libBigWig's internals.</p>
<p>These are structures and functions from a variety of files that are used across files internally but don't need to be see by libBigWig users. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="a28fafebf80e74cc1802bcc45d415560e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a28fafebf80e74cc1802bcc45d415560e">◆ </a></span>bwDestroyIndex()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void bwDestroyIndex </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structbwRTree__t.html">bwRTree_t</a> * </td>
<td class="paramname"><em>idx</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Frees space allocated by <code>bwReadIndex</code> There is generally little reason to use this, since end users should typically not need to run <code>bwReadIndex</code> themselves. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">idx</td><td>A <a class="el" href="structbwRTree__t.html">bwRTree_t</a> pointer allocated by <code>bwReadIndex</code>. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ac783a22d0eba14f369d7122c19b601ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac783a22d0eba14f369d7122c19b601ca">◆ </a></span>bwDestroyIndexNode()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void bwDestroyIndexNode </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structbwRTreeNode__t.html">bwRTreeNode_t</a> * </td>
<td class="paramname"><em>node</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroy an <a class="el" href="structbwRTreeNode__t.html" title="A node within an R-tree holding the index for data.">bwRTreeNode_t</a> and all of its children. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">node</td><td>The node to destroy. </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a704e7ffb4907a0afcd63d8dbc73dea27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a704e7ffb4907a0afcd63d8dbc73dea27">◆ </a></span>bwFinalize()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int bwFinalize </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structbigWigFile__t.html">bigWigFile_t</a> * </td>
<td class="paramname"><em>fp</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Finishes what's needed to write a bigWigFile Flushes the buffer, converts the index linked list to a tree, writes that to disk, handles zoom level stuff, writes magic at the end. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">fp</td><td>A valid <a class="el" href="structbigWigFile__t.html" title="A structure that holds everything needed to access a bigWig file.">bigWigFile_t</a> pointer </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success </dd></dl>
</div>
</div>
<a id="adc16c73076856035477e460ea4ea3d17"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc16c73076856035477e460ea4ea3d17">◆ </a></span>bwRead()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">size_t bwRead </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>sz</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>nmemb</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structbigWigFile__t.html">bigWigFile_t</a> * </td>
<td class="paramname"><em>fp</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>A local/remote version of <code>fread</code>. Reads data from either local or remote bigWig files. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data</td><td>An allocated memory block big enough to hold the data. </td></tr>
<tr><td class="paramname">sz</td><td>The size of each member that should be copied. </td></tr>
<tr><td class="paramname">nmemb</td><td>The number of members to copy. </td></tr>
<tr><td class="paramname">fp</td><td>The <a class="el" href="structbigWigFile__t.html" title="A structure that holds everything needed to access a bigWig file.">bigWigFile_t</a> * from which to copy the data. </td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="bwCommon_8h.html#a7dff7d19c1f094d5ff6a88553badffe0" title="Like fsetpos, but for local or remote bigWig files. This will set the file position indicator to the ...">bwSetPos</a> </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>For nmemb==1, the size of the copied data. For nmemb>1, the number of members fully copied (this is equivalent to <code>fread</code>). </dd></dl>
</div>
</div>
<a id="a1efdd9f510597b0a6ab449f33d4d0966"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1efdd9f510597b0a6ab449f33d4d0966">◆ </a></span>bwReadIndex()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structbwRTree__t.html">bwRTree_t</a>* bwReadIndex </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structbigWigFile__t.html">bigWigFile_t</a> * </td>
<td class="paramname"><em>fp</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint64_t </td>
<td class="paramname"><em>offset</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Reads a data index (either full data or a zoom level) from a bigWig file. There is little reason for end users to use this function. This must be freed with <code>bwDestroyIndex</code> </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">fp</td><td>A valid <a class="el" href="structbigWigFile__t.html" title="A structure that holds everything needed to access a bigWig file.">bigWigFile_t</a> pointer </td></tr>
<tr><td class="paramname">offset</td><td>The file offset where the index begins </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A <a class="el" href="structbwRTree__t.html">bwRTree_t</a> pointer or NULL on error. </dd></dl>
</div>
</div>
<a id="a7dff7d19c1f094d5ff6a88553badffe0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7dff7d19c1f094d5ff6a88553badffe0">◆ </a></span>bwSetPos()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">int bwSetPos </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structbigWigFile__t.html">bigWigFile_t</a> * </td>
<td class="paramname"><em>fp</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>pos</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Like fsetpos, but for local or remote bigWig files. This will set the file position indicator to the specified point. For local files this literally is <code>fsetpos</code>, while for remote files it fills a memory buffer with data starting at the desired position. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">fp</td><td>A valid opened <a class="el" href="structbigWigFile__t.html" title="A structure that holds everything needed to access a bigWig file.">bigWigFile_t</a>. </td></tr>
<tr><td class="paramname">pos</td><td>The position within the file to seek to. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>0 on success and -1 on error. </dd></dl>
</div>
</div>
<a id="ab55fdfee13cf1d6f16440d8c6bc7a4fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab55fdfee13cf1d6f16440d8c6bc7a4fe">◆ </a></span>bwTell()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">long bwTell </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structbigWigFile__t.html">bigWigFile_t</a> * </td>
<td class="paramname"><em>fp</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Determine what the file position indicator say. This is equivalent to <code>ftell</code> for local or remote files. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">fp</td><td>The file. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The position in the file. </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Nov 8 2020 13:48:36 for libBigWig by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>