From db7b17a0917e43898ed6907af2f199ca90e3ff8c Mon Sep 17 00:00:00 2001 From: Devon Ryan Date: Sat, 15 Jul 2017 14:47:25 +0200 Subject: [PATCH 1/2] Fix #30 --- io.h => BigWigIO.h | 2 +- bigWig.h | 4 +- docs/html/BigWigIO_8h.html | 325 ++++++++++++++++++ docs/html/BigWigIO_8h_source.html | 112 ++++++ docs/html/annotated.html | 2 +- docs/html/bigWig_8h.html | 23 +- docs/html/bigWig_8h_source.html | 184 +++++----- docs/html/bwCommon_8h.html | 2 +- docs/html/bwCommon_8h_source.html | 6 +- docs/html/bwValues_8h.html | 2 +- docs/html/bwValues_8h_source.html | 6 +- docs/html/classes.html | 2 +- docs/html/files.html | 8 +- docs/html/functions.html | 9 +- docs/html/functions_vars.html | 9 +- docs/html/globals.html | 17 +- docs/html/globals_defs.html | 5 +- docs/html/globals_enum.html | 4 +- docs/html/globals_func.html | 10 +- docs/html/globals_type.html | 2 +- docs/html/globals_vars.html | 4 +- docs/html/index.html | 2 +- docs/html/md_README.html | 6 +- docs/html/pages.html | 2 +- docs/html/search/all_0.js | 3 +- docs/html/search/all_10.js | 8 +- docs/html/search/all_13.js | 2 +- docs/html/search/all_5.js | 2 +- docs/html/search/all_7.js | 2 +- docs/html/search/all_8.js | 1 + docs/html/search/all_f.js | 2 +- docs/html/search/defines_4.js | 1 + docs/html/search/enums_0.js | 2 +- docs/html/search/files_0.js | 1 + docs/html/search/functions_1.js | 8 +- docs/html/search/searchdata.js | 2 +- docs/html/search/variables_13.js | 2 +- docs/html/search/variables_5.js | 2 +- docs/html/search/variables_7.js | 1 + docs/html/search/variables_f.js | 2 +- docs/html/structURL__t.html | 41 ++- docs/html/structbbOverlappingEntries__t.html | 2 +- docs/html/structbigWigFile__t.html | 2 +- docs/html/structbigWigHdr__t.html | 2 +- docs/html/structbwDataHeader__t.html | 2 +- docs/html/structbwOverlapBlock__t.html | 2 +- docs/html/structbwOverlapIterator__t.html | 2 +- .../html/structbwOverlappingIntervals__t.html | 2 +- docs/html/structbwRTreeNode__t.html | 18 +- docs/html/structbwRTree__t.html | 2 +- docs/html/structbwWriteBuffer__t.html | 2 +- docs/html/structbwZoomHdr__t.html | 2 +- docs/html/structchromList__t.html | 2 +- io.c | 2 +- 54 files changed, 679 insertions(+), 193 deletions(-) rename io.h => BigWigIO.h (99%) create mode 100644 docs/html/BigWigIO_8h.html create mode 100644 docs/html/BigWigIO_8h_source.html diff --git a/io.h b/BigWigIO.h similarity index 99% rename from io.h rename to BigWigIO.h index ed415b8..77ba614 100644 --- a/io.h +++ b/BigWigIO.h @@ -7,7 +7,7 @@ typedef void CURL; #define CURLE_OK 0 #define CURLE_FAILED_INIT 1 #endif -/*! \file io.h +/*! \file BigWigIO.h * These are (typically internal) IO functions, so there's generally no need for you to directly use them! */ diff --git a/bigWig.h b/bigWig.h index d8dec4b..24e7f16 100644 --- a/bigWig.h +++ b/bigWig.h @@ -1,4 +1,4 @@ -#include "io.h" +#include "BigWigIO.h" #include "bwValues.h" #include #include @@ -53,7 +53,7 @@ extern "C" { /*! * The library version number */ -#define LIBBIGWIG_VERSION 0.3.4 +#define LIBBIGWIG_VERSION 0.4.0 /*! * If 1, then this library was compiled with remote file support. diff --git a/docs/html/BigWigIO_8h.html b/docs/html/BigWigIO_8h.html new file mode 100644 index 0000000..5cd7aea --- /dev/null +++ b/docs/html/BigWigIO_8h.html @@ -0,0 +1,325 @@ + + + + + + +libBigWig: BigWigIO.h File Reference + + + + + + + + + + +
+
+ + + + + + +
+
libBigWig +
+
+
+ + + + + + +
+
+ + +
+ +
+ +
+
+ +
+
BigWigIO.h File Reference
+
+
+
#include <curl/curl.h>
+
+

Go to the source code of this file.

+ + + + + +

+Data Structures

struct  URL_t
 This structure holds the file pointers and buffers needed for raw access to local and remote files. More...
 
+ + + +

+Enumerations

enum  bigWigFile_type_enum { BWG_FILE = 0, +BWG_HTTP = 1, +BWG_HTTPS = 2, +BWG_FTP = 3 + }
 
+ + + + + + + + + + + + + +

+Functions

size_t urlRead (URL_t *URL, void *buf, size_t bufSize)
 Reads data into the given buffer. More...
 
CURLcode urlSeek (URL_t *URL, size_t pos)
 Seeks to a given position in a local or remote file. More...
 
URL_turlOpen (char *fname, CURLcode(*callBack)(CURL *), const char *mode)
 Open a local or remote file. More...
 
void urlClose (URL_t *URL)
 Close a local/remote file. More...
 
+ + + +

+Variables

size_t GLOBAL_DEFAULTBUFFERSIZE
 
+

Detailed Description

+

These are (typically internal) IO functions, so there's generally no need for you to directly use them!

+

Enumeration Type Documentation

+ +
+
+ + + + +
enum bigWigFile_type_enum
+
+

The enumerated values that indicate the connection type used to access a file.

+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + +
void urlClose (URL_tURL)
+
+ +

Close a local/remote file.

+

This will perform the cleanup required on a URL_t*, releasing memory as needed.

+
Parameters
+ + +
URLA URL_t * pointing to a valid opened file or remote URL.
+
+
+
Warning
URL will no longer point to a valid location in memory!
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
URL_t* urlOpen (char * fname,
CURLcode(*)(CURL *) callBack,
const char * mode 
)
+
+ +

Open a local or remote file.

+

Opens a local or remote file. Currently, http, https, and ftp are the only supported protocols and the URL must then begin with "http://", "https://", or "ftp://" as appropriate.

+

For remote files, an internal buffer is used to hold file contents, to avoid downloading entire files before starting. The size of this buffer and various variable related to connection timeout are set with bwInit().

+

Note that you must run urlClose() on this when finished. However, you would typically just use bwOpen() rather than directly calling this function.

+
Parameters
+ + + + +
fnameThe file name or URL to open.
callBackAn optional user-supplied function. This is applied to remote connections so users can specify things like proxy and password information.
mode"r", "w" or NULL. If and only if the mode contains the character "w" will the file be opened for writing.
+
+
+
Returns
A URL_t * or NULL on error.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
size_t urlRead (URL_tURL,
void * buf,
size_t bufSize 
)
+
+ +

Reads data into the given buffer.

+

This function will store bufSize data into buf for both local and remote files. For remote files an internal buffer is used to store a (typically larger) segment of the remote file.

+
Parameters
+ + + + +
URLA URL_t * pointing to a valid opened file or remote URL.
bufThe buffer in memory that you would like filled. It must be able to hold bufSize bytes!
bufSizeThe number of bytes to transfer to buf.
+
+
+
Returns
Returns the number of bytes stored in buf, which should be bufSize on success and something else on error.
+
Warning
Note that on error, URL for remote files is left in an unusable state. You can get around this by running urlSeek() to a position outside of the range held by the internal buffer.
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
CURLcode urlSeek (URL_tURL,
size_t pos 
)
+
+ +

Seeks to a given position in a local or remote file.

+

For local files, this will set the file position indicator for the file pointer to the desired position. For remote files, it sets the position to start downloading data for the next urlRead(). Note that for remote files that running urlSeek() with a pos within the current buffer will simply modify the internal offset.

+
Parameters
+ + + +
URLA URL_t * pointing to a valid opened file or remote URL.
posThe position to seek to.
+
+
+
Returns
CURLE_OK on success and a different CURLE_XXX on error. For local files, the error return value is always CURLE_FAILED_INIT
+ +
+
+

Variable Documentation

+ +
+
+ + + + +
size_t GLOBAL_DEFAULTBUFFERSIZE
+
+

The size of the buffer used for remote files.

+ +
+
+
+ + + + diff --git a/docs/html/BigWigIO_8h_source.html b/docs/html/BigWigIO_8h_source.html new file mode 100644 index 0000000..ce1e19f --- /dev/null +++ b/docs/html/BigWigIO_8h_source.html @@ -0,0 +1,112 @@ + + + + + + +libBigWig: BigWigIO.h Source File + + + + + + + + + + +
+
+ + + + + + +
+
libBigWig +
+
+
+ + + + + +
+ +
+
+ + +
+ +
+ +
+
+
BigWigIO.h
+
+
+Go to the documentation of this file.
1 #ifndef NOCURL
2 #include <curl/curl.h>
3 #else
4 #include <stdio.h>
5 typedef int CURLcode;
6 typedef void CURL;
7 #define CURLE_OK 0
8 #define CURLE_FAILED_INIT 1
9 #endif
10 
17 extern size_t GLOBAL_DEFAULTBUFFERSIZE;
18 
23  BWG_FILE = 0,
24  BWG_HTTP = 1,
25  BWG_HTTPS = 2,
26  BWG_FTP = 3
27 };
28 
32 typedef struct {
33  union {
34 #ifndef NOCURL
35  CURL *curl;
36 #endif
37  FILE *fp;
38  } x;
39  void *memBuf;
40  size_t filePos;
41  size_t bufPos;
42  size_t bufSize;
43  size_t bufLen;
46  char *fname;
47 } URL_t;
48 
62 size_t urlRead(URL_t *URL, void *buf, size_t bufSize);
63 
74 CURLcode urlSeek(URL_t *URL, size_t pos);
75 
91 URL_t *urlOpen(char *fname, CURLcode (*callBack)(CURL*), const char* mode);
92 
102 void urlClose(URL_t *URL);
This structure holds the file pointers and buffers needed for raw access to local and remote files...
Definition: BigWigIO.h:32
+
bigWigFile_type_enum
Definition: BigWigIO.h:22
+
void urlClose(URL_t *URL)
Close a local/remote file.
Definition: io.c:275
+
size_t urlRead(URL_t *URL, void *buf, size_t bufSize)
Reads data into the given buffer.
Definition: io.c:89
+
FILE * fp
Definition: BigWigIO.h:37
+
size_t bufPos
Definition: BigWigIO.h:41
+
size_t GLOBAL_DEFAULTBUFFERSIZE
Definition: io.c:12
+
size_t bufSize
Definition: BigWigIO.h:42
+
size_t filePos
Definition: BigWigIO.h:40
+
size_t bufLen
Definition: BigWigIO.h:43
+
URL_t * urlOpen(char *fname, CURLcode(*callBack)(CURL *), const char *mode)
Open a local or remote file.
Definition: io.c:159
+
char * fname
Definition: BigWigIO.h:46
+
CURLcode urlSeek(URL_t *URL, size_t pos)
Seeks to a given position in a local or remote file.
Definition: io.c:120
+
void * memBuf
Definition: BigWigIO.h:39
+
CURL * curl
Definition: BigWigIO.h:35
+
int isCompressed
Definition: BigWigIO.h:45
+
+ + + + diff --git a/docs/html/annotated.html b/docs/html/annotated.html index 93f7f7a..e9b5983 100644 --- a/docs/html/annotated.html +++ b/docs/html/annotated.html @@ -106,7 +106,7 @@ diff --git a/docs/html/bigWig_8h.html b/docs/html/bigWig_8h.html index ab81b21..891f34c 100644 --- a/docs/html/bigWig_8h.html +++ b/docs/html/bigWig_8h.html @@ -90,7 +90,7 @@
bigWig.h File Reference
-
#include "io.h"
+
#include "BigWigIO.h"
#include "bwValues.h"
#include <inttypes.h>
#include <zlib.h>
@@ -126,8 +126,10 @@ - + + + @@ -329,6 +331,19 @@

The magic number of an index block in a file.

+
+ + +
+
+

Macros

#define LIBBIGWIG_VERSION   0.3.0
#define LIBBIGWIG_VERSION   0.4.0
 
#define LIBBIGWIG_CURL   1
 
#define BIGWIG_MAGIC   0x888FFC26
 
#define BIGBED_MAGIC   0x8789F2EB
+ + + +
#define LIBBIGWIG_CURL   1
+
+

If 1, then this library was compiled with remote file support.

+
@@ -336,7 +351,7 @@
- +
#define LIBBIGWIG_VERSION   0.3.0#define LIBBIGWIG_VERSION   0.4.0
@@ -1649,7 +1664,7 @@

Function Documentation

diff --git a/docs/html/bigWig_8h_source.html b/docs/html/bigWig_8h_source.html index 42d68e2..42ff0f0 100644 --- a/docs/html/bigWig_8h_source.html +++ b/docs/html/bigWig_8h_source.html @@ -85,124 +85,124 @@
bigWig.h
-Go to the documentation of this file.
1 #include "io.h"
2 #include "bwValues.h"
3 #include <inttypes.h>
4 #include <zlib.h>
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
56 #define LIBBIGWIG_VERSION 0.3.0
57 
61 #define BIGWIG_MAGIC 0x888FFC26
62 
65 #define BIGBED_MAGIC 0x8789F2EB
66 
69 #define CIRTREE_MAGIC 0x78ca8c91
70 
73 #define IDX_MAGIC 0x2468ace0
74 
77 #define DEFAULT_nCHILDREN 64
78 
81 #define DEFAULT_BLOCKSIZE 32768
82 
87  doesNotExist = -1,
88  mean = 0,
89  average = 0,
90  stdev = 1,
91  dev = 1,
92  max = 2,
93  min = 3,
94  cov = 4,
95  coverage = 4
96 };
97 
98 //Should hide this from end users
104 typedef struct {
105  uint32_t *level;
106  //There's 4 bytes of padding between these
107  uint64_t *dataOffset;
108  uint64_t *indexOffset;
110 } bwZoomHdr_t;
111 
117 typedef struct {
118  uint16_t version;
119  uint16_t nLevels;
120  uint64_t ctOffset;
121  uint64_t dataOffset;
122  uint64_t indexOffset;
123  uint16_t fieldCount;
124  uint16_t definedFieldCount;
125  uint64_t sqlOffset;
126  uint64_t summaryOffset;
127  uint32_t bufSize;
128  uint64_t extensionOffset;
130  //total Summary
131  uint64_t nBasesCovered;
132  double minVal;
133  double maxVal;
134  double sumData;
135  double sumSquared;
136 } bigWigHdr_t;
137 
138 //Should probably replace this with a hash
142 typedef struct {
143  int64_t nKeys;
144  char **chrom;
145  uint32_t *len;
146 } chromList_t;
147 
148 //TODO remove from bigWig.h
150 typedef struct bwLL bwLL;
151 struct bwLL {
152  bwRTreeNode_t *node;
153  struct bwLL *next;
154 };
155 typedef struct bwZoomBuffer_t bwZoomBuffer_t;
156 struct bwZoomBuffer_t { //each individual entry takes 32 bytes
157  void *p;
158  uint32_t l, m;
159  struct bwZoomBuffer_t *next;
160 };
162 
167 typedef struct {
168  uint64_t nBlocks;
169  uint32_t blockSize;
170  uint64_t nEntries;
171  uint64_t runningWidthSum;
172  uint32_t tid;
173  uint32_t start;
174  uint32_t end;
175  uint32_t span;
176  uint32_t step;
177  uint8_t ltype;
178  uint32_t l;
179  void *p;
182  bwZoomBuffer_t **firstZoomBuffer;
183  bwZoomBuffer_t **lastZoomBuffer;
184  uint64_t *nNodes;
185  uLongf compressPsz;
186  void *compressP;
188 
192 typedef struct {
198  int isWrite;
199  int type;
200 } bigWigFile_t;
201 
205 typedef struct {
206  uint32_t l;
207  uint32_t m;
208  uint32_t *start;
209  uint32_t *end;
210  float *value;
212 
216 typedef struct {
217  uint32_t l;
218  uint32_t m;
219  uint32_t *start;
220  uint32_t *end;
221  char **str;
223 
228 typedef struct {
230  uint32_t tid;
231  uint32_t start;
232  uint32_t end;
233  uint64_t offset;
236  void *blocks;
239  void *data;
241 
249 int bwInit(size_t bufSize);
250 
255 void bwCleanup(void);
256 
264 int bwIsBigWig(char *fname, CURLcode (*callBack)(CURL*));
265 
273 int bbIsBigBed(char *fname, CURLcode (*callBack)(CURL*));
274 
283 bigWigFile_t *bwOpen(char *fname, CURLcode (*callBack)(CURL*), const char* mode);
284 
292 bigWigFile_t *bbOpen(char *fname, CURLcode (*callBack)(CURL*));
293 
302 char *bbGetSQL(bigWigFile_t *fp);
303 
309 void bwClose(bigWigFile_t *fp);
310 
311 /*******************************************************************************
312 *
313 * The following are in bwStats.c
314 *
315 *******************************************************************************/
316 
324 uint32_t bwGetTid(bigWigFile_t *fp, char *chrom);
325 
332 
339 
352 bwOverlappingIntervals_t *bwGetOverlappingIntervals(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end);
353 
366 bbOverlappingEntries_t *bbGetOverlappingEntries(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int withString);
367 
382 bwOverlapIterator_t *bwOverlappingIntervalsIterator(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t blocksPerIteration);
383 
400 bwOverlapIterator_t *bbOverlappingEntriesIterator(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int withString, uint32_t blocksPerIteration);
401 
410 
416 
430 bwOverlappingIntervals_t *bwGetValues(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int includeNA);
431 
444 double *bwStats(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t nBins, enum bwStatsType type);
445 
458 double *bwStatsFromFull(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t nBins, enum bwStatsType type);
459 
460 //Writer functions
461 
469 int bwCreateHdr(bigWigFile_t *fp, int32_t maxZooms);
470 
479 chromList_t *bwCreateChromList(char **chroms, uint32_t *lengths, int64_t n);
480 
488 int bwWriteHdr(bigWigFile_t *bw);
489 
506 int bwAddIntervals(bigWigFile_t *fp, char **chrom, uint32_t *start, uint32_t *end, float *values, uint32_t n);
507 
520 int bwAppendIntervals(bigWigFile_t *fp, uint32_t *start, uint32_t *end, float *values, uint32_t n);
521 
538 int bwAddIntervalSpans(bigWigFile_t *fp, char *chrom, uint32_t *start, uint32_t span, float *values, uint32_t n);
539 
551 int bwAppendIntervalSpans(bigWigFile_t *fp, uint32_t *start, float *values, uint32_t n);
552 
570 int bwAddIntervalSpanSteps(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t span, uint32_t step, float *values, uint32_t n);
571 
582 int bwAppendIntervalSpanSteps(bigWigFile_t *fp, float *values, uint32_t n);
583 
584 #ifdef __cplusplus
585 }
586 #endif
uint64_t summaryOffset
Definition: bigWig.h:126
+Go to the documentation of this file.
1 #include "BigWigIO.h"
2 #include "bwValues.h"
3 #include <inttypes.h>
4 #include <zlib.h>
5 
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9 
56 #define LIBBIGWIG_VERSION 0.4.0
57 
61 #ifdef NOCURL
62 #define LIBBIGWIG_CURL 0
63 typedef int CURLcode;
64 typedef void CURL;
65 #else
66 #define LIBBIGWIG_CURL 1
67 #endif
68 
72 #define BIGWIG_MAGIC 0x888FFC26
73 
76 #define BIGBED_MAGIC 0x8789F2EB
77 
80 #define CIRTREE_MAGIC 0x78ca8c91
81 
84 #define IDX_MAGIC 0x2468ace0
85 
88 #define DEFAULT_nCHILDREN 64
89 
92 #define DEFAULT_BLOCKSIZE 32768
93 
98  doesNotExist = -1,
99  mean = 0,
100  average = 0,
101  stdev = 1,
102  dev = 1,
103  max = 2,
104  min = 3,
105  cov = 4,
106  coverage = 4
107 };
108 
109 //Should hide this from end users
115 typedef struct {
116  uint32_t *level;
117  //There's 4 bytes of padding between these
118  uint64_t *dataOffset;
119  uint64_t *indexOffset;
121 } bwZoomHdr_t;
122 
128 typedef struct {
129  uint16_t version;
130  uint16_t nLevels;
131  uint64_t ctOffset;
132  uint64_t dataOffset;
133  uint64_t indexOffset;
134  uint16_t fieldCount;
135  uint16_t definedFieldCount;
136  uint64_t sqlOffset;
137  uint64_t summaryOffset;
138  uint32_t bufSize;
139  uint64_t extensionOffset;
141  //total Summary
142  uint64_t nBasesCovered;
143  double minVal;
144  double maxVal;
145  double sumData;
146  double sumSquared;
147 } bigWigHdr_t;
148 
149 //Should probably replace this with a hash
153 typedef struct {
154  int64_t nKeys;
155  char **chrom;
156  uint32_t *len;
157 } chromList_t;
158 
159 //TODO remove from bigWig.h
161 typedef struct bwLL bwLL;
162 struct bwLL {
163  bwRTreeNode_t *node;
164  struct bwLL *next;
165 };
166 typedef struct bwZoomBuffer_t bwZoomBuffer_t;
167 struct bwZoomBuffer_t { //each individual entry takes 32 bytes
168  void *p;
169  uint32_t l, m;
170  struct bwZoomBuffer_t *next;
171 };
173 
178 typedef struct {
179  uint64_t nBlocks;
180  uint32_t blockSize;
181  uint64_t nEntries;
182  uint64_t runningWidthSum;
183  uint32_t tid;
184  uint32_t start;
185  uint32_t end;
186  uint32_t span;
187  uint32_t step;
188  uint8_t ltype;
189  uint32_t l;
190  void *p;
193  bwZoomBuffer_t **firstZoomBuffer;
194  bwZoomBuffer_t **lastZoomBuffer;
195  uint64_t *nNodes;
196  uLongf compressPsz;
197  void *compressP;
199 
203 typedef struct {
209  int isWrite;
210  int type;
211 } bigWigFile_t;
212 
216 typedef struct {
217  uint32_t l;
218  uint32_t m;
219  uint32_t *start;
220  uint32_t *end;
221  float *value;
223 
227 typedef struct {
228  uint32_t l;
229  uint32_t m;
230  uint32_t *start;
231  uint32_t *end;
232  char **str;
234 
239 typedef struct {
241  uint32_t tid;
242  uint32_t start;
243  uint32_t end;
244  uint64_t offset;
247  void *blocks;
250  void *data;
252 
260 int bwInit(size_t bufSize);
261 
266 void bwCleanup(void);
267 
275 int bwIsBigWig(char *fname, CURLcode (*callBack)(CURL*));
276 
284 int bbIsBigBed(char *fname, CURLcode (*callBack)(CURL*));
285 
294 bigWigFile_t *bwOpen(char *fname, CURLcode (*callBack)(CURL*), const char* mode);
295 
303 bigWigFile_t *bbOpen(char *fname, CURLcode (*callBack)(CURL*));
304 
313 char *bbGetSQL(bigWigFile_t *fp);
314 
320 void bwClose(bigWigFile_t *fp);
321 
322 /*******************************************************************************
323 *
324 * The following are in bwStats.c
325 *
326 *******************************************************************************/
327 
335 uint32_t bwGetTid(bigWigFile_t *fp, char *chrom);
336 
343 
350 
363 bwOverlappingIntervals_t *bwGetOverlappingIntervals(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end);
364 
377 bbOverlappingEntries_t *bbGetOverlappingEntries(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int withString);
378 
393 bwOverlapIterator_t *bwOverlappingIntervalsIterator(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t blocksPerIteration);
394 
411 bwOverlapIterator_t *bbOverlappingEntriesIterator(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int withString, uint32_t blocksPerIteration);
412 
421 
427 
441 bwOverlappingIntervals_t *bwGetValues(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int includeNA);
442 
455 double *bwStats(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t nBins, enum bwStatsType type);
456 
469 double *bwStatsFromFull(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t nBins, enum bwStatsType type);
470 
471 //Writer functions
472 
480 int bwCreateHdr(bigWigFile_t *fp, int32_t maxZooms);
481 
490 chromList_t *bwCreateChromList(char **chroms, uint32_t *lengths, int64_t n);
491 
499 int bwWriteHdr(bigWigFile_t *bw);
500 
517 int bwAddIntervals(bigWigFile_t *fp, char **chrom, uint32_t *start, uint32_t *end, float *values, uint32_t n);
518 
531 int bwAppendIntervals(bigWigFile_t *fp, uint32_t *start, uint32_t *end, float *values, uint32_t n);
532 
549 int bwAddIntervalSpans(bigWigFile_t *fp, char *chrom, uint32_t *start, uint32_t span, float *values, uint32_t n);
550 
562 int bwAppendIntervalSpans(bigWigFile_t *fp, uint32_t *start, float *values, uint32_t n);
563 
581 int bwAddIntervalSpanSteps(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t span, uint32_t step, float *values, uint32_t n);
582 
593 int bwAppendIntervalSpanSteps(bigWigFile_t *fp, float *values, uint32_t n);
594 
595 #ifdef __cplusplus
596 }
597 #endif
uint64_t summaryOffset
Definition: bigWig.h:137
void bbDestroyOverlappingEntries(bbOverlappingEntries_t *o)
Frees space allocated by bbGetOverlappingEntries
Definition: bwValues.c:328
-
Holds interval:str associations.
Definition: bigWig.h:216
-
This structure holds the file pointers and buffers needed for raw access to local and remote files...
Definition: io.h:24
-
uint64_t nBlocks
Definition: bigWig.h:168
-
bwZoomHdr_t * zoomHdrs
Definition: bigWig.h:129
-
double maxVal
Definition: bigWig.h:133
-
uint16_t fieldCount
Definition: bigWig.h:123
+
Holds interval:str associations.
Definition: bigWig.h:227
+
This structure holds the file pointers and buffers needed for raw access to local and remote files...
Definition: BigWigIO.h:32
+
uint64_t nBlocks
Definition: bigWig.h:179
+
bwZoomHdr_t * zoomHdrs
Definition: bigWig.h:140
+
double maxVal
Definition: bigWig.h:144
+
uint16_t fieldCount
Definition: bigWig.h:134
int bwAppendIntervalSpans(bigWigFile_t *fp, uint32_t *start, float *values, uint32_t n)
Append to a previous block of variable-step entries. If you previously used bwAddIntervalSpans(), this will continue appending more values to the block(s) it created.
Definition: bwWrite.c:468
int bwAddIntervals(bigWigFile_t *fp, char **chrom, uint32_t *start, uint32_t *end, float *values, uint32_t n)
Write a new block of bedGraph-like intervals to a bigWig file Adds entries of the form: chromosome st...
Definition: bwWrite.c:347
bbOverlappingEntries_t * bbGetOverlappingEntries(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int withString)
Return bigBed entries overlapping an interval. Find all bigBed entries overlapping a range and return...
Definition: bwValues.c:570
int bwCreateHdr(bigWigFile_t *fp, int32_t maxZooms)
Create a largely empty bigWig header Every bigWig file has a header, this creates the template for on...
Definition: bwWrite.c:56
-
uint32_t span
Definition: bigWig.h:175
-
bwWriteBuffer_t * writeBuffer
Definition: bigWig.h:197
-
uint32_t m
Definition: bigWig.h:207
-
uint32_t * start
Definition: bigWig.h:208
-
bwOverlappingIntervals_t * intervals
Definition: bigWig.h:237
-
uint64_t offset
Definition: bigWig.h:233
-
char * bbGetSQL(bigWigFile_t *fp)
Returns a string containing the SQL entry (or NULL). The "auto SQL" field contains the names and valu...
Definition: bwRead.c:311
-
uint32_t start
Definition: bigWig.h:173
-
bbOverlappingEntries_t * entries
Definition: bigWig.h:238
-
bigWigFile_t * bw
Definition: bigWig.h:229
-
uint32_t l
Definition: bigWig.h:206
-
uint32_t l
Definition: bigWig.h:178
-
uint32_t * len
Definition: bigWig.h:145
-
uint32_t end
Definition: bigWig.h:174
-
uint32_t blocksPerIteration
Definition: bigWig.h:234
-
bigWigFile_t * bwOpen(char *fname, CURLcode(*callBack)(CURL *), const char *mode)
Opens a local or remote bigWig file. This will open a local or remote bigWig file. Writing of local bigWig files is also supported.
Definition: bwRead.c:341
-
bwZoomBuffer_t ** lastZoomBuffer
Definition: bigWig.h:183
-
double sumData
Definition: bigWig.h:134
-
bwLL * currentIndexNode
Definition: bigWig.h:181
-
uint16_t version
Definition: bigWig.h:118
-
int type
Definition: bigWig.h:199
-
uint8_t ltype
Definition: bigWig.h:177
+
uint32_t span
Definition: bigWig.h:186
+
bwWriteBuffer_t * writeBuffer
Definition: bigWig.h:208
+
uint32_t m
Definition: bigWig.h:218
+
uint32_t * start
Definition: bigWig.h:219
+
bwOverlappingIntervals_t * intervals
Definition: bigWig.h:248
+
uint64_t offset
Definition: bigWig.h:244
+
char * bbGetSQL(bigWigFile_t *fp)
Returns a string containing the SQL entry (or NULL). The "auto SQL" field contains the names and valu...
Definition: bwRead.c:318
+
uint32_t start
Definition: bigWig.h:184
+
bbOverlappingEntries_t * entries
Definition: bigWig.h:249
+
bigWigFile_t * bw
Definition: bigWig.h:240
+
uint32_t l
Definition: bigWig.h:217
+
uint32_t l
Definition: bigWig.h:189
+
uint32_t * len
Definition: bigWig.h:156
+
uint32_t end
Definition: bigWig.h:185
+
uint32_t blocksPerIteration
Definition: bigWig.h:245
+
bigWigFile_t * bwOpen(char *fname, CURLcode(*callBack)(CURL *), const char *mode)
Opens a local or remote bigWig file. This will open a local or remote bigWig file. Writing of local bigWig files is also supported.
Definition: bwRead.c:348
+
bwZoomBuffer_t ** lastZoomBuffer
Definition: bigWig.h:194
+
double sumData
Definition: bigWig.h:145
+
bwLL * currentIndexNode
Definition: bigWig.h:192
+
uint16_t version
Definition: bigWig.h:129
+
int type
Definition: bigWig.h:210
+
uint8_t ltype
Definition: bigWig.h:188
uint32_t bwGetTid(bigWigFile_t *fp, char *chrom)
Converts between chromosome name and ID.
Definition: bwValues.c:279
- -
uint32_t l
Definition: bigWig.h:217
-
A structure to hold iterations One of intervals and entries should be used to access records from big...
Definition: bigWig.h:228
-
bwZoomBuffer_t ** firstZoomBuffer
Definition: bigWig.h:182
+
uint32_t l
Definition: bigWig.h:228
+
A structure to hold iterations One of intervals and entries should be used to access records from big...
Definition: bigWig.h:239
+
bwZoomBuffer_t ** firstZoomBuffer
Definition: bigWig.h:193
int bwWriteHdr(bigWigFile_t *bw)
Write a the header to a bigWig file. You must have already opened the output file, created a header and a chromosome list.
Definition: bwWrite.c:160
-
uint64_t nEntries
Definition: bigWig.h:170
-
uint32_t tid
Definition: bigWig.h:230
+
uint64_t nEntries
Definition: bigWig.h:181
+
uint32_t tid
Definition: bigWig.h:241
+
bwOverlapIterator_t * bbOverlappingEntriesIterator(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int withString, uint32_t blocksPerIteration)
Creates an iterator over entries in a bigBed file Iterators can be traversed with bwIteratorNext() an...
Definition: bwValues.c:610
-
The header section of a bigWig file.
Definition: bigWig.h:117
-
uint64_t sqlOffset
Definition: bigWig.h:125
+
The header section of a bigWig file.
Definition: bigWig.h:128
+
uint64_t sqlOffset
Definition: bigWig.h:136
bwOverlappingIntervals_t * bwGetValues(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int includeNA)
Return all per-base bigWig values in a given interval. Given an interval (e.g., chr1:0-100), return the value at each position in a bigWig file. Positions without associated values are suppressed by default, but may be returned if includeNA is not 0.
Definition: bwValues.c:708
-
uint32_t blockSize
Definition: bigWig.h:169
+
uint32_t blockSize
Definition: bigWig.h:180
int bwAppendIntervalSpanSteps(bigWigFile_t *fp, float *values, uint32_t n)
Append to a previous block of fixed-step entries. If you previously used bwAddIntervalSpanSteps(), this will continue appending more values to the block(s) it created.
Definition: bwWrite.c:525
int bwAddIntervalSpanSteps(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t span, uint32_t step, float *values, uint32_t n)
Add a new block of fixed-step entries to a bigWig file Adds entries for the form value to the file...
Definition: bwWrite.c:493
-
uint32_t start
Definition: bigWig.h:231
-
uint32_t bufSize
Definition: bigWig.h:127
-
uint64_t ctOffset
Definition: bigWig.h:120
-
This is only needed for writing bigWig files (and won&#39;t be created otherwise) This should be removed ...
Definition: bigWig.h:167
-
uint32_t tid
Definition: bigWig.h:172
-
bwRTree_t ** idx
Definition: bigWig.h:109
-
uint64_t nBasesCovered
Definition: bigWig.h:131
-
int bwIsBigWig(char *fname, CURLcode(*callBack)(CURL *))
Determine if a file is a bigWig file. This function will quickly check either local or remote files t...
Definition: bwRead.c:298
-
char ** str
Definition: bigWig.h:221
-
BigWig files have multiple "zoom" levels, each of which has its own header. This hold those headers...
Definition: bigWig.h:104
-
uint32_t * start
Definition: bigWig.h:219
-
uint64_t dataOffset
Definition: bigWig.h:121
-
void * blocks
Definition: bigWig.h:236
+
uint32_t start
Definition: bigWig.h:242
+
uint32_t bufSize
Definition: bigWig.h:138
+
uint64_t ctOffset
Definition: bigWig.h:131
+
This is only needed for writing bigWig files (and won&#39;t be created otherwise) This should be removed ...
Definition: bigWig.h:178
+
uint32_t tid
Definition: bigWig.h:183
+
bwRTree_t ** idx
Definition: bigWig.h:120
+
uint64_t nBasesCovered
Definition: bigWig.h:142
+
int bwIsBigWig(char *fname, CURLcode(*callBack)(CURL *))
Determine if a file is a bigWig file. This function will quickly check either local or remote files t...
Definition: bwRead.c:305
+
char ** str
Definition: bigWig.h:232
+
BigWig files have multiple "zoom" levels, each of which has its own header. This hold those headers...
Definition: bigWig.h:115
+
uint32_t * start
Definition: bigWig.h:230
+
uint64_t dataOffset
Definition: bigWig.h:132
+
void * blocks
Definition: bigWig.h:247
bwOverlappingIntervals_t * bwGetOverlappingIntervals(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end)
Return bigWig entries overlapping an interval. Find all bigWig entries overlapping a range and return...
Definition: bwValues.c:558
-
void * p
Definition: bigWig.h:179
-
URL_t * URL
Definition: bigWig.h:193
-
double sumSquared
Definition: bigWig.h:135
+
void * p
Definition: bigWig.h:190
+
URL_t * URL
Definition: bigWig.h:204
+
double sumSquared
Definition: bigWig.h:146
chromList_t * bwCreateChromList(char **chroms, uint32_t *lengths, int64_t n)
Take a list of chromosome names and lengths and return a pointer to a chromList_t This MUST be run be...
Definition: bwWrite.c:22
int bwAddIntervalSpans(bigWigFile_t *fp, char *chrom, uint32_t *start, uint32_t span, float *values, uint32_t n)
Add a new block of variable-step entries to a bigWig file Adds entries for the form chromosome start ...
Definition: bwWrite.c:435
-
uint32_t step
Definition: bigWig.h:176
-
uint16_t nLevels
Definition: bigWig.h:119
-
bwLL * firstIndexNode
Definition: bigWig.h:180
+
uint32_t step
Definition: bigWig.h:187
+
uint16_t nLevels
Definition: bigWig.h:130
+
bwLL * firstIndexNode
Definition: bigWig.h:191
int bwInit(size_t bufSize)
Initializes curl and global variables. This MUST be called before other functions (at least if you wa...
Definition: bwRead.c:38
-
bigWigHdr_t * hdr
Definition: bigWig.h:194
+
bigWigHdr_t * hdr
Definition: bigWig.h:205
void bwIteratorDestroy(bwOverlapIterator_t *iter)
Destroys a bwOverlapIterator_t.
Definition: bwValues.c:638
void bwDestroyOverlappingIntervals(bwOverlappingIntervals_t *o)
Frees space allocated by bwGetOverlappingIntervals
Definition: bwValues.c:320
-
void * data
Definition: bigWig.h:239
-
int isWrite
Definition: bigWig.h:198
+
void * data
Definition: bigWig.h:250
+
int isWrite
Definition: bigWig.h:209
bwOverlapIterator_t * bwIteratorNext(bwOverlapIterator_t *iter)
Traverses to the entries/intervals in the next group of blocks.
Definition: bwValues.c:647
-
float * value
Definition: bigWig.h:210
-
char ** chrom
Definition: bigWig.h:144
-
Holds interval:value associations.
Definition: bigWig.h:205
-
uint64_t runningWidthSum
Definition: bigWig.h:171
-
double * bwStatsFromFull(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t nBins, enum bwStatsType type)
Determines per-interval bigWig statistics Can determine mean/min/max/coverage/standard deviation of v...
Definition: bwStats.c:433
-
uint16_t definedFieldCount
Definition: bigWig.h:124
-
A structure that holds everything needed to access a bigWig file.
Definition: bigWig.h:192
-
int withString
Definition: bigWig.h:235
-
double * bwStats(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t nBins, enum bwStatsType type)
Determines per-interval bigWig statistics Can determine mean/min/max/coverage/standard deviation of v...
Definition: bwStats.c:475
-
bwStatsType
Definition: bigWig.h:86
-
bwRTree_t * idx
Definition: bigWig.h:196
-
int bbIsBigBed(char *fname, CURLcode(*callBack)(CURL *))
Determine is a file is a bigBed file. This function will quickly check either local or remote files t...
Definition: bwRead.c:328
-
uint64_t * nNodes
Definition: bigWig.h:184
-
uint32_t m
Definition: bigWig.h:218
-
double minVal
Definition: bigWig.h:132
-
void bwCleanup(void)
The counterpart to bwInit, this cleans up curl.
Definition: bwRead.c:50
-
uint32_t * end
Definition: bigWig.h:209
-
Holds the chromosomes and their lengths.
Definition: bigWig.h:142
-
uint32_t end
Definition: bigWig.h:232
+
float * value
Definition: bigWig.h:221
+
char ** chrom
Definition: bigWig.h:155
+
Holds interval:value associations.
Definition: bigWig.h:216
+
uint64_t runningWidthSum
Definition: bigWig.h:182
+
double * bwStatsFromFull(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t nBins, enum bwStatsType type)
Determines per-interval bigWig statistics Can determine mean/min/max/coverage/standard deviation of v...
Definition: bwStats.c:434
+
uint16_t definedFieldCount
Definition: bigWig.h:135
+
A structure that holds everything needed to access a bigWig file.
Definition: bigWig.h:203
+
int withString
Definition: bigWig.h:246
+
double * bwStats(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t nBins, enum bwStatsType type)
Determines per-interval bigWig statistics Can determine mean/min/max/coverage/standard deviation of v...
Definition: bwStats.c:476
+
bwStatsType
Definition: bigWig.h:97
+
bwRTree_t * idx
Definition: bigWig.h:207
+
int bbIsBigBed(char *fname, CURLcode(*callBack)(CURL *))
Determine is a file is a bigBed file. This function will quickly check either local or remote files t...
Definition: bwRead.c:335
+
uint64_t * nNodes
Definition: bigWig.h:195
+
uint32_t m
Definition: bigWig.h:229
+
double minVal
Definition: bigWig.h:143
+
void bwCleanup(void)
The counterpart to bwInit, this cleans up curl.
Definition: bwRead.c:52
+
uint32_t * end
Definition: bigWig.h:220
+
Holds the chromosomes and their lengths.
Definition: bigWig.h:153
+
uint32_t end
Definition: bigWig.h:243
Definition: bwValues.h:36
-
uLongf compressPsz
Definition: bigWig.h:185
-
uint64_t * indexOffset
Definition: bigWig.h:108
-
uint64_t indexOffset
Definition: bigWig.h:122
+
uLongf compressPsz
Definition: bigWig.h:196
+
uint64_t * indexOffset
Definition: bigWig.h:119
+
uint64_t indexOffset
Definition: bigWig.h:133
int bwAppendIntervals(bigWigFile_t *fp, uint32_t *start, uint32_t *end, float *values, uint32_t n)
Append bedGraph-like intervals to a previous block of bedGraph-like intervals in a bigWig file...
Definition: bwWrite.c:407
-
uint64_t extensionOffset
Definition: bigWig.h:128
-
uint64_t * dataOffset
Definition: bigWig.h:107
-
chromList_t * cl
Definition: bigWig.h:195
-
uint32_t * level
Definition: bigWig.h:105
+
uint64_t extensionOffset
Definition: bigWig.h:139
+
uint64_t * dataOffset
Definition: bigWig.h:118
+
chromList_t * cl
Definition: bigWig.h:206
+
uint32_t * level
Definition: bigWig.h:116
A node within an R-tree holding the index for data.
Definition: bwValues.h:17
-
uint32_t * end
Definition: bigWig.h:220
-
void bwClose(bigWigFile_t *fp)
Closes a bigWigFile_t and frees up allocated memory This closes both bigWig and bigBed files...
Definition: bwRead.c:285
+
uint32_t * end
Definition: bigWig.h:231
+
void bwClose(bigWigFile_t *fp)
Closes a bigWigFile_t and frees up allocated memory This closes both bigWig and bigBed files...
Definition: bwRead.c:292
bwOverlapIterator_t * bwOverlappingIntervalsIterator(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t blocksPerIteration)
Creates an iterator over intervals in a bigWig file Iterators can be traversed with bwIteratorNext() ...
Definition: bwValues.c:582
-
int64_t nKeys
Definition: bigWig.h:143
-
void * compressP
Definition: bigWig.h:186
+
int64_t nKeys
Definition: bigWig.h:154
+
void * compressP
Definition: bigWig.h:197
-
bigWigFile_t * bbOpen(char *fname, CURLcode(*callBack)(CURL *))
Opens a local or remote bigBed file. This will open a local or remote bigBed file. Note that this file format can only be read and NOT written!
Definition: bwRead.c:380
+
bigWigFile_t * bbOpen(char *fname, CURLcode(*callBack)(CURL *))
Opens a local or remote bigBed file. This will open a local or remote bigBed file. Note that this file format can only be read and NOT written!
Definition: bwRead.c:387
diff --git a/docs/html/bwCommon_8h.html b/docs/html/bwCommon_8h.html index 1dfdab7..c15ad97 100644 --- a/docs/html/bwCommon_8h.html +++ b/docs/html/bwCommon_8h.html @@ -342,7 +342,7 @@
diff --git a/docs/html/bwCommon_8h_source.html b/docs/html/bwCommon_8h_source.html index dc03a14..5e6d8d5 100644 --- a/docs/html/bwCommon_8h_source.html +++ b/docs/html/bwCommon_8h_source.html @@ -88,9 +88,9 @@ Go to the documentation of this file.
1 
15 int bwSetPos(bigWigFile_t *fp, size_t pos);
16 
27 size_t bwRead(void *data, size_t sz, size_t nmemb, bigWigFile_t *fp);
28 
35 long bwTell(bigWigFile_t *fp);
36 
44 bwRTree_t *bwReadIndex(bigWigFile_t *fp, uint64_t offset);
45 
51 
57 void bwDestroyIndex(bwRTree_t *idx);
58 
60 bwOverlapBlock_t *walkRTreeNodes(bigWigFile_t *bw, bwRTreeNode_t *root, uint32_t tid, uint32_t start, uint32_t end);
61 void destroyBWOverlapBlock(bwOverlapBlock_t *b);
63 
70 int bwFinalize(bigWigFile_t *fp);
void bwDestroyIndexNode(bwRTreeNode_t *node)
Destroy an bwRTreeNode_t and all of its children.
Definition: bwValues.c:758
This structure holds the data blocks that overlap a given interval.
Definition: bwValues.h:53
int bwSetPos(bigWigFile_t *fp, size_t pos)
Like fsetpos, but for local or remote bigWig files. This will set the file position indicator to the ...
Definition: bwRead.c:19
-
int bwFinalize(bigWigFile_t *fp)
Finishes what&#39;s needed to write a bigWigFile Flushes the buffer, converts the index linked list to a ...
Definition: bwWrite.c:1185
+
int bwFinalize(bigWigFile_t *fp)
Finishes what&#39;s needed to write a bigWigFile Flushes the buffer, converts the index linked list to a ...
Definition: bwWrite.c:1203
void bwDestroyIndex(bwRTree_t *idx)
Frees space allocated by bwReadIndex There is generally little reason to use this, since end users should typically not need to run bwReadIndex themselves.
Definition: bwValues.c:779
-
A structure that holds everything needed to access a bigWig file.
Definition: bigWig.h:192
+
A structure that holds everything needed to access a bigWig file.
Definition: bigWig.h:203
bwRTree_t * bwReadIndex(bigWigFile_t *fp, uint64_t offset)
Reads a data index (either full data or a zoom level) from a bigWig file. There is little reason for ...
Definition: bwValues.c:786
Definition: bwValues.h:36
long bwTell(bigWigFile_t *fp)
Determine what the file position indicator say. This is equivalent to ftell for local or remote files...
Definition: bwRead.c:11
@@ -99,7 +99,7 @@
diff --git a/docs/html/bwValues_8h.html b/docs/html/bwValues_8h.html index de0b05b..32e9215 100644 --- a/docs/html/bwValues_8h.html +++ b/docs/html/bwValues_8h.html @@ -135,7 +135,7 @@ diff --git a/docs/html/bwValues_8h_source.html b/docs/html/bwValues_8h_source.html index 130359c..b8b83d9 100644 --- a/docs/html/bwValues_8h_source.html +++ b/docs/html/bwValues_8h_source.html @@ -85,7 +85,7 @@
bwValues.h
-Go to the documentation of this file.
1 #include <inttypes.h>
9 //N.B., coordinates are still 0-based half open!
17 typedef struct bwRTreeNode_t {
18  uint8_t isLeaf;
19  //1 byte of padding
20  uint16_t nChildren;
21  uint32_t *chrIdxStart;
22  uint32_t *baseStart;
23  uint32_t *chrIdxEnd;
24  uint32_t *baseEnd;
25  uint64_t *dataOffset;
26  union {
27  uint64_t *size;
28  struct bwRTreeNode_t **child;
29  } x;
31 
35 //TODO rootOffset is pointless, it's 48bytes after the indexOffset
36 typedef struct {
37  uint32_t blockSize;
38  uint64_t nItems;
39  uint32_t chrIdxStart;
40  uint32_t baseStart;
41  uint32_t chrIdxEnd;
42  uint32_t baseEnd;
43  uint64_t idxSize;
44  uint32_t nItemsPerSlot;
45  //There's 4 bytes of padding in the file here
46  uint64_t rootOffset;
48 } bwRTree_t;
49 
53 typedef struct {
54  uint64_t n;
55  uint64_t *offset;
56  uint64_t *size;
58 
64 typedef struct {
65  uint32_t tid;
66  uint32_t start;
67  uint32_t end;
68  uint32_t step;
69  uint32_t span;
70  uint8_t type;
71  uint16_t nItems;
uint64_t * size
Definition: bwValues.h:56
+Go to the documentation of this file.
1 #include <inttypes.h>
9 //N.B., coordinates are still 0-based half open!
17 typedef struct bwRTreeNode_t {
18  uint8_t isLeaf;
19  //1 byte of padding
20  uint16_t nChildren;
21  uint32_t *chrIdxStart;
22  uint32_t *baseStart;
23  uint32_t *chrIdxEnd;
24  uint32_t *baseEnd;
25  uint64_t *dataOffset;
26  union {
27  uint64_t *size;
28  struct bwRTreeNode_t **child;
29  } x;
31 
35 //TODO rootOffset is pointless, it's 48bytes after the indexOffset
36 typedef struct {
37  uint32_t blockSize;
38  uint64_t nItems;
39  uint32_t chrIdxStart;
40  uint32_t baseStart;
41  uint32_t chrIdxEnd;
42  uint32_t baseEnd;
43  uint64_t idxSize;
44  uint32_t nItemsPerSlot;
45  //There's 4 bytes of padding in the file here
46  uint64_t rootOffset;
48 } bwRTree_t;
49 
53 typedef struct {
54  uint64_t n;
55  uint64_t *offset;
56  uint64_t *size;
58 
64 typedef struct {
65  uint32_t tid;
66  uint32_t start;
67  uint32_t end;
68  uint32_t step;
69  uint32_t span;
70  uint8_t type;
71  uint16_t nItems;
uint64_t * size
Definition: bwValues.h:56
struct bwRTreeNode_t ** child
Definition: bwValues.h:28
uint64_t * size
Definition: bwValues.h:27
uint32_t baseStart
Definition: bwValues.h:40
@@ -100,11 +100,11 @@
uint32_t span
Definition: bwValues.h:69
uint32_t * baseStart
Definition: bwValues.h:22
uint8_t type
Definition: bwValues.h:70
+
union bwRTreeNode_t::@1 x
uint64_t nItems
Definition: bwValues.h:38
uint32_t * baseEnd
Definition: bwValues.h:24
uint64_t idxSize
Definition: bwValues.h:43
Definition: bwValues.h:36
-
union bwRTreeNode_t::@0 x
The header section of a given data block.
Definition: bwValues.h:64
struct bwRTreeNode_t bwRTreeNode_t
A node within an R-tree holding the index for data.
uint32_t * chrIdxEnd
Definition: bwValues.h:23
@@ -123,7 +123,7 @@
diff --git a/docs/html/classes.html b/docs/html/classes.html index 983b2eb..3b5dbeb 100644 --- a/docs/html/classes.html +++ b/docs/html/classes.html @@ -103,7 +103,7 @@
diff --git a/docs/html/files.html b/docs/html/files.html index c01357b..8a9e770 100644 --- a/docs/html/files.html +++ b/docs/html/files.html @@ -88,15 +88,15 @@
Here is a list of all documented files with brief descriptions:
diff --git a/docs/html/functions.html b/docs/html/functions.html index b12295d..baefef5 100644 --- a/docs/html/functions.html +++ b/docs/html/functions.html @@ -261,6 +261,9 @@

- i -

  • intervals : bwOverlapIterator_t
  • +
  • isCompressed +: URL_t +
  • isLeaf : bwRTreeNode_t
  • @@ -452,8 +455,8 @@

    - w -

      - x -

      @@ -466,7 +469,7 @@

      - z -

        diff --git a/docs/html/functions_vars.html b/docs/html/functions_vars.html index fa36ce2..8e89827 100644 --- a/docs/html/functions_vars.html +++ b/docs/html/functions_vars.html @@ -261,6 +261,9 @@

        - i -

        • intervals : bwOverlapIterator_t
        • +
        • isCompressed +: URL_t +
        • isLeaf : bwRTreeNode_t
        • @@ -452,8 +455,8 @@

          - w -

            - x -

            @@ -466,7 +469,7 @@

            - z -

              diff --git a/docs/html/globals.html b/docs/html/globals.html index 6e145e1..c688a8f 100644 --- a/docs/html/globals.html +++ b/docs/html/globals.html @@ -130,7 +130,7 @@

              - b -

                : bigWig.h
              • bigWigFile_type_enum -: io.h +: BigWigIO.h
              • bwAddIntervals() : bigWig.h @@ -250,7 +250,7 @@

                - d -

                  - g -

                  @@ -263,6 +263,9 @@

                  - i -

                    - l -

                      +
                    • LIBBIGWIG_CURL +: bigWig.h +
                    • LIBBIGWIG_VERSION : bigWig.h
                    • @@ -271,22 +274,22 @@

                      - l -

                        - u -

                        diff --git a/docs/html/globals_defs.html b/docs/html/globals_defs.html index ae3cf30..3c9c149 100644 --- a/docs/html/globals_defs.html +++ b/docs/html/globals_defs.html @@ -110,6 +110,9 @@
                      • IDX_MAGIC : bigWig.h
                      • +
                      • LIBBIGWIG_CURL +: bigWig.h +
                      • LIBBIGWIG_VERSION : bigWig.h
                      • @@ -117,7 +120,7 @@ diff --git a/docs/html/globals_enum.html b/docs/html/globals_enum.html index 8ddcb3f..33a882d 100644 --- a/docs/html/globals_enum.html +++ b/docs/html/globals_enum.html @@ -93,7 +93,7 @@
                         
                        diff --git a/docs/html/globals_func.html b/docs/html/globals_func.html index 16fbad8..feda68a 100644 --- a/docs/html/globals_func.html +++ b/docs/html/globals_func.html @@ -213,22 +213,22 @@

                        - b -

                          - u -

                          diff --git a/docs/html/globals_type.html b/docs/html/globals_type.html index 2e713b9..bf386cf 100644 --- a/docs/html/globals_type.html +++ b/docs/html/globals_type.html @@ -99,7 +99,7 @@ diff --git a/docs/html/globals_vars.html b/docs/html/globals_vars.html index 6ccb109..d64db93 100644 --- a/docs/html/globals_vars.html +++ b/docs/html/globals_vars.html @@ -93,13 +93,13 @@
                           
                          diff --git a/docs/html/index.html b/docs/html/index.html index b4073a1..14828be 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -105,7 +105,7 @@

                          diff --git a/docs/html/md_README.html b/docs/html/md_README.html index 4965f79..3eb3ffb 100644 --- a/docs/html/md_README.html +++ b/docs/html/md_README.html @@ -270,11 +270,13 @@

                          Example

                          A note on bigWig statistics

                          The results of min, max, and mean should be the same as those from BigWigSummary. stdev and coverage, however, may differ due to Kent's tools producing incorrect results (at least for coverage, though the same appears to be the case for stdev).

                          Python interface

                          -

                          There are currently two python interfaces that make use of libBigWig: pyBigWig by me and bw-python by Brent Pederson. Those interested are encouraged to give both a try!

                          +

                          There are currently two python interfaces that make use of libBigWig: pyBigWig by me and bw-python by Brent Pederson. Those interested are encouraged to give both a try!

                          +

                          Building without remote file access

                          +

                          If you want to compile without remote file access (e.g., you don't have curl installed), then you can append -DNOCURL to the CFLAGS line in the Makefile. You will also need to remove -lcurl from the LIBS line.

                          diff --git a/docs/html/pages.html b/docs/html/pages.html index e8b6bfc..19f39d4 100644 --- a/docs/html/pages.html +++ b/docs/html/pages.html @@ -87,7 +87,7 @@ diff --git a/docs/html/search/all_0.js b/docs/html/search/all_0.js index 203b4c1..81d866c 100644 --- a/docs/html/search/all_0.js +++ b/docs/html/search/all_0.js @@ -13,8 +13,9 @@ var searchData= ['bigwig_2eh',['bigWig.h',['../bigWig_8h.html',1,'']]], ['bigwig_5fmagic',['BIGWIG_MAGIC',['../bigWig_8h.html#abc55570005e3349503ee7f6d5267eb8a',1,'bigWig.h']]], ['bigwigfile_5ft',['bigWigFile_t',['../structbigWigFile__t.html',1,'']]], - ['bigwigfile_5ftype_5fenum',['bigWigFile_type_enum',['../io_8h.html#a53551ff2ef7a2c1b938e94ef9592ab66',1,'io.h']]], + ['bigwigfile_5ftype_5fenum',['bigWigFile_type_enum',['../BigWigIO_8h.html#a53551ff2ef7a2c1b938e94ef9592ab66',1,'BigWigIO.h']]], ['bigwighdr_5ft',['bigWigHdr_t',['../structbigWigHdr__t.html',1,'']]], + ['bigwigio_2eh',['BigWigIO.h',['../BigWigIO_8h.html',1,'']]], ['blocks',['blocks',['../structbwOverlapIterator__t.html#af2c02ec44c6c5a202874e79d9e2fca40',1,'bwOverlapIterator_t']]], ['blocksize',['blockSize',['../structbwWriteBuffer__t.html#a39aa0458ab26dbbc1e0edf47eb7f903d',1,'bwWriteBuffer_t::blockSize()'],['../structbwRTree__t.html#a430220a665cfcc8c76e372dc8f221b2f',1,'bwRTree_t::blockSize()']]], ['blocksperiteration',['blocksPerIteration',['../structbwOverlapIterator__t.html#a401ea1885855ff8b4285fc289aa281cf',1,'bwOverlapIterator_t']]], diff --git a/docs/html/search/all_10.js b/docs/html/search/all_10.js index d7d9124..f795be3 100644 --- a/docs/html/search/all_10.js +++ b/docs/html/search/all_10.js @@ -2,8 +2,8 @@ var searchData= [ ['url',['URL',['../structbigWigFile__t.html#abaccab4cf24d79952cdf593baab2c9fb',1,'bigWigFile_t']]], ['url_5ft',['URL_t',['../structURL__t.html',1,'']]], - ['urlclose',['urlClose',['../io_8h.html#add8705cdab8e6f2193a50bf095f08470',1,'io.c']]], - ['urlopen',['urlOpen',['../io_8h.html#a8583139627ed0a732e6d9b4f80231c87',1,'io.c']]], - ['urlread',['urlRead',['../io_8h.html#a8f6a5aa097c9af9925171dd43d688f26',1,'io.c']]], - ['urlseek',['urlSeek',['../io_8h.html#a55a1fcb43f68a2b3c3a2b66a6459a0a8',1,'io.c']]] + ['urlclose',['urlClose',['../BigWigIO_8h.html#add8705cdab8e6f2193a50bf095f08470',1,'io.c']]], + ['urlopen',['urlOpen',['../BigWigIO_8h.html#a8583139627ed0a732e6d9b4f80231c87',1,'io.c']]], + ['urlread',['urlRead',['../BigWigIO_8h.html#a8f6a5aa097c9af9925171dd43d688f26',1,'io.c']]], + ['urlseek',['urlSeek',['../BigWigIO_8h.html#a55a1fcb43f68a2b3c3a2b66a6459a0a8',1,'io.c']]] ]; diff --git a/docs/html/search/all_13.js b/docs/html/search/all_13.js index 6331f76..a8b09fb 100644 --- a/docs/html/search/all_13.js +++ b/docs/html/search/all_13.js @@ -1,4 +1,4 @@ var searchData= [ - ['x',['x',['../structbwRTreeNode__t.html#a5d4127fac68dc3dc91c1283f8102e100',1,'bwRTreeNode_t::x()'],['../structURL__t.html#ad063b18d976f45276ed3a014ac339e5f',1,'URL_t::x()']]] + ['x',['x',['../structURL__t.html#a63b0ae93630e20a126186d856797e78a',1,'URL_t::x()'],['../structbwRTreeNode__t.html#aa55ddacdf7ed257a71bd7560e9a07157',1,'bwRTreeNode_t::x()']]] ]; diff --git a/docs/html/search/all_5.js b/docs/html/search/all_5.js index 74237ec..4bba4fb 100644 --- a/docs/html/search/all_5.js +++ b/docs/html/search/all_5.js @@ -1,4 +1,4 @@ var searchData= [ - ['global_5fdefaultbuffersize',['GLOBAL_DEFAULTBUFFERSIZE',['../io_8h.html#a2f4038b5ef0a0e7dc45a20fc0bb83925',1,'io.c']]] + ['global_5fdefaultbuffersize',['GLOBAL_DEFAULTBUFFERSIZE',['../BigWigIO_8h.html#a2f4038b5ef0a0e7dc45a20fc0bb83925',1,'io.c']]] ]; diff --git a/docs/html/search/all_7.js b/docs/html/search/all_7.js index 638bc29..21332ed 100644 --- a/docs/html/search/all_7.js +++ b/docs/html/search/all_7.js @@ -5,7 +5,7 @@ var searchData= ['idxsize',['idxSize',['../structbwRTree__t.html#a119af9ef30b2923ccb7e4ae8a6d3b501',1,'bwRTree_t']]], ['indexoffset',['indexOffset',['../structbwZoomHdr__t.html#a8d7a1c8741ecbecde64f462267f0f116',1,'bwZoomHdr_t::indexOffset()'],['../structbigWigHdr__t.html#a933b1bc6988c30fca67bb392a04b7357',1,'bigWigHdr_t::indexOffset()']]], ['intervals',['intervals',['../structbwOverlapIterator__t.html#a5e1e6474d26a3e5900e6b91603e0664a',1,'bwOverlapIterator_t']]], - ['io_2eh',['io.h',['../io_8h.html',1,'']]], + ['iscompressed',['isCompressed',['../structURL__t.html#ab1fe842d66e490e6851ec2fe4e5276e6',1,'URL_t']]], ['isleaf',['isLeaf',['../structbwRTreeNode__t.html#aa2dac9df29c6b9eaaf4000e70f3e1540',1,'bwRTreeNode_t']]], ['iswrite',['isWrite',['../structbigWigFile__t.html#a76e415b9a2933c94927c4e137057bd4a',1,'bigWigFile_t']]] ]; diff --git a/docs/html/search/all_8.js b/docs/html/search/all_8.js index 76e28e5..0fad3f2 100644 --- a/docs/html/search/all_8.js +++ b/docs/html/search/all_8.js @@ -5,6 +5,7 @@ var searchData= ['lastzoombuffer',['lastZoomBuffer',['../structbwWriteBuffer__t.html#a0482ff2c9325a3357920c36be45120e9',1,'bwWriteBuffer_t']]], ['len',['len',['../structchromList__t.html#aa2f62f323e30d9b38dab39d8bd509aa9',1,'chromList_t']]], ['level',['level',['../structbwZoomHdr__t.html#a7045125541f372d6521700d6fff6d75f',1,'bwZoomHdr_t']]], + ['libbigwig_5fcurl',['LIBBIGWIG_CURL',['../bigWig_8h.html#ac2496b5d01c469f90f790b933f31d0d4',1,'bigWig.h']]], ['libbigwig_5fversion',['LIBBIGWIG_VERSION',['../bigWig_8h.html#afe870db159b3eed39c32be30ccc73c4e',1,'bigWig.h']]], ['ltype',['ltype',['../structbwWriteBuffer__t.html#a1f43dfc468bb4e17524bffda40e24122',1,'bwWriteBuffer_t']]] ]; diff --git a/docs/html/search/all_f.js b/docs/html/search/all_f.js index 47c1b7b..a247401 100644 --- a/docs/html/search/all_f.js +++ b/docs/html/search/all_f.js @@ -1,5 +1,5 @@ var searchData= [ ['tid',['tid',['../structbwWriteBuffer__t.html#a1e80409d671ddba8f507c5b7a388d27c',1,'bwWriteBuffer_t::tid()'],['../structbwOverlapIterator__t.html#aaa10d193fe93d568d8caeabf33f96521',1,'bwOverlapIterator_t::tid()'],['../structbwDataHeader__t.html#a44b09f0b98af0b93ec4348357ad51d98',1,'bwDataHeader_t::tid()']]], - ['type',['type',['../structbigWigFile__t.html#a8b025cec8945b0ad1aef06113f17c463',1,'bigWigFile_t::type()'],['../structbwDataHeader__t.html#a77294dce47a8154444baf1a1a1321af4',1,'bwDataHeader_t::type()'],['../structURL__t.html#a431adb9c33b3d8d43575799f6fdcd497',1,'URL_t::type()']]] + ['type',['type',['../structbigWigFile__t.html#a8b025cec8945b0ad1aef06113f17c463',1,'bigWigFile_t::type()'],['../structURL__t.html#a431adb9c33b3d8d43575799f6fdcd497',1,'URL_t::type()'],['../structbwDataHeader__t.html#a77294dce47a8154444baf1a1a1321af4',1,'bwDataHeader_t::type()']]] ]; diff --git a/docs/html/search/defines_4.js b/docs/html/search/defines_4.js index 73e6cb5..ead2542 100644 --- a/docs/html/search/defines_4.js +++ b/docs/html/search/defines_4.js @@ -1,4 +1,5 @@ var searchData= [ + ['libbigwig_5fcurl',['LIBBIGWIG_CURL',['../bigWig_8h.html#ac2496b5d01c469f90f790b933f31d0d4',1,'bigWig.h']]], ['libbigwig_5fversion',['LIBBIGWIG_VERSION',['../bigWig_8h.html#afe870db159b3eed39c32be30ccc73c4e',1,'bigWig.h']]] ]; diff --git a/docs/html/search/enums_0.js b/docs/html/search/enums_0.js index 47ecd6c..b0851ab 100644 --- a/docs/html/search/enums_0.js +++ b/docs/html/search/enums_0.js @@ -1,5 +1,5 @@ var searchData= [ - ['bigwigfile_5ftype_5fenum',['bigWigFile_type_enum',['../io_8h.html#a53551ff2ef7a2c1b938e94ef9592ab66',1,'io.h']]], + ['bigwigfile_5ftype_5fenum',['bigWigFile_type_enum',['../BigWigIO_8h.html#a53551ff2ef7a2c1b938e94ef9592ab66',1,'BigWigIO.h']]], ['bwstatstype',['bwStatsType',['../bigWig_8h.html#aa3e01d7486887aa111417b688bc1a22c',1,'bigWig.h']]] ]; diff --git a/docs/html/search/files_0.js b/docs/html/search/files_0.js index 8bad7f6..90a6209 100644 --- a/docs/html/search/files_0.js +++ b/docs/html/search/files_0.js @@ -1,6 +1,7 @@ var searchData= [ ['bigwig_2eh',['bigWig.h',['../bigWig_8h.html',1,'']]], + ['bigwigio_2eh',['BigWigIO.h',['../BigWigIO_8h.html',1,'']]], ['bwcommon_2eh',['bwCommon.h',['../bwCommon_8h.html',1,'']]], ['bwvalues_2eh',['bwValues.h',['../bwValues_8h.html',1,'']]] ]; diff --git a/docs/html/search/functions_1.js b/docs/html/search/functions_1.js index d557675..3eff829 100644 --- a/docs/html/search/functions_1.js +++ b/docs/html/search/functions_1.js @@ -1,7 +1,7 @@ var searchData= [ - ['urlclose',['urlClose',['../io_8h.html#add8705cdab8e6f2193a50bf095f08470',1,'io.c']]], - ['urlopen',['urlOpen',['../io_8h.html#a8583139627ed0a732e6d9b4f80231c87',1,'io.c']]], - ['urlread',['urlRead',['../io_8h.html#a8f6a5aa097c9af9925171dd43d688f26',1,'io.c']]], - ['urlseek',['urlSeek',['../io_8h.html#a55a1fcb43f68a2b3c3a2b66a6459a0a8',1,'io.c']]] + ['urlclose',['urlClose',['../BigWigIO_8h.html#add8705cdab8e6f2193a50bf095f08470',1,'io.c']]], + ['urlopen',['urlOpen',['../BigWigIO_8h.html#a8583139627ed0a732e6d9b4f80231c87',1,'io.c']]], + ['urlread',['urlRead',['../BigWigIO_8h.html#a8f6a5aa097c9af9925171dd43d688f26',1,'io.c']]], + ['urlseek',['urlSeek',['../BigWigIO_8h.html#a55a1fcb43f68a2b3c3a2b66a6459a0a8',1,'io.c']]] ]; diff --git a/docs/html/search/searchdata.js b/docs/html/search/searchdata.js index e723ee4..10ec83f 100644 --- a/docs/html/search/searchdata.js +++ b/docs/html/search/searchdata.js @@ -2,7 +2,7 @@ var indexSectionsWithContent = { 0: "bcdefghilmnoprstuvwxz", 1: "bcu", - 2: "bi", + 2: "b", 3: "bu", 4: "bcdefghilmnoprstuvwxz", 5: "b", diff --git a/docs/html/search/variables_13.js b/docs/html/search/variables_13.js index 6331f76..a8b09fb 100644 --- a/docs/html/search/variables_13.js +++ b/docs/html/search/variables_13.js @@ -1,4 +1,4 @@ var searchData= [ - ['x',['x',['../structbwRTreeNode__t.html#a5d4127fac68dc3dc91c1283f8102e100',1,'bwRTreeNode_t::x()'],['../structURL__t.html#ad063b18d976f45276ed3a014ac339e5f',1,'URL_t::x()']]] + ['x',['x',['../structURL__t.html#a63b0ae93630e20a126186d856797e78a',1,'URL_t::x()'],['../structbwRTreeNode__t.html#aa55ddacdf7ed257a71bd7560e9a07157',1,'bwRTreeNode_t::x()']]] ]; diff --git a/docs/html/search/variables_5.js b/docs/html/search/variables_5.js index 74237ec..4bba4fb 100644 --- a/docs/html/search/variables_5.js +++ b/docs/html/search/variables_5.js @@ -1,4 +1,4 @@ var searchData= [ - ['global_5fdefaultbuffersize',['GLOBAL_DEFAULTBUFFERSIZE',['../io_8h.html#a2f4038b5ef0a0e7dc45a20fc0bb83925',1,'io.c']]] + ['global_5fdefaultbuffersize',['GLOBAL_DEFAULTBUFFERSIZE',['../BigWigIO_8h.html#a2f4038b5ef0a0e7dc45a20fc0bb83925',1,'io.c']]] ]; diff --git a/docs/html/search/variables_7.js b/docs/html/search/variables_7.js index 711f3bf..984056a 100644 --- a/docs/html/search/variables_7.js +++ b/docs/html/search/variables_7.js @@ -4,6 +4,7 @@ var searchData= ['idxsize',['idxSize',['../structbwRTree__t.html#a119af9ef30b2923ccb7e4ae8a6d3b501',1,'bwRTree_t']]], ['indexoffset',['indexOffset',['../structbwZoomHdr__t.html#a8d7a1c8741ecbecde64f462267f0f116',1,'bwZoomHdr_t::indexOffset()'],['../structbigWigHdr__t.html#a933b1bc6988c30fca67bb392a04b7357',1,'bigWigHdr_t::indexOffset()']]], ['intervals',['intervals',['../structbwOverlapIterator__t.html#a5e1e6474d26a3e5900e6b91603e0664a',1,'bwOverlapIterator_t']]], + ['iscompressed',['isCompressed',['../structURL__t.html#ab1fe842d66e490e6851ec2fe4e5276e6',1,'URL_t']]], ['isleaf',['isLeaf',['../structbwRTreeNode__t.html#aa2dac9df29c6b9eaaf4000e70f3e1540',1,'bwRTreeNode_t']]], ['iswrite',['isWrite',['../structbigWigFile__t.html#a76e415b9a2933c94927c4e137057bd4a',1,'bigWigFile_t']]] ]; diff --git a/docs/html/search/variables_f.js b/docs/html/search/variables_f.js index 47c1b7b..a247401 100644 --- a/docs/html/search/variables_f.js +++ b/docs/html/search/variables_f.js @@ -1,5 +1,5 @@ var searchData= [ ['tid',['tid',['../structbwWriteBuffer__t.html#a1e80409d671ddba8f507c5b7a388d27c',1,'bwWriteBuffer_t::tid()'],['../structbwOverlapIterator__t.html#aaa10d193fe93d568d8caeabf33f96521',1,'bwOverlapIterator_t::tid()'],['../structbwDataHeader__t.html#a44b09f0b98af0b93ec4348357ad51d98',1,'bwDataHeader_t::tid()']]], - ['type',['type',['../structbigWigFile__t.html#a8b025cec8945b0ad1aef06113f17c463',1,'bigWigFile_t::type()'],['../structbwDataHeader__t.html#a77294dce47a8154444baf1a1a1321af4',1,'bwDataHeader_t::type()'],['../structURL__t.html#a431adb9c33b3d8d43575799f6fdcd497',1,'URL_t::type()']]] + ['type',['type',['../structbigWigFile__t.html#a8b025cec8945b0ad1aef06113f17c463',1,'bigWigFile_t::type()'],['../structURL__t.html#a431adb9c33b3d8d43575799f6fdcd497',1,'URL_t::type()'],['../structbwDataHeader__t.html#a77294dce47a8154444baf1a1a1321af4',1,'bwDataHeader_t::type()']]] ]; diff --git a/docs/html/structURL__t.html b/docs/html/structURL__t.html index 83f68b5..0af1852 100644 --- a/docs/html/structURL__t.html +++ b/docs/html/structURL__t.html @@ -92,17 +92,17 @@

                          This structure holds the file pointers and buffers needed for raw access to local and remote files. More...

                          -

                          #include <io.h>

                          +

                          #include <BigWigIO.h>

                          - - - - - - - + + + + + + + @@ -113,8 +113,10 @@ - + + +

                          Data Fields

                          union {
                             CURL *   curl
                           
                             FILE *   fp
                           
                          x
                           
                          union {
                             CURL *   curl
                           
                             FILE *   fp
                           
                          x
                           
                          void * memBuf
                           
                          size_t filePos
                           
                          size_t bufLen
                           
                          enum bigWigFile_type_enum type
                          enum bigWigFile_type_enum type
                           
                          int isCompressed
                           
                          char * fname
                           
                          @@ -210,6 +212,19 @@

                          The FILE * file pointer for local files.

                          +
                          + + +
                          +
                          + + + + +
                          int URL_t::isCompressed
                          +
                          +

                          1 if the file is compressed, otherwise 0

                          +
                          @@ -230,7 +245,7 @@
                          - +
                          enum bigWigFile_type_enum URL_t::typeenum bigWigFile_type_enum URL_t::type
                          @@ -238,7 +253,7 @@
                          - +
                          @@ -252,12 +267,12 @@
                          The documentation for this struct was generated from the following file: diff --git a/docs/html/structbbOverlappingEntries__t.html b/docs/html/structbbOverlappingEntries__t.html index 1d76b1e..0f06051 100644 --- a/docs/html/structbbOverlappingEntries__t.html +++ b/docs/html/structbbOverlappingEntries__t.html @@ -181,7 +181,7 @@ diff --git a/docs/html/structbigWigFile__t.html b/docs/html/structbigWigFile__t.html index c28341d..f9bb381 100644 --- a/docs/html/structbigWigFile__t.html +++ b/docs/html/structbigWigFile__t.html @@ -211,7 +211,7 @@ diff --git a/docs/html/structbigWigHdr__t.html b/docs/html/structbigWigHdr__t.html index 9c0fe79..037c238 100644 --- a/docs/html/structbigWigHdr__t.html +++ b/docs/html/structbigWigHdr__t.html @@ -362,7 +362,7 @@ diff --git a/docs/html/structbwDataHeader__t.html b/docs/html/structbwDataHeader__t.html index 7a579ad..eefc091 100644 --- a/docs/html/structbwDataHeader__t.html +++ b/docs/html/structbwDataHeader__t.html @@ -212,7 +212,7 @@ diff --git a/docs/html/structbwOverlapBlock__t.html b/docs/html/structbwOverlapBlock__t.html index 91233c4..6735df9 100644 --- a/docs/html/structbwOverlapBlock__t.html +++ b/docs/html/structbwOverlapBlock__t.html @@ -151,7 +151,7 @@ diff --git a/docs/html/structbwOverlapIterator__t.html b/docs/html/structbwOverlapIterator__t.html index 6259ede..ca2bd5b 100644 --- a/docs/html/structbwOverlapIterator__t.html +++ b/docs/html/structbwOverlapIterator__t.html @@ -271,7 +271,7 @@ diff --git a/docs/html/structbwOverlappingIntervals__t.html b/docs/html/structbwOverlappingIntervals__t.html index 378393b..3648771 100644 --- a/docs/html/structbwOverlappingIntervals__t.html +++ b/docs/html/structbwOverlappingIntervals__t.html @@ -181,7 +181,7 @@ diff --git a/docs/html/structbwRTreeNode__t.html b/docs/html/structbwRTreeNode__t.html index b3ce1bd..19d0eff 100644 --- a/docs/html/structbwRTreeNode__t.html +++ b/docs/html/structbwRTreeNode__t.html @@ -110,13 +110,13 @@ - - - - - - - + + + + + + +
                           
                          uint64_t * dataOffset
                           
                          union {
                             uint64_t *   size
                           
                             struct bwRTreeNode_t **   child
                           
                          x
                           
                          union {
                             uint64_t *   size
                           
                             struct bwRTreeNode_t **   child
                           
                          x
                           

                          Detailed Description

                          A node within an R-tree holding the index for data.

                          @@ -240,7 +240,7 @@
                          - +
                          @@ -259,7 +259,7 @@ diff --git a/docs/html/structbwRTree__t.html b/docs/html/structbwRTree__t.html index 665070d..567df3c 100644 --- a/docs/html/structbwRTree__t.html +++ b/docs/html/structbwRTree__t.html @@ -253,7 +253,7 @@ diff --git a/docs/html/structbwWriteBuffer__t.html b/docs/html/structbwWriteBuffer__t.html index 61a5f51..9d109fa 100644 --- a/docs/html/structbwWriteBuffer__t.html +++ b/docs/html/structbwWriteBuffer__t.html @@ -391,7 +391,7 @@ diff --git a/docs/html/structbwZoomHdr__t.html b/docs/html/structbwZoomHdr__t.html index 2135bf0..eaa823b 100644 --- a/docs/html/structbwZoomHdr__t.html +++ b/docs/html/structbwZoomHdr__t.html @@ -167,7 +167,7 @@ diff --git a/docs/html/structchromList__t.html b/docs/html/structchromList__t.html index c63e6e5..91ed681 100644 --- a/docs/html/structchromList__t.html +++ b/docs/html/structchromList__t.html @@ -151,7 +151,7 @@ diff --git a/io.c b/io.c index 2a12b2b..fa2383e 100644 --- a/io.c +++ b/io.c @@ -5,7 +5,7 @@ #include #include #include -#include "io.h" +#include "BigWigIO.h" #include #include From 3a2cc6702dbd22dee51ebce1dc48b4033c4ef2e9 Mon Sep 17 00:00:00 2001 From: dpryan79 Date: Mon, 24 Jul 2017 09:41:10 +0200 Subject: [PATCH 2/2] BigWigIO.h -> bigWigIO.h for consistency --- bigWig.h | 2 +- BigWigIO.h => bigWigIO.h | 2 +- docs/html/annotated.html | 41 ++- docs/html/bigWigIO_8h.html | 324 ++++++++++++++++++ docs/html/bigWigIO_8h_source.html | 154 +++++++++ docs/html/bigWig_8h.html | 152 ++++---- docs/html/bigWig_8h_source.html | 249 +++++++++++++- docs/html/bwCommon_8h.html | 31 +- docs/html/bwCommon_8h_source.html | 36 +- docs/html/bwValues_8h.html | 25 +- docs/html/bwValues_8h_source.html | 64 +++- docs/html/classes.html | 17 +- docs/html/doxygen.css | 123 +------ docs/html/dynsections.js | 54 +-- docs/html/files.html | 23 +- docs/html/functions.html | 15 +- docs/html/functions_vars.html | 15 +- docs/html/globals.html | 27 +- docs/html/globals_defs.html | 15 +- docs/html/globals_enum.html | 17 +- docs/html/globals_func.html | 23 +- docs/html/globals_type.html | 15 +- docs/html/globals_vars.html | 17 +- docs/html/index.html | 21 +- docs/html/jquery.js | 61 +--- docs/html/md_README.html | 38 +- docs/html/pages.html | 17 +- docs/html/search/all_0.html | 2 +- docs/html/search/all_0.js | 4 +- docs/html/search/all_1.html | 2 +- docs/html/search/all_10.html | 2 +- docs/html/search/all_10.js | 8 +- docs/html/search/all_11.html | 2 +- docs/html/search/all_12.html | 2 +- docs/html/search/all_13.html | 2 +- docs/html/search/all_14.html | 2 +- docs/html/search/all_2.html | 2 +- docs/html/search/all_3.html | 2 +- docs/html/search/all_4.html | 2 +- docs/html/search/all_5.html | 2 +- docs/html/search/all_5.js | 2 +- docs/html/search/all_6.html | 2 +- docs/html/search/all_7.html | 2 +- docs/html/search/all_8.html | 2 +- docs/html/search/all_9.html | 2 +- docs/html/search/all_a.html | 2 +- docs/html/search/all_b.html | 2 +- docs/html/search/all_c.html | 2 +- docs/html/search/all_d.html | 2 +- docs/html/search/all_e.html | 2 +- docs/html/search/all_f.html | 2 +- docs/html/search/classes_0.html | 2 +- docs/html/search/classes_1.html | 2 +- docs/html/search/classes_2.html | 2 +- docs/html/search/defines_0.html | 2 +- docs/html/search/defines_1.html | 2 +- docs/html/search/defines_2.html | 2 +- docs/html/search/defines_3.html | 2 +- docs/html/search/defines_4.html | 2 +- docs/html/search/enums_0.html | 2 +- docs/html/search/enums_0.js | 2 +- docs/html/search/files_0.html | 2 +- docs/html/search/files_0.js | 2 +- docs/html/search/functions_0.html | 2 +- docs/html/search/functions_1.html | 2 +- docs/html/search/functions_1.js | 8 +- docs/html/search/pages_0.html | 2 +- docs/html/search/pages_1.html | 2 +- docs/html/search/search.js | 98 +++--- docs/html/search/typedefs_0.html | 2 +- docs/html/search/variables_0.html | 2 +- docs/html/search/variables_1.html | 2 +- docs/html/search/variables_10.html | 2 +- docs/html/search/variables_11.html | 2 +- docs/html/search/variables_12.html | 2 +- docs/html/search/variables_13.html | 2 +- docs/html/search/variables_14.html | 2 +- docs/html/search/variables_2.html | 2 +- docs/html/search/variables_3.html | 2 +- docs/html/search/variables_4.html | 2 +- docs/html/search/variables_5.html | 2 +- docs/html/search/variables_5.js | 2 +- docs/html/search/variables_6.html | 2 +- docs/html/search/variables_7.html | 2 +- docs/html/search/variables_8.html | 2 +- docs/html/search/variables_9.html | 2 +- docs/html/search/variables_a.html | 2 +- docs/html/search/variables_b.html | 2 +- docs/html/search/variables_c.html | 2 +- docs/html/search/variables_d.html | 2 +- docs/html/search/variables_e.html | 2 +- docs/html/search/variables_f.html | 2 +- docs/html/structURL__t.html | 23 +- docs/html/structbbOverlappingEntries__t.html | 15 +- docs/html/structbigWigFile__t.html | 15 +- docs/html/structbigWigHdr__t.html | 15 +- docs/html/structbwDataHeader__t.html | 15 +- docs/html/structbwOverlapBlock__t.html | 15 +- docs/html/structbwOverlapIterator__t.html | 15 +- .../html/structbwOverlappingIntervals__t.html | 15 +- docs/html/structbwRTreeNode__t.html | 15 +- docs/html/structbwRTree__t.html | 15 +- docs/html/structbwWriteBuffer__t.html | 15 +- docs/html/structbwZoomHdr__t.html | 15 +- docs/html/structchromList__t.html | 15 +- io.c | 2 +- 106 files changed, 1320 insertions(+), 703 deletions(-) rename BigWigIO.h => bigWigIO.h (99%) create mode 100644 docs/html/bigWigIO_8h.html create mode 100644 docs/html/bigWigIO_8h_source.html diff --git a/bigWig.h b/bigWig.h index 24e7f16..a082856 100644 --- a/bigWig.h +++ b/bigWig.h @@ -1,4 +1,4 @@ -#include "BigWigIO.h" +#include "bigWigIO.h" #include "bwValues.h" #include #include diff --git a/BigWigIO.h b/bigWigIO.h similarity index 99% rename from BigWigIO.h rename to bigWigIO.h index 77ba614..3e7889e 100644 --- a/BigWigIO.h +++ b/bigWigIO.h @@ -7,7 +7,7 @@ typedef void CURL; #define CURLE_OK 0 #define CURLE_FAILED_INIT 1 #endif -/*! \file BigWigIO.h +/*! \file bigWigIO.h * These are (typically internal) IO functions, so there's generally no need for you to directly use them! */ diff --git a/docs/html/annotated.html b/docs/html/annotated.html index e9b5983..d0ae27b 100644 --- a/docs/html/annotated.html +++ b/docs/html/annotated.html @@ -3,16 +3,15 @@ - + libBigWig: Data Structures - @@ -22,7 +21,7 @@
                          - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -72,7 +71,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> -
                          + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -88,27 +87,27 @@
                          Here are the data structures with brief descriptions:
                          - - - - - - - - - - - - - + + + + + + + + + + + + +
                           CbbOverlappingEntries_tHolds interval:str associations
                           CbigWigFile_tA structure that holds everything needed to access a bigWig file
                           CbigWigHdr_tThe header section of a bigWig file
                           CbwDataHeader_tThe header section of a given data block
                           CbwOverlapBlock_tThis structure holds the data blocks that overlap a given interval
                           CbwOverlapIterator_tA structure to hold iterations One of intervals and entries should be used to access records from bigWig or bigBed files, respectively
                           CbwOverlappingIntervals_tHolds interval:value associations
                           CbwRTree_t
                           CbwRTreeNode_tA node within an R-tree holding the index for data
                           CbwWriteBuffer_tThis is only needed for writing bigWig files (and won't be created otherwise) This should be removed from bigWig.h
                           CbwZoomHdr_tBigWig files have multiple "zoom" levels, each of which has its own header. This hold those headers
                           CchromList_tHolds the chromosomes and their lengths
                           CURL_tThis structure holds the file pointers and buffers needed for raw access to local and remote files
                          oCbbOverlappingEntries_tHolds interval:str associations
                          oCbigWigFile_tA structure that holds everything needed to access a bigWig file
                          oCbigWigHdr_tThe header section of a bigWig file
                          oCbwDataHeader_tThe header section of a given data block
                          oCbwOverlapBlock_tThis structure holds the data blocks that overlap a given interval
                          oCbwOverlapIterator_tA structure to hold iterations One of intervals and entries should be used to access records from bigWig or bigBed files, respectively
                          oCbwOverlappingIntervals_tHolds interval:value associations
                          oCbwRTree_t
                          oCbwRTreeNode_tA node within an R-tree holding the index for data
                          oCbwWriteBuffer_tThis is only needed for writing bigWig files (and won't be created otherwise) This should be removed from bigWig.h
                          oCbwZoomHdr_tBigWig files have multiple "zoom" levels, each of which has its own header. This hold those headers
                          oCchromList_tHolds the chromosomes and their lengths
                          \CURL_tThis structure holds the file pointers and buffers needed for raw access to local and remote files
                          diff --git a/docs/html/bigWigIO_8h.html b/docs/html/bigWigIO_8h.html new file mode 100644 index 0000000..e702d44 --- /dev/null +++ b/docs/html/bigWigIO_8h.html @@ -0,0 +1,324 @@ + + + + + + +libBigWig: bigWigIO.h File Reference + + + + + + + + + +
                          +
                          + + + + + + +
                          +
                          libBigWig +
                          +
                          +
                          + + + + + + + + + +
                          + +
                          + +
                          +
                          + +
                          +
                          bigWigIO.h File Reference
                          +
                          +
                          +
                          #include <curl/curl.h>
                          +
                          +

                          Go to the source code of this file.

                          + + + + + +

                          +Data Structures

                          struct  URL_t
                           This structure holds the file pointers and buffers needed for raw access to local and remote files. More...
                           
                          + + + +

                          +Enumerations

                          enum  bigWigFile_type_enum { BWG_FILE = 0, +BWG_HTTP = 1, +BWG_HTTPS = 2, +BWG_FTP = 3 + }
                           
                          + + + + + + + + + + + + + +

                          +Functions

                          size_t urlRead (URL_t *URL, void *buf, size_t bufSize)
                           Reads data into the given buffer. More...
                           
                          CURLcode urlSeek (URL_t *URL, size_t pos)
                           Seeks to a given position in a local or remote file. More...
                           
                          URL_turlOpen (char *fname, CURLcode(*callBack)(CURL *), const char *mode)
                           Open a local or remote file. More...
                           
                          void urlClose (URL_t *URL)
                           Close a local/remote file. More...
                           
                          + + + +

                          +Variables

                          size_t GLOBAL_DEFAULTBUFFERSIZE
                           
                          +

                          Detailed Description

                          +

                          These are (typically internal) IO functions, so there's generally no need for you to directly use them!

                          +

                          Enumeration Type Documentation

                          + +
                          +
                          + + + + +
                          enum bigWigFile_type_enum
                          +
                          +

                          The enumerated values that indicate the connection type used to access a file.

                          + +
                          +
                          +

                          Function Documentation

                          + +
                          +
                          + + + + + + + + +
                          void urlClose (URL_tURL)
                          +
                          + +

                          Close a local/remote file.

                          +

                          This will perform the cleanup required on a URL_t*, releasing memory as needed.

                          +
                          Parameters
                          + + +
                          URLA URL_t * pointing to a valid opened file or remote URL.
                          +
                          +
                          +
                          Warning
                          URL will no longer point to a valid location in memory!
                          + +
                          +
                          + +
                          +
                          + + + + + + + + + + + + + + + + + + + + + + + + +
                          URL_t* urlOpen (char * fname,
                          CURLcode(*)(CURL *) callBack,
                          const char * mode 
                          )
                          +
                          + +

                          Open a local or remote file.

                          +

                          Opens a local or remote file. Currently, http, https, and ftp are the only supported protocols and the URL must then begin with "http://", "https://", or "ftp://" as appropriate.

                          +

                          For remote files, an internal buffer is used to hold file contents, to avoid downloading entire files before starting. The size of this buffer and various variable related to connection timeout are set with bwInit().

                          +

                          Note that you must run urlClose() on this when finished. However, you would typically just use bwOpen() rather than directly calling this function.

                          +
                          Parameters
                          + + + + +
                          fnameThe file name or URL to open.
                          callBackAn optional user-supplied function. This is applied to remote connections so users can specify things like proxy and password information.
                          mode"r", "w" or NULL. If and only if the mode contains the character "w" will the file be opened for writing.
                          +
                          +
                          +
                          Returns
                          A URL_t * or NULL on error.
                          + +
                          +
                          + +
                          +
                          + + + + + + + + + + + + + + + + + + + + + + + + +
                          size_t urlRead (URL_tURL,
                          void * buf,
                          size_t bufSize 
                          )
                          +
                          + +

                          Reads data into the given buffer.

                          +

                          This function will store bufSize data into buf for both local and remote files. For remote files an internal buffer is used to store a (typically larger) segment of the remote file.

                          +
                          Parameters
                          + + + + +
                          URLA URL_t * pointing to a valid opened file or remote URL.
                          bufThe buffer in memory that you would like filled. It must be able to hold bufSize bytes!
                          bufSizeThe number of bytes to transfer to buf.
                          +
                          +
                          +
                          Returns
                          Returns the number of bytes stored in buf, which should be bufSize on success and something else on error.
                          +
                          Warning
                          Note that on error, URL for remote files is left in an unusable state. You can get around this by running urlSeek() to a position outside of the range held by the internal buffer.
                          + +
                          +
                          + +
                          +
                          + + + + + + + + + + + + + + + + + + +
                          CURLcode urlSeek (URL_tURL,
                          size_t pos 
                          )
                          +
                          + +

                          Seeks to a given position in a local or remote file.

                          +

                          For local files, this will set the file position indicator for the file pointer to the desired position. For remote files, it sets the position to start downloading data for the next urlRead(). Note that for remote files that running urlSeek() with a pos within the current buffer will simply modify the internal offset.

                          +
                          Parameters
                          + + + +
                          URLA URL_t * pointing to a valid opened file or remote URL.
                          posThe position to seek to.
                          +
                          +
                          +
                          Returns
                          CURLE_OK on success and a different CURLE_XXX on error. For local files, the error return value is always CURLE_FAILED_INIT
                          + +
                          +
                          +

                          Variable Documentation

                          + +
                          +
                          + + + + +
                          size_t GLOBAL_DEFAULTBUFFERSIZE
                          +
                          +

                          The size of the buffer used for remote files.

                          + +
                          +
                          +
                          + + + + diff --git a/docs/html/bigWigIO_8h_source.html b/docs/html/bigWigIO_8h_source.html new file mode 100644 index 0000000..b0b54c4 --- /dev/null +++ b/docs/html/bigWigIO_8h_source.html @@ -0,0 +1,154 @@ + + + + + + +libBigWig: bigWigIO.h Source File + + + + + + + + + +
                          +
                          + + + + + + +
                          +
                          libBigWig +
                          +
                          +
                          + + + + + +
                          + + + + +
                          + +
                          + +
                          +
                          +
                          bigWigIO.h
                          +
                          +
                          +Go to the documentation of this file.
                          1 #ifndef NOCURL
                          +
                          2 #include <curl/curl.h>
                          +
                          3 #else
                          +
                          4 #include <stdio.h>
                          +
                          5 typedef int CURLcode;
                          +
                          6 typedef void CURL;
                          +
                          7 #define CURLE_OK 0
                          +
                          8 #define CURLE_FAILED_INIT 1
                          +
                          9 #endif
                          +
                          10 
                          +
                          17 extern size_t GLOBAL_DEFAULTBUFFERSIZE;
                          +
                          18 
                          + +
                          23  BWG_FILE = 0,
                          +
                          24  BWG_HTTP = 1,
                          +
                          25  BWG_HTTPS = 2,
                          +
                          26  BWG_FTP = 3
                          +
                          27 };
                          +
                          28 
                          +
                          32 typedef struct {
                          +
                          33  union {
                          +
                          34 #ifndef NOCURL
                          +
                          35  CURL *curl;
                          +
                          36 #endif
                          +
                          37  FILE *fp;
                          +
                          38  } x;
                          +
                          39  void *memBuf;
                          +
                          40  size_t filePos;
                          +
                          41  size_t bufPos;
                          +
                          42  size_t bufSize;
                          +
                          43  size_t bufLen;
                          + + +
                          46  char *fname;
                          +
                          47 } URL_t;
                          +
                          48 
                          +
                          62 size_t urlRead(URL_t *URL, void *buf, size_t bufSize);
                          +
                          63 
                          +
                          74 CURLcode urlSeek(URL_t *URL, size_t pos);
                          +
                          75 
                          +
                          91 URL_t *urlOpen(char *fname, CURLcode (*callBack)(CURL*), const char* mode);
                          +
                          92 
                          +
                          102 void urlClose(URL_t *URL);
                          +
                          This structure holds the file pointers and buffers needed for raw access to local and remote files...
                          Definition: bigWigIO.h:32
                          +
                          bigWigFile_type_enum
                          Definition: bigWigIO.h:22
                          +
                          size_t urlRead(URL_t *URL, void *buf, size_t bufSize)
                          Reads data into the given buffer.
                          Definition: io.c:89
                          +
                          FILE * fp
                          Definition: bigWigIO.h:37
                          +
                          size_t bufPos
                          Definition: bigWigIO.h:41
                          +
                          size_t bufSize
                          Definition: bigWigIO.h:42
                          +
                          size_t GLOBAL_DEFAULTBUFFERSIZE
                          Definition: io.c:12
                          +
                          size_t filePos
                          Definition: bigWigIO.h:40
                          +
                          size_t bufLen
                          Definition: bigWigIO.h:43
                          +
                          URL_t * urlOpen(char *fname, CURLcode(*callBack)(CURL *), const char *mode)
                          Open a local or remote file.
                          Definition: io.c:159
                          +
                          CURLcode urlSeek(URL_t *URL, size_t pos)
                          Seeks to a given position in a local or remote file.
                          Definition: io.c:120
                          +
                          char * fname
                          Definition: bigWigIO.h:46
                          +
                          void * memBuf
                          Definition: bigWigIO.h:39
                          +
                          CURL * curl
                          Definition: bigWigIO.h:35
                          +
                          int isCompressed
                          Definition: bigWigIO.h:45
                          +
                          void urlClose(URL_t *URL)
                          Close a local/remote file.
                          Definition: io.c:275
                          +
                          + + + + diff --git a/docs/html/bigWig_8h.html b/docs/html/bigWig_8h.html index 891f34c..599180f 100644 --- a/docs/html/bigWig_8h.html +++ b/docs/html/bigWig_8h.html @@ -3,16 +3,15 @@ - + libBigWig: bigWig.h File Reference - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -70,7 +69,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -90,38 +89,38 @@
                          bigWig.h File Reference
                          -
                          #include "BigWigIO.h"
                          -#include "bwValues.h"
                          -#include <inttypes.h>
                          -#include <zlib.h>
                          +
                          #include "bigWigIO.h"
                          +#include "bwValues.h"
                          +#include <inttypes.h>
                          +#include <zlib.h>

                          Go to the source code of this file.

                          - + - + - + - + - + - + - + - +

                          Data Structures

                          struct  bwZoomHdr_t
                           BigWig files have multiple "zoom" levels, each of which has its own header. This hold those headers. More...
                           BigWig files have multiple "zoom" levels, each of which has its own header. This hold those headers. More...
                           
                          struct  bigWigHdr_t
                           The header section of a bigWig file. More...
                           The header section of a bigWig file. More...
                           
                          struct  chromList_t
                           Holds the chromosomes and their lengths. More...
                           Holds the chromosomes and their lengths. More...
                           
                          struct  bwWriteBuffer_t
                           This is only needed for writing bigWig files (and won't be created otherwise) This should be removed from bigWig.h. More...
                           This is only needed for writing bigWig files (and won't be created otherwise) This should be removed from bigWig.h. More...
                           
                          struct  bigWigFile_t
                           A structure that holds everything needed to access a bigWig file. More...
                           A structure that holds everything needed to access a bigWig file. More...
                           
                          struct  bwOverlappingIntervals_t
                           Holds interval:value associations. More...
                           Holds interval:value associations. More...
                           
                          struct  bbOverlappingEntries_t
                           Holds interval:str associations. More...
                           Holds interval:str associations. More...
                           
                          struct  bwOverlapIterator_t
                           A structure to hold iterations One of intervals and entries should be used to access records from bigWig or bigBed files, respectively. More...
                           A structure to hold iterations One of intervals and entries should be used to access records from bigWig or bigBed files, respectively. More...
                           

                          @@ -145,110 +144,110 @@

                          -

                          Enumerations

                          enum  bwStatsType {
                          +
                          enum  bwStatsType {
                            doesNotExist = -1, mean = 0, average = 0, stdev = 1, -
                          +
                            dev = 1, max = 2, min = 3, cov = 4, -
                          +
                            coverage = 4 -
                          +
                          }
                           
                          - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - +

                          Functions

                          int bwInit (size_t bufSize)
                           Initializes curl and global variables. This MUST be called before other functions (at least if you want to connect to remote files). For remote file, curl must be initialized and regions of a file read into an internal buffer. If the buffer is too small then an excessive number of connections will be made. If the buffer is too large than more data than required is fetched. 128KiB is likely sufficient for most needs. More...
                           Initializes curl and global variables. This MUST be called before other functions (at least if you want to connect to remote files). For remote file, curl must be initialized and regions of a file read into an internal buffer. If the buffer is too small then an excessive number of connections will be made. If the buffer is too large than more data than required is fetched. 128KiB is likely sufficient for most needs. More...
                           
                          void bwCleanup (void)
                           The counterpart to bwInit, this cleans up curl. More...
                           The counterpart to bwInit, this cleans up curl. More...
                           
                          int bwIsBigWig (char *fname, CURLcode(*callBack)(CURL *))
                           Determine if a file is a bigWig file. This function will quickly check either local or remote files to determine if they appear to be valid bigWig files. This can be determined by reading the first 4 bytes of the file. More...
                           Determine if a file is a bigWig file. This function will quickly check either local or remote files to determine if they appear to be valid bigWig files. This can be determined by reading the first 4 bytes of the file. More...
                           
                          int bbIsBigBed (char *fname, CURLcode(*callBack)(CURL *))
                           Determine is a file is a bigBed file. This function will quickly check either local or remote files to determine if they appear to be valid bigWig files. This can be determined by reading the first 4 bytes of the file. More...
                           Determine is a file is a bigBed file. This function will quickly check either local or remote files to determine if they appear to be valid bigWig files. This can be determined by reading the first 4 bytes of the file. More...
                           
                          bigWigFile_tbwOpen (char *fname, CURLcode(*callBack)(CURL *), const char *mode)
                           Opens a local or remote bigWig file. This will open a local or remote bigWig file. Writing of local bigWig files is also supported. More...
                           Opens a local or remote bigWig file. This will open a local or remote bigWig file. Writing of local bigWig files is also supported. More...
                           
                          bigWigFile_tbbOpen (char *fname, CURLcode(*callBack)(CURL *))
                           Opens a local or remote bigBed file. This will open a local or remote bigBed file. Note that this file format can only be read and NOT written! More...
                           Opens a local or remote bigBed file. This will open a local or remote bigBed file. Note that this file format can only be read and NOT written! More...
                           
                          char * bbGetSQL (bigWigFile_t *fp)
                           Returns a string containing the SQL entry (or NULL). The "auto SQL" field contains the names and value types of the entries in each bigBed entry. If you need to parse a particular value out of each entry, then you'll need to first parse this. More...
                           Returns a string containing the SQL entry (or NULL). The "auto SQL" field contains the names and value types of the entries in each bigBed entry. If you need to parse a particular value out of each entry, then you'll need to first parse this. More...
                           
                          void bwClose (bigWigFile_t *fp)
                           Closes a bigWigFile_t and frees up allocated memory This closes both bigWig and bigBed files. More...
                           Closes a bigWigFile_t and frees up allocated memory This closes both bigWig and bigBed files. More...
                           
                          uint32_t bwGetTid (bigWigFile_t *fp, char *chrom)
                           Converts between chromosome name and ID. More...
                           Converts between chromosome name and ID. More...
                           
                          void bwDestroyOverlappingIntervals (bwOverlappingIntervals_t *o)
                           Frees space allocated by bwGetOverlappingIntervals More...
                           Frees space allocated by bwGetOverlappingIntervals More...
                           
                          void bbDestroyOverlappingEntries (bbOverlappingEntries_t *o)
                           Frees space allocated by bbGetOverlappingEntries More...
                           Frees space allocated by bbGetOverlappingEntries More...
                           
                          bwOverlappingIntervals_tbwGetOverlappingIntervals (bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end)
                           Return bigWig entries overlapping an interval. Find all bigWig entries overlapping a range and returns them, including their associated values. More...
                           Return bigWig entries overlapping an interval. Find all bigWig entries overlapping a range and returns them, including their associated values. More...
                           
                          bbOverlappingEntries_tbbGetOverlappingEntries (bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int withString)
                           Return bigBed entries overlapping an interval. Find all bigBed entries overlapping a range and returns them. More...
                           Return bigBed entries overlapping an interval. Find all bigBed entries overlapping a range and returns them. More...
                           
                          bwOverlapIterator_tbwOverlappingIntervalsIterator (bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t blocksPerIteration)
                           Creates an iterator over intervals in a bigWig file Iterators can be traversed with bwIteratorNext() and destroyed with bwIteratorDestroy(). Intervals are in the intervals member and data can be used to determine when to end iteration. More...
                           Creates an iterator over intervals in a bigWig file Iterators can be traversed with bwIteratorNext() and destroyed with bwIteratorDestroy(). Intervals are in the intervals member and data can be used to determine when to end iteration. More...
                           
                          bwOverlapIterator_tbbOverlappingEntriesIterator (bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int withString, uint32_t blocksPerIteration)
                           Creates an iterator over entries in a bigBed file Iterators can be traversed with bwIteratorNext() and destroyed with bwIteratorDestroy(). Entries are in the entries member and data can be used to determine when to end iteration. More...
                           Creates an iterator over entries in a bigBed file Iterators can be traversed with bwIteratorNext() and destroyed with bwIteratorDestroy(). Entries are in the entries member and data can be used to determine when to end iteration. More...
                           
                          bwOverlapIterator_tbwIteratorNext (bwOverlapIterator_t *iter)
                           Traverses to the entries/intervals in the next group of blocks. More...
                           Traverses to the entries/intervals in the next group of blocks. More...
                           
                          void bwIteratorDestroy (bwOverlapIterator_t *iter)
                           Destroys a bwOverlapIterator_t. More...
                           Destroys a bwOverlapIterator_t. More...
                           
                          bwOverlappingIntervals_tbwGetValues (bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int includeNA)
                           Return all per-base bigWig values in a given interval. Given an interval (e.g., chr1:0-100), return the value at each position in a bigWig file. Positions without associated values are suppressed by default, but may be returned if includeNA is not 0. More...
                           Return all per-base bigWig values in a given interval. Given an interval (e.g., chr1:0-100), return the value at each position in a bigWig file. Positions without associated values are suppressed by default, but may be returned if includeNA is not 0. More...
                           
                          double * bwStats (bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t nBins, enum bwStatsType type)
                           Determines per-interval bigWig statistics Can determine mean/min/max/coverage/standard deviation of values in one or more intervals in a bigWig file. You can optionally give it an interval and ask for values from X number of sub-intervals. More...
                           Determines per-interval bigWig statistics Can determine mean/min/max/coverage/standard deviation of values in one or more intervals in a bigWig file. You can optionally give it an interval and ask for values from X number of sub-intervals. More...
                           
                          double * bwStatsFromFull (bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t nBins, enum bwStatsType type)
                           Determines per-interval bigWig statistics Can determine mean/min/max/coverage/standard deviation of values in one or more intervals in a bigWig file. You can optionally give it an interval and ask for values from X number of sub-intervals. The difference with bwStats is that zoom levels are never used. More...
                           Determines per-interval bigWig statistics Can determine mean/min/max/coverage/standard deviation of values in one or more intervals in a bigWig file. You can optionally give it an interval and ask for values from X number of sub-intervals. The difference with bwStats is that zoom levels are never used. More...
                           
                          int bwCreateHdr (bigWigFile_t *fp, int32_t maxZooms)
                           Create a largely empty bigWig header Every bigWig file has a header, this creates the template for one. It also takes care of space allocation in the output write buffer. More...
                           Create a largely empty bigWig header Every bigWig file has a header, this creates the template for one. It also takes care of space allocation in the output write buffer. More...
                           
                          chromList_tbwCreateChromList (char **chroms, uint32_t *lengths, int64_t n)
                           Take a list of chromosome names and lengths and return a pointer to a chromList_t This MUST be run before bwWriteHdr(). Note that the input is NOT free()d! More...
                           Take a list of chromosome names and lengths and return a pointer to a chromList_t This MUST be run before bwWriteHdr(). Note that the input is NOT free()d! More...
                           
                          int bwWriteHdr (bigWigFile_t *bw)
                           Write a the header to a bigWig file. You must have already opened the output file, created a header and a chromosome list. More...
                           Write a the header to a bigWig file. You must have already opened the output file, created a header and a chromosome list. More...
                           
                          int bwAddIntervals (bigWigFile_t *fp, char **chrom, uint32_t *start, uint32_t *end, float *values, uint32_t n)
                           Write a new block of bedGraph-like intervals to a bigWig file Adds entries of the form: chromosome start end value to the file. These will always be added in a new block, so you may have previously used a different storage type. More...
                           Write a new block of bedGraph-like intervals to a bigWig file Adds entries of the form: chromosome start end value to the file. These will always be added in a new block, so you may have previously used a different storage type. More...
                           
                          int bwAppendIntervals (bigWigFile_t *fp, uint32_t *start, uint32_t *end, float *values, uint32_t n)
                           Append bedGraph-like intervals to a previous block of bedGraph-like intervals in a bigWig file. If you have previously used bwAddIntervals() then this will append additional entries into the previous block (or start a new one if needed). More...
                           Append bedGraph-like intervals to a previous block of bedGraph-like intervals in a bigWig file. If you have previously used bwAddIntervals() then this will append additional entries into the previous block (or start a new one if needed). More...
                           
                          int bwAddIntervalSpans (bigWigFile_t *fp, char *chrom, uint32_t *start, uint32_t span, float *values, uint32_t n)
                           Add a new block of variable-step entries to a bigWig file Adds entries for the form chromosome start value to the file. Each block of such entries has an associated "span", so each value describes the region chromosome:start-(start+span) More...
                           Add a new block of variable-step entries to a bigWig file Adds entries for the form chromosome start value to the file. Each block of such entries has an associated "span", so each value describes the region chromosome:start-(start+span) More...
                           
                          int bwAppendIntervalSpans (bigWigFile_t *fp, uint32_t *start, float *values, uint32_t n)
                           Append to a previous block of variable-step entries. If you previously used bwAddIntervalSpans(), this will continue appending more values to the block(s) it created. More...
                           Append to a previous block of variable-step entries. If you previously used bwAddIntervalSpans(), this will continue appending more values to the block(s) it created. More...
                           
                          int bwAddIntervalSpanSteps (bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t span, uint32_t step, float *values, uint32_t n)
                           Add a new block of fixed-step entries to a bigWig file Adds entries for the form value to the file. Each block of such entries has an associated "span", "step", chromosome and start position. See the wiggle format for more details. More...
                           Add a new block of fixed-step entries to a bigWig file Adds entries for the form value to the file. Each block of such entries has an associated "span", "step", chromosome and start position. See the wiggle format for more details. More...
                           
                          int bwAppendIntervalSpanSteps (bigWigFile_t *fp, float *values, uint32_t n)
                           Append to a previous block of fixed-step entries. If you previously used bwAddIntervalSpanSteps(), this will continue appending more values to the block(s) it created. More...
                           Append to a previous block of fixed-step entries. If you previously used bwAddIntervalSpanSteps(), this will continue appending more values to the block(s) it created. More...
                           

                          Detailed Description

                          @@ -395,7 +394,7 @@

                          Function Documentation

                          -
                          See also
                          bbGetOverlappingEntries
                          +
                          See Also
                          bbGetOverlappingEntries
                          @@ -453,7 +452,7 @@

                          Function Documentation

                          Returns
                          NULL on error or no overlapping values, otherwise a bbOverlappingEntries_t * holding the intervals and (optionally) the associated string.
                          -
                          See also
                          bbOverlappingEntries_t
                          +
                          See Also
                          bbOverlappingEntries_t
                          bbDestroyOverlappingEntries
                          @@ -617,7 +616,7 @@

                          Function Documentation

                          Returns
                          NULL on error, otherwise a bwOverlapIterator_t pointer
                          -
                          See also
                          bbGetOverlappingEntries
                          +
                          See Also
                          bbGetOverlappingEntries
                          bwOverlapIterator_t
                          @@ -676,7 +675,8 @@

                          Function Documentation

                          Write a new block of bedGraph-like intervals to a bigWig file Adds entries of the form: chromosome start end value to the file. These will always be added in a new block, so you may have previously used a different storage type.

                          -

                          In general it's more efficient to use the bwAppend* functions, but then you MUST know that the previously written block is of the same type. In other words, you can only use bwAppendIntervals() after bwAddIntervals() or a previous bwAppendIntervals().

                          Parameters
                          +

                          In general it's more efficient to use the bwAppend* functions, but then you MUST know that the previously written block is of the same type. In other words, you can only use bwAppendIntervals() after bwAddIntervals() or a previous bwAppendIntervals().

                          +
                          Parameters
                          @@ -688,7 +688,7 @@

                          Function Documentation

                          Returns
                          0 on success and another value on error.
                          -
                          See also
                          bwAppendIntervals
                          +
                          See Also
                          bwAppendIntervals
                          @@ -741,7 +741,8 @@

                          Function Documentation

                          Add a new block of variable-step entries to a bigWig file Adds entries for the form chromosome start value to the file. Each block of such entries has an associated "span", so each value describes the region chromosome:start-(start+span)

                          -

                          This will always start a new block of values.

                          Parameters
                          +

                          This will always start a new block of values.

                          +
                          Parameters
                          fpThe output file pointer.
                          chromA list of chromosomes, of length n.
                          @@ -753,7 +754,7 @@

                          Function Documentation

                          Returns
                          0 on success and another value on error.
                          -
                          See also
                          bwAppendIntervalSpans
                          +
                          See Also
                          bwAppendIntervalSpans
                          @@ -812,7 +813,8 @@

                          Function Documentation

                          Add a new block of fixed-step entries to a bigWig file Adds entries for the form value to the file. Each block of such entries has an associated "span", "step", chromosome and start position. See the wiggle format for more details.

                          -

                          This will always start a new block of values.

                          Parameters
                          +

                          This will always start a new block of values.

                          +
                          Parameters
                          fpThe output file pointer.
                          chromA list of chromosomes, of length n.
                          @@ -825,7 +827,7 @@

                          Function Documentation

                          Returns
                          0 on success and another value on error.
                          -
                          See also
                          bwAddIntervalSpanSteps
                          +
                          See Also
                          bwAddIntervalSpanSteps
                          @@ -884,7 +886,7 @@

                          Function Documentation

                          Returns
                          0 on success and another value on error.
                          Warning
                          Do NOT use this after bwAddIntervalSpanSteps(), bwAppendIntervalSpanSteps(), bwAddIntervalSpanSteps(), or bwAppendIntervalSpanSteps().
                          -
                          See also
                          bwAddIntervals
                          +
                          See Also
                          bwAddIntervals
                          @@ -936,7 +938,7 @@

                          Function Documentation

                          Returns
                          0 on success and another value on error.
                          Warning
                          Do NOT use this after bwAddIntervals(), bwAppendIntervals(), bwAddIntervalSpanSteps() or bwAppendIntervalSpanSteps()
                          -
                          See also
                          bwAddIntervalSpans
                          +
                          See Also
                          bwAddIntervalSpans
                          @@ -981,7 +983,7 @@

                          Function Documentation

                          Returns
                          0 on success and another value on error.
                          Warning
                          Do NOT use this after bwAddIntervals(), bwAppendIntervals(), bwAddIntervalSpans() or bwAppendIntervalSpans()
                          -
                          See also
                          bwAddIntervalSpanSteps
                          +
                          See Also
                          bwAddIntervalSpanSteps
                          @@ -1000,7 +1002,7 @@

                          Function Documentation

                          The counterpart to bwInit, this cleans up curl.

                          -
                          See also
                          bwInit
                          +
                          See Also
                          bwInit
                          @@ -1128,7 +1130,7 @@

                          Function Documentation

                          fpThe output file pointer.
                          chromThe chromosome that the entries describe.
                          -
                          See also
                          bwGetOverlappingIntervals
                          +
                          See Also
                          bwGetOverlappingIntervals
                          @@ -1179,7 +1181,7 @@

                          Function Documentation

                          Returns
                          NULL on error or no overlapping values, otherwise a bwOverlappingIntervals_t * holding the values and intervals.
                          -
                          See also
                          bwOverlappingIntervals_t
                          +
                          See Also
                          bwOverlappingIntervals_t
                          bwDestroyOverlappingIntervals
                          @@ -1277,7 +1279,7 @@

                          Function Documentation

                          Returns
                          NULL on error or no overlapping values, otherwise a bwOverlappingIntervals_t * holding the values and positions.
                          -
                          See also
                          bwOverlappingIntervals_t
                          +
                          See Also
                          bwOverlappingIntervals_t
                          bwDestroyOverlappingIntervals
                          @@ -1306,7 +1308,7 @@

                          Function Documentation

                          -
                          See also
                          bwCleanup
                          +
                          See Also
                          bwCleanup
                          Returns
                          0 on success and 1 on error.
                          @@ -1393,7 +1395,7 @@

                          Function Documentation

                          Returns
                          NULL on error, otherwise a bwOverlapIterator_t pointer with the intervals or entries from the next set of blocks.
                          -
                          See also
                          bwOverlapIterator_t
                          +
                          See Also
                          bwOverlapIterator_t
                          bwIteratorDestroy
                          @@ -1496,7 +1498,7 @@

                          Function Documentation

                          Returns
                          NULL on error, otherwise a bwOverlapIterator_t pointer
                          -
                          See also
                          bwOverlapIterator_t
                          +
                          See Also
                          bwOverlapIterator_t
                          bwIteratorNext
                          @@ -1564,7 +1566,7 @@

                          Function Documentation

                          -
                          See also
                          bwStatsType
                          +
                          See Also
                          bwStatsType
                          Returns
                          A pointer to an array of double precission floating point values. Note that bigWig files only hold 32-bit values, so this is done to help prevent overflows.
                          @@ -1629,7 +1631,7 @@

                          Function Documentation

                          -
                          See also
                          bwStatsType
                          +
                          See Also
                          bwStatsType
                          Returns
                          A pointer to an array of double precission floating point values. Note that bigWig files only hold 32-bit values, so this is done to help prevent overflows.
                          @@ -1655,7 +1657,7 @@

                          Function Documentation

                          -
                          See also
                          bwCreateHdr
                          +
                          See Also
                          bwCreateHdr
                          bwCreateChromList
                          @@ -1664,9 +1666,9 @@

                          Function Documentation

                          diff --git a/docs/html/bigWig_8h_source.html b/docs/html/bigWig_8h_source.html index 42ff0f0..16ac937 100644 --- a/docs/html/bigWig_8h_source.html +++ b/docs/html/bigWig_8h_source.html @@ -3,16 +3,15 @@ - + libBigWig: bigWig.h Source File - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -71,7 +70,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -85,10 +84,234 @@
                          bigWig.h
                          -Go to the documentation of this file.
                          1 #include "BigWigIO.h"
                          2 #include "bwValues.h"
                          3 #include <inttypes.h>
                          4 #include <zlib.h>
                          5 
                          6 #ifdef __cplusplus
                          7 extern "C" {
                          8 #endif
                          9 
                          56 #define LIBBIGWIG_VERSION 0.4.0
                          57 
                          61 #ifdef NOCURL
                          62 #define LIBBIGWIG_CURL 0
                          63 typedef int CURLcode;
                          64 typedef void CURL;
                          65 #else
                          66 #define LIBBIGWIG_CURL 1
                          67 #endif
                          68 
                          72 #define BIGWIG_MAGIC 0x888FFC26
                          73 
                          76 #define BIGBED_MAGIC 0x8789F2EB
                          77 
                          80 #define CIRTREE_MAGIC 0x78ca8c91
                          81 
                          84 #define IDX_MAGIC 0x2468ace0
                          85 
                          88 #define DEFAULT_nCHILDREN 64
                          89 
                          92 #define DEFAULT_BLOCKSIZE 32768
                          93 
                          98  doesNotExist = -1,
                          99  mean = 0,
                          100  average = 0,
                          101  stdev = 1,
                          102  dev = 1,
                          103  max = 2,
                          104  min = 3,
                          105  cov = 4,
                          106  coverage = 4
                          107 };
                          108 
                          109 //Should hide this from end users
                          115 typedef struct {
                          116  uint32_t *level;
                          117  //There's 4 bytes of padding between these
                          118  uint64_t *dataOffset;
                          119  uint64_t *indexOffset;
                          121 } bwZoomHdr_t;
                          122 
                          128 typedef struct {
                          129  uint16_t version;
                          130  uint16_t nLevels;
                          131  uint64_t ctOffset;
                          132  uint64_t dataOffset;
                          133  uint64_t indexOffset;
                          134  uint16_t fieldCount;
                          135  uint16_t definedFieldCount;
                          136  uint64_t sqlOffset;
                          137  uint64_t summaryOffset;
                          138  uint32_t bufSize;
                          139  uint64_t extensionOffset;
                          141  //total Summary
                          142  uint64_t nBasesCovered;
                          143  double minVal;
                          144  double maxVal;
                          145  double sumData;
                          146  double sumSquared;
                          147 } bigWigHdr_t;
                          148 
                          149 //Should probably replace this with a hash
                          153 typedef struct {
                          154  int64_t nKeys;
                          155  char **chrom;
                          156  uint32_t *len;
                          157 } chromList_t;
                          158 
                          159 //TODO remove from bigWig.h
                          161 typedef struct bwLL bwLL;
                          162 struct bwLL {
                          163  bwRTreeNode_t *node;
                          164  struct bwLL *next;
                          165 };
                          166 typedef struct bwZoomBuffer_t bwZoomBuffer_t;
                          167 struct bwZoomBuffer_t { //each individual entry takes 32 bytes
                          168  void *p;
                          169  uint32_t l, m;
                          170  struct bwZoomBuffer_t *next;
                          171 };
                          173 
                          178 typedef struct {
                          179  uint64_t nBlocks;
                          180  uint32_t blockSize;
                          181  uint64_t nEntries;
                          182  uint64_t runningWidthSum;
                          183  uint32_t tid;
                          184  uint32_t start;
                          185  uint32_t end;
                          186  uint32_t span;
                          187  uint32_t step;
                          188  uint8_t ltype;
                          189  uint32_t l;
                          190  void *p;
                          193  bwZoomBuffer_t **firstZoomBuffer;
                          194  bwZoomBuffer_t **lastZoomBuffer;
                          195  uint64_t *nNodes;
                          196  uLongf compressPsz;
                          197  void *compressP;
                          199 
                          203 typedef struct {
                          209  int isWrite;
                          210  int type;
                          211 } bigWigFile_t;
                          212 
                          216 typedef struct {
                          217  uint32_t l;
                          218  uint32_t m;
                          219  uint32_t *start;
                          220  uint32_t *end;
                          221  float *value;
                          223 
                          227 typedef struct {
                          228  uint32_t l;
                          229  uint32_t m;
                          230  uint32_t *start;
                          231  uint32_t *end;
                          232  char **str;
                          234 
                          239 typedef struct {
                          241  uint32_t tid;
                          242  uint32_t start;
                          243  uint32_t end;
                          244  uint64_t offset;
                          247  void *blocks;
                          250  void *data;
                          252 
                          260 int bwInit(size_t bufSize);
                          261 
                          266 void bwCleanup(void);
                          267 
                          275 int bwIsBigWig(char *fname, CURLcode (*callBack)(CURL*));
                          276 
                          284 int bbIsBigBed(char *fname, CURLcode (*callBack)(CURL*));
                          285 
                          294 bigWigFile_t *bwOpen(char *fname, CURLcode (*callBack)(CURL*), const char* mode);
                          295 
                          303 bigWigFile_t *bbOpen(char *fname, CURLcode (*callBack)(CURL*));
                          304 
                          313 char *bbGetSQL(bigWigFile_t *fp);
                          314 
                          320 void bwClose(bigWigFile_t *fp);
                          321 
                          322 /*******************************************************************************
                          323 *
                          324 * The following are in bwStats.c
                          325 *
                          326 *******************************************************************************/
                          327 
                          335 uint32_t bwGetTid(bigWigFile_t *fp, char *chrom);
                          336 
                          343 
                          350 
                          363 bwOverlappingIntervals_t *bwGetOverlappingIntervals(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end);
                          364 
                          377 bbOverlappingEntries_t *bbGetOverlappingEntries(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int withString);
                          378 
                          393 bwOverlapIterator_t *bwOverlappingIntervalsIterator(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t blocksPerIteration);
                          394 
                          411 bwOverlapIterator_t *bbOverlappingEntriesIterator(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int withString, uint32_t blocksPerIteration);
                          412 
                          421 
                          427 
                          441 bwOverlappingIntervals_t *bwGetValues(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int includeNA);
                          442 
                          455 double *bwStats(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t nBins, enum bwStatsType type);
                          456 
                          469 double *bwStatsFromFull(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t nBins, enum bwStatsType type);
                          470 
                          471 //Writer functions
                          472 
                          480 int bwCreateHdr(bigWigFile_t *fp, int32_t maxZooms);
                          481 
                          490 chromList_t *bwCreateChromList(char **chroms, uint32_t *lengths, int64_t n);
                          491 
                          499 int bwWriteHdr(bigWigFile_t *bw);
                          500 
                          517 int bwAddIntervals(bigWigFile_t *fp, char **chrom, uint32_t *start, uint32_t *end, float *values, uint32_t n);
                          518 
                          531 int bwAppendIntervals(bigWigFile_t *fp, uint32_t *start, uint32_t *end, float *values, uint32_t n);
                          532 
                          549 int bwAddIntervalSpans(bigWigFile_t *fp, char *chrom, uint32_t *start, uint32_t span, float *values, uint32_t n);
                          550 
                          562 int bwAppendIntervalSpans(bigWigFile_t *fp, uint32_t *start, float *values, uint32_t n);
                          563 
                          581 int bwAddIntervalSpanSteps(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t span, uint32_t step, float *values, uint32_t n);
                          582 
                          593 int bwAppendIntervalSpanSteps(bigWigFile_t *fp, float *values, uint32_t n);
                          594 
                          595 #ifdef __cplusplus
                          596 }
                          597 #endif
                          uint64_t summaryOffset
                          Definition: bigWig.h:137
                          +Go to the documentation of this file.
                          1 #include "bigWigIO.h"
                          +
                          2 #include "bwValues.h"
                          +
                          3 #include <inttypes.h>
                          +
                          4 #include <zlib.h>
                          +
                          5 
                          +
                          6 #ifdef __cplusplus
                          +
                          7 extern "C" {
                          +
                          8 #endif
                          +
                          9 
                          +
                          56 #define LIBBIGWIG_VERSION 0.4.0
                          +
                          57 
                          +
                          61 #ifdef NOCURL
                          +
                          62 #define LIBBIGWIG_CURL 0
                          +
                          63 typedef int CURLcode;
                          +
                          64 typedef void CURL;
                          +
                          65 #else
                          +
                          66 #define LIBBIGWIG_CURL 1
                          +
                          67 #endif
                          +
                          68 
                          +
                          72 #define BIGWIG_MAGIC 0x888FFC26
                          +
                          73 
                          +
                          76 #define BIGBED_MAGIC 0x8789F2EB
                          +
                          77 
                          +
                          80 #define CIRTREE_MAGIC 0x78ca8c91
                          +
                          81 
                          +
                          84 #define IDX_MAGIC 0x2468ace0
                          +
                          85 
                          +
                          88 #define DEFAULT_nCHILDREN 64
                          +
                          89 
                          +
                          92 #define DEFAULT_BLOCKSIZE 32768
                          +
                          93 
                          + +
                          98  doesNotExist = -1,
                          +
                          99  mean = 0,
                          +
                          100  average = 0,
                          +
                          101  stdev = 1,
                          +
                          102  dev = 1,
                          +
                          103  max = 2,
                          +
                          104  min = 3,
                          +
                          105  cov = 4,
                          +
                          106  coverage = 4
                          +
                          107 };
                          +
                          108 
                          +
                          109 //Should hide this from end users
                          +
                          115 typedef struct {
                          +
                          116  uint32_t *level;
                          +
                          117  //There's 4 bytes of padding between these
                          +
                          118  uint64_t *dataOffset;
                          +
                          119  uint64_t *indexOffset;
                          + +
                          121 } bwZoomHdr_t;
                          +
                          122 
                          +
                          128 typedef struct {
                          +
                          129  uint16_t version;
                          +
                          130  uint16_t nLevels;
                          +
                          131  uint64_t ctOffset;
                          +
                          132  uint64_t dataOffset;
                          +
                          133  uint64_t indexOffset;
                          +
                          134  uint16_t fieldCount;
                          +
                          135  uint16_t definedFieldCount;
                          +
                          136  uint64_t sqlOffset;
                          +
                          137  uint64_t summaryOffset;
                          +
                          138  uint32_t bufSize;
                          +
                          139  uint64_t extensionOffset;
                          + +
                          141  //total Summary
                          +
                          142  uint64_t nBasesCovered;
                          +
                          143  double minVal;
                          +
                          144  double maxVal;
                          +
                          145  double sumData;
                          +
                          146  double sumSquared;
                          +
                          147 } bigWigHdr_t;
                          +
                          148 
                          +
                          149 //Should probably replace this with a hash
                          +
                          153 typedef struct {
                          +
                          154  int64_t nKeys;
                          +
                          155  char **chrom;
                          +
                          156  uint32_t *len;
                          +
                          157 } chromList_t;
                          +
                          158 
                          +
                          159 //TODO remove from bigWig.h
                          +
                          161 typedef struct bwLL bwLL;
                          +
                          162 struct bwLL {
                          +
                          163  bwRTreeNode_t *node;
                          +
                          164  struct bwLL *next;
                          +
                          165 };
                          +
                          166 typedef struct bwZoomBuffer_t bwZoomBuffer_t;
                          +
                          167 struct bwZoomBuffer_t { //each individual entry takes 32 bytes
                          +
                          168  void *p;
                          +
                          169  uint32_t l, m;
                          +
                          170  struct bwZoomBuffer_t *next;
                          +
                          171 };
                          +
                          173 
                          +
                          178 typedef struct {
                          +
                          179  uint64_t nBlocks;
                          +
                          180  uint32_t blockSize;
                          +
                          181  uint64_t nEntries;
                          +
                          182  uint64_t runningWidthSum;
                          +
                          183  uint32_t tid;
                          +
                          184  uint32_t start;
                          +
                          185  uint32_t end;
                          +
                          186  uint32_t span;
                          +
                          187  uint32_t step;
                          +
                          188  uint8_t ltype;
                          +
                          189  uint32_t l;
                          +
                          190  void *p;
                          + + +
                          193  bwZoomBuffer_t **firstZoomBuffer;
                          +
                          194  bwZoomBuffer_t **lastZoomBuffer;
                          +
                          195  uint64_t *nNodes;
                          +
                          196  uLongf compressPsz;
                          +
                          197  void *compressP;
                          + +
                          199 
                          +
                          203 typedef struct {
                          + + + + + +
                          209  int isWrite;
                          +
                          210  int type;
                          +
                          211 } bigWigFile_t;
                          +
                          212 
                          +
                          216 typedef struct {
                          +
                          217  uint32_t l;
                          +
                          218  uint32_t m;
                          +
                          219  uint32_t *start;
                          +
                          220  uint32_t *end;
                          +
                          221  float *value;
                          + +
                          223 
                          +
                          227 typedef struct {
                          +
                          228  uint32_t l;
                          +
                          229  uint32_t m;
                          +
                          230  uint32_t *start;
                          +
                          231  uint32_t *end;
                          +
                          232  char **str;
                          + +
                          234 
                          +
                          239 typedef struct {
                          + +
                          241  uint32_t tid;
                          +
                          242  uint32_t start;
                          +
                          243  uint32_t end;
                          +
                          244  uint64_t offset;
                          + + +
                          247  void *blocks;
                          + + +
                          250  void *data;
                          + +
                          252 
                          +
                          260 int bwInit(size_t bufSize);
                          +
                          261 
                          +
                          266 void bwCleanup(void);
                          +
                          267 
                          +
                          275 int bwIsBigWig(char *fname, CURLcode (*callBack)(CURL*));
                          +
                          276 
                          +
                          284 int bbIsBigBed(char *fname, CURLcode (*callBack)(CURL*));
                          +
                          285 
                          +
                          294 bigWigFile_t *bwOpen(char *fname, CURLcode (*callBack)(CURL*), const char* mode);
                          +
                          295 
                          +
                          303 bigWigFile_t *bbOpen(char *fname, CURLcode (*callBack)(CURL*));
                          +
                          304 
                          +
                          313 char *bbGetSQL(bigWigFile_t *fp);
                          +
                          314 
                          +
                          320 void bwClose(bigWigFile_t *fp);
                          +
                          321 
                          +
                          322 /*******************************************************************************
                          +
                          323 *
                          +
                          324 * The following are in bwStats.c
                          +
                          325 *
                          +
                          326 *******************************************************************************/
                          +
                          327 
                          +
                          335 uint32_t bwGetTid(bigWigFile_t *fp, char *chrom);
                          +
                          336 
                          + +
                          343 
                          + +
                          350 
                          +
                          363 bwOverlappingIntervals_t *bwGetOverlappingIntervals(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end);
                          +
                          364 
                          +
                          377 bbOverlappingEntries_t *bbGetOverlappingEntries(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int withString);
                          +
                          378 
                          +
                          393 bwOverlapIterator_t *bwOverlappingIntervalsIterator(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t blocksPerIteration);
                          +
                          394 
                          +
                          411 bwOverlapIterator_t *bbOverlappingEntriesIterator(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int withString, uint32_t blocksPerIteration);
                          +
                          412 
                          + +
                          421 
                          + +
                          427 
                          +
                          441 bwOverlappingIntervals_t *bwGetValues(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int includeNA);
                          +
                          442 
                          +
                          455 double *bwStats(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t nBins, enum bwStatsType type);
                          +
                          456 
                          +
                          469 double *bwStatsFromFull(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, uint32_t nBins, enum bwStatsType type);
                          +
                          470 
                          +
                          471 //Writer functions
                          +
                          472 
                          +
                          480 int bwCreateHdr(bigWigFile_t *fp, int32_t maxZooms);
                          +
                          481 
                          +
                          490 chromList_t *bwCreateChromList(char **chroms, uint32_t *lengths, int64_t n);
                          +
                          491 
                          +
                          499 int bwWriteHdr(bigWigFile_t *bw);
                          +
                          500 
                          +
                          517 int bwAddIntervals(bigWigFile_t *fp, char **chrom, uint32_t *start, uint32_t *end, float *values, uint32_t n);
                          +
                          518 
                          +
                          531 int bwAppendIntervals(bigWigFile_t *fp, uint32_t *start, uint32_t *end, float *values, uint32_t n);
                          +
                          532 
                          +
                          549 int bwAddIntervalSpans(bigWigFile_t *fp, char *chrom, uint32_t *start, uint32_t span, float *values, uint32_t n);
                          +
                          550 
                          +
                          562 int bwAppendIntervalSpans(bigWigFile_t *fp, uint32_t *start, float *values, uint32_t n);
                          +
                          563 
                          +
                          581 int bwAddIntervalSpanSteps(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t span, uint32_t step, float *values, uint32_t n);
                          +
                          582 
                          +
                          593 int bwAppendIntervalSpanSteps(bigWigFile_t *fp, float *values, uint32_t n);
                          +
                          594 
                          +
                          595 #ifdef __cplusplus
                          +
                          596 }
                          +
                          597 #endif
                          +
                          uint64_t summaryOffset
                          Definition: bigWig.h:137
                          void bbDestroyOverlappingEntries(bbOverlappingEntries_t *o)
                          Frees space allocated by bbGetOverlappingEntries
                          Definition: bwValues.c:328
                          Holds interval:str associations.
                          Definition: bigWig.h:227
                          -
                          This structure holds the file pointers and buffers needed for raw access to local and remote files...
                          Definition: BigWigIO.h:32
                          +
                          This structure holds the file pointers and buffers needed for raw access to local and remote files...
                          Definition: bigWigIO.h:32
                          uint64_t nBlocks
                          Definition: bigWig.h:179
                          bwZoomHdr_t * zoomHdrs
                          Definition: bigWig.h:140
                          double maxVal
                          Definition: bigWig.h:144
                          @@ -103,7 +326,7 @@
                          uint32_t * start
                          Definition: bigWig.h:219
                          bwOverlappingIntervals_t * intervals
                          Definition: bigWig.h:248
                          uint64_t offset
                          Definition: bigWig.h:244
                          -
                          char * bbGetSQL(bigWigFile_t *fp)
                          Returns a string containing the SQL entry (or NULL). The "auto SQL" field contains the names and valu...
                          Definition: bwRead.c:318
                          +
                          char * bbGetSQL(bigWigFile_t *fp)
                          Returns a string containing the SQL entry (or NULL). The "auto SQL" field contains the names and va...
                          Definition: bwRead.c:318
                          uint32_t start
                          Definition: bigWig.h:184
                          bbOverlappingEntries_t * entries
                          Definition: bigWig.h:249
                          bigWigFile_t * bw
                          Definition: bigWig.h:240
                          @@ -115,6 +338,7 @@
                          bigWigFile_t * bwOpen(char *fname, CURLcode(*callBack)(CURL *), const char *mode)
                          Opens a local or remote bigWig file. This will open a local or remote bigWig file. Writing of local bigWig files is also supported.
                          Definition: bwRead.c:348
                          bwZoomBuffer_t ** lastZoomBuffer
                          Definition: bigWig.h:194
                          double sumData
                          Definition: bigWig.h:145
                          +
                          bwLL * currentIndexNode
                          Definition: bigWig.h:192
                          uint16_t version
                          Definition: bigWig.h:129
                          int type
                          Definition: bigWig.h:210
                          @@ -126,7 +350,6 @@
                          int bwWriteHdr(bigWigFile_t *bw)
                          Write a the header to a bigWig file. You must have already opened the output file, created a header and a chromosome list.
                          Definition: bwWrite.c:160
                          uint64_t nEntries
                          Definition: bigWig.h:181
                          uint32_t tid
                          Definition: bigWig.h:241
                          -
                          bwOverlapIterator_t * bbOverlappingEntriesIterator(bigWigFile_t *fp, char *chrom, uint32_t start, uint32_t end, int withString, uint32_t blocksPerIteration)
                          Creates an iterator over entries in a bigBed file Iterators can be traversed with bwIteratorNext() an...
                          Definition: bwValues.c:610
                          The header section of a bigWig file.
                          Definition: bigWig.h:128
                          uint64_t sqlOffset
                          Definition: bigWig.h:136
                          @@ -137,7 +360,7 @@
                          uint32_t start
                          Definition: bigWig.h:242
                          uint32_t bufSize
                          Definition: bigWig.h:138
                          uint64_t ctOffset
                          Definition: bigWig.h:131
                          -
                          This is only needed for writing bigWig files (and won&#39;t be created otherwise) This should be removed ...
                          Definition: bigWig.h:178
                          +
                          This is only needed for writing bigWig files (and won't be created otherwise) This should be removed ...
                          Definition: bigWig.h:178
                          uint32_t tid
                          Definition: bigWig.h:183
                          bwRTree_t ** idx
                          Definition: bigWig.h:120
                          uint64_t nBasesCovered
                          Definition: bigWig.h:142
                          @@ -202,9 +425,9 @@
                          diff --git a/docs/html/bwCommon_8h.html b/docs/html/bwCommon_8h.html index c15ad97..68e04e1 100644 --- a/docs/html/bwCommon_8h.html +++ b/docs/html/bwCommon_8h.html @@ -3,16 +3,15 @@ - + libBigWig: bwCommon.h File Reference - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -70,7 +69,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -93,25 +92,25 @@

                          Functions

                          int bwSetPos (bigWigFile_t *fp, size_t pos) - 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 fsetpos, while for remote files it fills a memory buffer with data starting at the desired position. More...
                          + 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 fsetpos, while for remote files it fills a memory buffer with data starting at the desired position. More...
                            size_t bwRead (void *data, size_t sz, size_t nmemb, bigWigFile_t *fp) - A local/remote version of fread. Reads data from either local or remote bigWig files. More...
                          + A local/remote version of fread. Reads data from either local or remote bigWig files. More...
                            long bwTell (bigWigFile_t *fp) - Determine what the file position indicator say. This is equivalent to ftell for local or remote files. More...
                          + Determine what the file position indicator say. This is equivalent to ftell for local or remote files. More...
                            bwRTree_tbwReadIndex (bigWigFile_t *fp, uint64_t offset) - 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 bwDestroyIndex More...
                          + 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 bwDestroyIndex More...
                            void bwDestroyIndexNode (bwRTreeNode_t *node) - Destroy an bwRTreeNode_t and all of its children. More...
                          + Destroy an bwRTreeNode_t and all of its children. More...
                            void bwDestroyIndex (bwRTree_t *idx) - Frees space allocated by bwReadIndex There is generally little reason to use this, since end users should typically not need to run bwReadIndex themselves. More...
                          + Frees space allocated by bwReadIndex There is generally little reason to use this, since end users should typically not need to run bwReadIndex themselves. More...
                            int bwFinalize (bigWigFile_t *fp) - 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. More...
                          + 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. More...
                           

                          Detailed Description

                          @@ -237,7 +236,7 @@
                          -
                          See also
                          bwSetPos
                          +
                          See Also
                          bwSetPos
                          Returns
                          For nmemb==1, the size of the copied data. For nmemb>1, the number of members fully copied (this is equivalent to fread).
                          @@ -342,9 +341,9 @@ diff --git a/docs/html/bwCommon_8h_source.html b/docs/html/bwCommon_8h_source.html index 5e6d8d5..acb440c 100644 --- a/docs/html/bwCommon_8h_source.html +++ b/docs/html/bwCommon_8h_source.html @@ -3,16 +3,15 @@ - + libBigWig: bwCommon.h Source File - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -71,7 +70,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -85,10 +84,27 @@
                          bwCommon.h
                          -Go to the documentation of this file.
                          1 
                          15 int bwSetPos(bigWigFile_t *fp, size_t pos);
                          16 
                          27 size_t bwRead(void *data, size_t sz, size_t nmemb, bigWigFile_t *fp);
                          28 
                          35 long bwTell(bigWigFile_t *fp);
                          36 
                          44 bwRTree_t *bwReadIndex(bigWigFile_t *fp, uint64_t offset);
                          45 
                          51 
                          57 void bwDestroyIndex(bwRTree_t *idx);
                          58 
                          60 bwOverlapBlock_t *walkRTreeNodes(bigWigFile_t *bw, bwRTreeNode_t *root, uint32_t tid, uint32_t start, uint32_t end);
                          61 void destroyBWOverlapBlock(bwOverlapBlock_t *b);
                          63 
                          70 int bwFinalize(bigWigFile_t *fp);
                          void bwDestroyIndexNode(bwRTreeNode_t *node)
                          Destroy an bwRTreeNode_t and all of its children.
                          Definition: bwValues.c:758
                          +Go to the documentation of this file.
                          1 
                          +
                          15 int bwSetPos(bigWigFile_t *fp, size_t pos);
                          +
                          16 
                          +
                          27 size_t bwRead(void *data, size_t sz, size_t nmemb, bigWigFile_t *fp);
                          +
                          28 
                          +
                          35 long bwTell(bigWigFile_t *fp);
                          +
                          36 
                          +
                          44 bwRTree_t *bwReadIndex(bigWigFile_t *fp, uint64_t offset);
                          +
                          45 
                          + +
                          51 
                          +
                          57 void bwDestroyIndex(bwRTree_t *idx);
                          +
                          58 
                          +
                          60 bwOverlapBlock_t *walkRTreeNodes(bigWigFile_t *bw, bwRTreeNode_t *root, uint32_t tid, uint32_t start, uint32_t end);
                          +
                          61 void destroyBWOverlapBlock(bwOverlapBlock_t *b);
                          +
                          63 
                          +
                          70 int bwFinalize(bigWigFile_t *fp);
                          +
                          void bwDestroyIndexNode(bwRTreeNode_t *node)
                          Destroy an bwRTreeNode_t and all of its children.
                          Definition: bwValues.c:758
                          This structure holds the data blocks that overlap a given interval.
                          Definition: bwValues.h:53
                          int bwSetPos(bigWigFile_t *fp, size_t pos)
                          Like fsetpos, but for local or remote bigWig files. This will set the file position indicator to the ...
                          Definition: bwRead.c:19
                          -
                          int bwFinalize(bigWigFile_t *fp)
                          Finishes what&#39;s needed to write a bigWigFile Flushes the buffer, converts the index linked list to a ...
                          Definition: bwWrite.c:1203
                          +
                          int bwFinalize(bigWigFile_t *fp)
                          Finishes what's needed to write a bigWigFile Flushes the buffer, converts the index linked list to a ...
                          Definition: bwWrite.c:1203
                          void bwDestroyIndex(bwRTree_t *idx)
                          Frees space allocated by bwReadIndex There is generally little reason to use this, since end users should typically not need to run bwReadIndex themselves.
                          Definition: bwValues.c:779
                          A structure that holds everything needed to access a bigWig file.
                          Definition: bigWig.h:203
                          bwRTree_t * bwReadIndex(bigWigFile_t *fp, uint64_t offset)
                          Reads a data index (either full data or a zoom level) from a bigWig file. There is little reason for ...
                          Definition: bwValues.c:786
                          @@ -99,9 +115,9 @@
                          diff --git a/docs/html/bwValues_8h.html b/docs/html/bwValues_8h.html index 32e9215..31f7e7d 100644 --- a/docs/html/bwValues_8h.html +++ b/docs/html/bwValues_8h.html @@ -3,16 +3,15 @@ - + libBigWig: bwValues.h File Reference - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -70,7 +69,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -88,28 +87,28 @@
                          bwValues.h File Reference
                          -
                          #include <inttypes.h>
                          +
                          #include <inttypes.h>

                          Go to the source code of this file.

                          - + - + - +

                          Data Structures

                          struct  bwRTreeNode_t
                           A node within an R-tree holding the index for data. More...
                           A node within an R-tree holding the index for data. More...
                           
                          struct  bwRTree_t
                           
                          struct  bwOverlapBlock_t
                           This structure holds the data blocks that overlap a given interval. More...
                           This structure holds the data blocks that overlap a given interval. More...
                           
                          struct  bwDataHeader_t
                           The header section of a given data block. More...
                           The header section of a given data block. More...
                           
                          - +

                          Typedefs

                          typedef struct bwRTreeNode_t bwRTreeNode_t
                           A node within an R-tree holding the index for data. More...
                           A node within an R-tree holding the index for data. More...
                           

                          Detailed Description

                          @@ -135,9 +134,9 @@
                          diff --git a/docs/html/bwValues_8h_source.html b/docs/html/bwValues_8h_source.html index b8b83d9..c33cc77 100644 --- a/docs/html/bwValues_8h_source.html +++ b/docs/html/bwValues_8h_source.html @@ -3,16 +3,15 @@ - + libBigWig: bwValues.h Source File - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -71,7 +70,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -85,7 +84,54 @@
                          bwValues.h
                          -Go to the documentation of this file.
                          1 #include <inttypes.h>
                          9 //N.B., coordinates are still 0-based half open!
                          17 typedef struct bwRTreeNode_t {
                          18  uint8_t isLeaf;
                          19  //1 byte of padding
                          20  uint16_t nChildren;
                          21  uint32_t *chrIdxStart;
                          22  uint32_t *baseStart;
                          23  uint32_t *chrIdxEnd;
                          24  uint32_t *baseEnd;
                          25  uint64_t *dataOffset;
                          26  union {
                          27  uint64_t *size;
                          28  struct bwRTreeNode_t **child;
                          29  } x;
                          31 
                          35 //TODO rootOffset is pointless, it's 48bytes after the indexOffset
                          36 typedef struct {
                          37  uint32_t blockSize;
                          38  uint64_t nItems;
                          39  uint32_t chrIdxStart;
                          40  uint32_t baseStart;
                          41  uint32_t chrIdxEnd;
                          42  uint32_t baseEnd;
                          43  uint64_t idxSize;
                          44  uint32_t nItemsPerSlot;
                          45  //There's 4 bytes of padding in the file here
                          46  uint64_t rootOffset;
                          48 } bwRTree_t;
                          49 
                          53 typedef struct {
                          54  uint64_t n;
                          55  uint64_t *offset;
                          56  uint64_t *size;
                          58 
                          64 typedef struct {
                          65  uint32_t tid;
                          66  uint32_t start;
                          67  uint32_t end;
                          68  uint32_t step;
                          69  uint32_t span;
                          70  uint8_t type;
                          71  uint16_t nItems;
                          uint64_t * size
                          Definition: bwValues.h:56
                          +Go to the documentation of this file.
                          1 #include <inttypes.h>
                          +
                          9 //N.B., coordinates are still 0-based half open!
                          +
                          17 typedef struct bwRTreeNode_t {
                          +
                          18  uint8_t isLeaf;
                          +
                          19  //1 byte of padding
                          +
                          20  uint16_t nChildren;
                          +
                          21  uint32_t *chrIdxStart;
                          +
                          22  uint32_t *baseStart;
                          +
                          23  uint32_t *chrIdxEnd;
                          +
                          24  uint32_t *baseEnd;
                          +
                          25  uint64_t *dataOffset;
                          +
                          26  union {
                          +
                          27  uint64_t *size;
                          +
                          28  struct bwRTreeNode_t **child;
                          +
                          29  } x;
                          + +
                          31 
                          +
                          35 //TODO rootOffset is pointless, it's 48bytes after the indexOffset
                          +
                          36 typedef struct {
                          +
                          37  uint32_t blockSize;
                          +
                          38  uint64_t nItems;
                          +
                          39  uint32_t chrIdxStart;
                          +
                          40  uint32_t baseStart;
                          +
                          41  uint32_t chrIdxEnd;
                          +
                          42  uint32_t baseEnd;
                          +
                          43  uint64_t idxSize;
                          +
                          44  uint32_t nItemsPerSlot;
                          +
                          45  //There's 4 bytes of padding in the file here
                          +
                          46  uint64_t rootOffset;
                          + +
                          48 } bwRTree_t;
                          +
                          49 
                          +
                          53 typedef struct {
                          +
                          54  uint64_t n;
                          +
                          55  uint64_t *offset;
                          +
                          56  uint64_t *size;
                          + +
                          58 
                          +
                          64 typedef struct {
                          +
                          65  uint32_t tid;
                          +
                          66  uint32_t start;
                          +
                          67  uint32_t end;
                          +
                          68  uint32_t step;
                          +
                          69  uint32_t span;
                          +
                          70  uint8_t type;
                          +
                          71  uint16_t nItems;
                          + +
                          uint64_t * size
                          Definition: bwValues.h:56
                          struct bwRTreeNode_t ** child
                          Definition: bwValues.h:28
                          uint64_t * size
                          Definition: bwValues.h:27
                          uint32_t baseStart
                          Definition: bwValues.h:40
                          @@ -123,9 +169,9 @@
                          diff --git a/docs/html/classes.html b/docs/html/classes.html index 3b5dbeb..7038262 100644 --- a/docs/html/classes.html +++ b/docs/html/classes.html @@ -3,16 +3,15 @@ - + libBigWig: Data Structure Index - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -72,7 +71,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -87,7 +86,7 @@
                          B | C | U
                          - +
                          @@ -103,9 +102,9 @@ diff --git a/docs/html/doxygen.css b/docs/html/doxygen.css index 1425ec5..f0f36f8 100644 --- a/docs/html/doxygen.css +++ b/docs/html/doxygen.css @@ -1,4 +1,4 @@ -/* The standard CSS for doxygen 1.8.11 */ +/* The standard CSS for doxygen 1.8.6 */ body, table, div, p, dl { font: 400 14px/22px Roboto,sans-serif; @@ -206,11 +206,6 @@ div.line { transition-duration: 0.5s; } -div.line:after { - content:"\000A"; - white-space: pre; -} - div.line.glow { background-color: cyan; box-shadow: 0 0 10px cyan; @@ -232,7 +227,7 @@ span.lineno a:hover { background-color: #C8C8C8; } -div.ah, span.ah { +div.ah { background-color: black; font-weight: bold; color: #ffffff; @@ -247,16 +242,7 @@ div.ah, span.ah { -webkit-box-shadow: 2px 2px 3px #999; -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); - background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); -} - -div.classindex ul { - list-style: none; - padding-left: 0; -} - -div.classindex span.ai { - display: inline-block; + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000); } div.groupHeader { @@ -684,12 +670,12 @@ span.mlabel { /* @end */ -/* these are for tree view inside a (index) page */ +/* these are for tree view when not used as main index */ div.directory { margin: 10px 0px; - border-top: 1px solid #9CAFD4; - border-bottom: 1px solid #9CAFD4; + border-top: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; width: 100%; } @@ -748,80 +734,6 @@ div.directory { color: #3D578C; } -.arrow { - color: #9CAFD4; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; - cursor: pointer; - font-size: 80%; - display: inline-block; - width: 16px; - height: 22px; -} - -.icon { - font-family: Arial, Helvetica; - font-weight: bold; - font-size: 12px; - height: 14px; - width: 16px; - display: inline-block; - background-color: #728DC1; - color: white; - text-align: center; - border-radius: 4px; - margin-left: 2px; - margin-right: 2px; -} - -.icona { - width: 24px; - height: 22px; - display: inline-block; -} - -.iconfopen { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('folderopen.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.iconfclosed { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('folderclosed.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -.icondoc { - width: 24px; - height: 18px; - margin-bottom: 4px; - background-image:url('doc.png'); - background-position: 0px -4px; - background-repeat: repeat-y; - vertical-align:top; - display: inline-block; -} - -table.directory { - font: 400 14px Roboto,sans-serif; -} - -/* @end */ - div.dynheader { margin-top: 8px; -webkit-touch-callout: none; @@ -837,10 +749,6 @@ address { color: #2A3D61; } -table.doxtable caption { - caption-side: top; -} - table.doxtable { border-collapse:collapse; margin-top: 4px; @@ -1006,18 +914,6 @@ div.summary a white-space: nowrap; } -table.classindex -{ - margin: 10px; - white-space: nowrap; - margin-left: 3%; - margin-right: 3%; - width: 94%; - border: 0; - border-spacing: 0; - padding: 0; -} - div.ingroups { font-size: 8pt; @@ -1129,11 +1025,6 @@ dl.section dd { border: 0px none; } -#projectalign -{ - vertical-align: middle; -} - #projectname { font: 300% Tahoma, Arial,sans-serif; @@ -1217,7 +1108,7 @@ div.toc { border-radius: 7px 7px 7px 7px; float: right; height: auto; - margin: 0 8px 10px 10px; + margin: 0 20px 10px 10px; width: 200px; } diff --git a/docs/html/dynsections.js b/docs/html/dynsections.js index 85e1836..ed092c7 100644 --- a/docs/html/dynsections.js +++ b/docs/html/dynsections.js @@ -24,20 +24,19 @@ function updateStripes() $('table.directory tr'). removeClass('even').filter(':visible:even').addClass('even'); } - function toggleLevel(level) { - $('table.directory tr').each(function() { + $('table.directory tr').each(function(){ var l = this.id.split('_').length-1; var i = $('#img'+this.id.substring(3)); var a = $('#arr'+this.id.substring(3)); if (l - + libBigWig: File List - @@ -22,7 +21,7 @@
                            U  
                          bigWigFile_t   bwOverlapIterator_t   bwWriteBuffer_t   
                          bigWigHdr_t   bwOverlappingIntervals_t   bwZoomHdr_t   
                          - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -71,7 +70,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -87,18 +86,18 @@
                          Here is a list of all documented files with brief descriptions:
                          diff --git a/docs/html/functions.html b/docs/html/functions.html index baefef5..a4f0b31 100644 --- a/docs/html/functions.html +++ b/docs/html/functions.html @@ -3,16 +3,15 @@ - + libBigWig: Data Fields - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -102,7 +101,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -469,9 +468,9 @@

                          - z -

                          diff --git a/docs/html/functions_vars.html b/docs/html/functions_vars.html index 8e89827..e492bbd 100644 --- a/docs/html/functions_vars.html +++ b/docs/html/functions_vars.html @@ -3,16 +3,15 @@ - + libBigWig: Data Fields - Variables - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -102,7 +101,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -469,9 +468,9 @@

                          - z -

                          diff --git a/docs/html/globals.html b/docs/html/globals.html index c688a8f..0060601 100644 --- a/docs/html/globals.html +++ b/docs/html/globals.html @@ -3,16 +3,15 @@ - + libBigWig: Globals - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -92,7 +91,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -130,7 +129,7 @@

                          - b -

                          diff --git a/docs/html/globals_defs.html b/docs/html/globals_defs.html index 3c9c149..3c41503 100644 --- a/docs/html/globals_defs.html +++ b/docs/html/globals_defs.html @@ -3,16 +3,15 @@ - + libBigWig: Globals - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -81,7 +80,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -120,9 +119,9 @@
                          diff --git a/docs/html/globals_enum.html b/docs/html/globals_enum.html index 33a882d..fceb84a 100644 --- a/docs/html/globals_enum.html +++ b/docs/html/globals_enum.html @@ -3,16 +3,15 @@ - + libBigWig: Globals - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -81,7 +80,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -93,7 +92,7 @@
                           
                          diff --git a/docs/html/globals_func.html b/docs/html/globals_func.html index feda68a..cb9e94a 100644 --- a/docs/html/globals_func.html +++ b/docs/html/globals_func.html @@ -3,16 +3,15 @@ - + libBigWig: Globals - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -87,7 +86,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -213,24 +212,24 @@

                          - b -

                          diff --git a/docs/html/globals_type.html b/docs/html/globals_type.html index bf386cf..0486f1b 100644 --- a/docs/html/globals_type.html +++ b/docs/html/globals_type.html @@ -3,16 +3,15 @@ - + libBigWig: Globals - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -81,7 +80,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -99,9 +98,9 @@
                          diff --git a/docs/html/globals_vars.html b/docs/html/globals_vars.html index d64db93..7863dae 100644 --- a/docs/html/globals_vars.html +++ b/docs/html/globals_vars.html @@ -3,16 +3,15 @@ - + libBigWig: Globals - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -81,7 +80,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -93,15 +92,15 @@
                           
                          diff --git a/docs/html/index.html b/docs/html/index.html index 14828be..fe8212f 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -3,16 +3,15 @@ - + libBigWig: libBigWig - @@ -22,7 +21,7 @@ - @@ -31,7 +30,7 @@
                          +
                          libBigWig
                          - + @@ -65,7 +64,7 @@ onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> - + All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
                          @@ -81,7 +80,8 @@

                          Introduction

                          -

                          libBigWig is a C library for parsing local/remote bigWig and bigBed files. This is similar to Kent's library from UCSC, except

                            +

                            libBigWig is a C library for parsing local/remote bigWig and bigBed files. This is similar to Kent's library from UCSC, except

                            +
                            • The license is much more liberal
                            • This code doesn't call exit() on error, thereby killing the calling application.
                            @@ -89,7 +89,8 @@

                            Please submit issues and pull requests here.

                            Compilation

                            -

                            Assuming you already have the curl libraries installed (not just the curl binary!):

                            make install prefix=/some/path
                            +

                            Assuming you already have the curl libraries installed (not just the curl binary!):

                            +
                            make install prefix=/some/path
                             

                            bigWig files

                            There are three methods for storing values in a bigWig file, further described in the wiggle format. The entries within the file are grouped into "blocks" and each such block is limited to storing entries of a single type. So, it is unwise to use a single bedGraph-like endtry followed by a single fixed-step entry followed by a variable-step entry, as that would require three separate blocks, with additional space required for each.

                            @@ -105,9 +106,9 @@

                          diff --git a/docs/html/jquery.js b/docs/html/jquery.js index d52a1c7..c197801 100644 --- a/docs/html/jquery.js +++ b/docs/html/jquery.js @@ -1,4 +1,4 @@ -/* +/*! * jQuery JavaScript Library v1.7.1 * http://jquery.com/ * @@ -13,56 +13,19 @@ * * Date: Mon Nov 21 21:11:03 2011 -0500 */ -(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
                          a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
                          ";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
                          t
                          ";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
                          ";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType;if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); -/* +(function(bb,L){var av=bb.document,bu=bb.navigator,bl=bb.location;var b=(function(){var bF=function(b0,b1){return new bF.fn.init(b0,b1,bD)},bU=bb.jQuery,bH=bb.$,bD,bY=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,bM=/\S/,bI=/^\s+/,bE=/\s+$/,bA=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,bN=/^[\],:{}\s]*$/,bW=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,bP=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,bJ=/(?:^|:|,)(?:\s*\[)+/g,by=/(webkit)[ \/]([\w.]+)/,bR=/(opera)(?:.*version)?[ \/]([\w.]+)/,bQ=/(msie) ([\w.]+)/,bS=/(mozilla)(?:.*? rv:([\w.]+))?/,bB=/-([a-z]|[0-9])/ig,bZ=/^-ms-/,bT=function(b0,b1){return(b1+"").toUpperCase()},bX=bu.userAgent,bV,bC,e,bL=Object.prototype.toString,bG=Object.prototype.hasOwnProperty,bz=Array.prototype.push,bK=Array.prototype.slice,bO=String.prototype.trim,bv=Array.prototype.indexOf,bx={};bF.fn=bF.prototype={constructor:bF,init:function(b0,b4,b3){var b2,b5,b1,b6;if(!b0){return this}if(b0.nodeType){this.context=this[0]=b0;this.length=1;return this}if(b0==="body"&&!b4&&av.body){this.context=av;this[0]=av.body;this.selector=b0;this.length=1;return this}if(typeof b0==="string"){if(b0.charAt(0)==="<"&&b0.charAt(b0.length-1)===">"&&b0.length>=3){b2=[null,b0,null]}else{b2=bY.exec(b0)}if(b2&&(b2[1]||!b4)){if(b2[1]){b4=b4 instanceof bF?b4[0]:b4;b6=(b4?b4.ownerDocument||b4:av);b1=bA.exec(b0);if(b1){if(bF.isPlainObject(b4)){b0=[av.createElement(b1[1])];bF.fn.attr.call(b0,b4,true)}else{b0=[b6.createElement(b1[1])]}}else{b1=bF.buildFragment([b2[1]],[b6]);b0=(b1.cacheable?bF.clone(b1.fragment):b1.fragment).childNodes}return bF.merge(this,b0)}else{b5=av.getElementById(b2[2]);if(b5&&b5.parentNode){if(b5.id!==b2[2]){return b3.find(b0)}this.length=1;this[0]=b5}this.context=av;this.selector=b0;return this}}else{if(!b4||b4.jquery){return(b4||b3).find(b0)}else{return this.constructor(b4).find(b0)}}}else{if(bF.isFunction(b0)){return b3.ready(b0)}}if(b0.selector!==L){this.selector=b0.selector;this.context=b0.context}return bF.makeArray(b0,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return bK.call(this,0)},get:function(b0){return b0==null?this.toArray():(b0<0?this[this.length+b0]:this[b0])},pushStack:function(b1,b3,b0){var b2=this.constructor();if(bF.isArray(b1)){bz.apply(b2,b1)}else{bF.merge(b2,b1)}b2.prevObject=this;b2.context=this.context;if(b3==="find"){b2.selector=this.selector+(this.selector?" ":"")+b0}else{if(b3){b2.selector=this.selector+"."+b3+"("+b0+")"}}return b2},each:function(b1,b0){return bF.each(this,b1,b0)},ready:function(b0){bF.bindReady();bC.add(b0);return this},eq:function(b0){b0=+b0;return b0===-1?this.slice(b0):this.slice(b0,b0+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(bK.apply(this,arguments),"slice",bK.call(arguments).join(","))},map:function(b0){return this.pushStack(bF.map(this,function(b2,b1){return b0.call(b2,b1,b2)}))},end:function(){return this.prevObject||this.constructor(null)},push:bz,sort:[].sort,splice:[].splice};bF.fn.init.prototype=bF.fn;bF.extend=bF.fn.extend=function(){var b9,b2,b0,b1,b6,b7,b5=arguments[0]||{},b4=1,b3=arguments.length,b8=false;if(typeof b5==="boolean"){b8=b5;b5=arguments[1]||{};b4=2}if(typeof b5!=="object"&&!bF.isFunction(b5)){b5={}}if(b3===b4){b5=this;--b4}for(;b40){return}bC.fireWith(av,[bF]);if(bF.fn.trigger){bF(av).trigger("ready").off("ready")}}},bindReady:function(){if(bC){return}bC=bF.Callbacks("once memory");if(av.readyState==="complete"){return setTimeout(bF.ready,1)}if(av.addEventListener){av.addEventListener("DOMContentLoaded",e,false);bb.addEventListener("load",bF.ready,false)}else{if(av.attachEvent){av.attachEvent("onreadystatechange",e);bb.attachEvent("onload",bF.ready);var b0=false;try{b0=bb.frameElement==null}catch(b1){}if(av.documentElement.doScroll&&b0){bw()}}}},isFunction:function(b0){return bF.type(b0)==="function"},isArray:Array.isArray||function(b0){return bF.type(b0)==="array"},isWindow:function(b0){return b0&&typeof b0==="object"&&"setInterval" in b0},isNumeric:function(b0){return !isNaN(parseFloat(b0))&&isFinite(b0)},type:function(b0){return b0==null?String(b0):bx[bL.call(b0)]||"object"},isPlainObject:function(b2){if(!b2||bF.type(b2)!=="object"||b2.nodeType||bF.isWindow(b2)){return false}try{if(b2.constructor&&!bG.call(b2,"constructor")&&!bG.call(b2.constructor.prototype,"isPrototypeOf")){return false}}catch(b1){return false}var b0;for(b0 in b2){}return b0===L||bG.call(b2,b0)},isEmptyObject:function(b1){for(var b0 in b1){return false}return true},error:function(b0){throw new Error(b0)},parseJSON:function(b0){if(typeof b0!=="string"||!b0){return null}b0=bF.trim(b0);if(bb.JSON&&bb.JSON.parse){return bb.JSON.parse(b0)}if(bN.test(b0.replace(bW,"@").replace(bP,"]").replace(bJ,""))){return(new Function("return "+b0))()}bF.error("Invalid JSON: "+b0)},parseXML:function(b2){var b0,b1;try{if(bb.DOMParser){b1=new DOMParser();b0=b1.parseFromString(b2,"text/xml")}else{b0=new ActiveXObject("Microsoft.XMLDOM");b0.async="false";b0.loadXML(b2)}}catch(b3){b0=L}if(!b0||!b0.documentElement||b0.getElementsByTagName("parsererror").length){bF.error("Invalid XML: "+b2)}return b0},noop:function(){},globalEval:function(b0){if(b0&&bM.test(b0)){(bb.execScript||function(b1){bb["eval"].call(bb,b1)})(b0)}},camelCase:function(b0){return b0.replace(bZ,"ms-").replace(bB,bT)},nodeName:function(b1,b0){return b1.nodeName&&b1.nodeName.toUpperCase()===b0.toUpperCase()},each:function(b3,b6,b2){var b1,b4=0,b5=b3.length,b0=b5===L||bF.isFunction(b3);if(b2){if(b0){for(b1 in b3){if(b6.apply(b3[b1],b2)===false){break}}}else{for(;b40&&b0[0]&&b0[b1-1])||b1===0||bF.isArray(b0));if(b3){for(;b21?aJ.call(arguments,0):bG;if(!(--bw)){bC.resolveWith(bC,bx)}}}function bz(bF){return function(bG){bB[bF]=arguments.length>1?aJ.call(arguments,0):bG;bC.notifyWith(bE,bB)}}if(e>1){for(;bv
                          a";bI=bv.getElementsByTagName("*");bF=bv.getElementsByTagName("a")[0];if(!bI||!bI.length||!bF){return{}}bG=av.createElement("select");bx=bG.appendChild(av.createElement("option"));bE=bv.getElementsByTagName("input")[0];bJ={leadingWhitespace:(bv.firstChild.nodeType===3),tbody:!bv.getElementsByTagName("tbody").length,htmlSerialize:!!bv.getElementsByTagName("link").length,style:/top/.test(bF.getAttribute("style")),hrefNormalized:(bF.getAttribute("href")==="/a"),opacity:/^0.55/.test(bF.style.opacity),cssFloat:!!bF.style.cssFloat,checkOn:(bE.value==="on"),optSelected:bx.selected,getSetAttribute:bv.className!=="t",enctype:!!av.createElement("form").enctype,html5Clone:av.createElement("nav").cloneNode(true).outerHTML!=="<:nav>",submitBubbles:true,changeBubbles:true,focusinBubbles:false,deleteExpando:true,noCloneEvent:true,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableMarginRight:true};bE.checked=true;bJ.noCloneChecked=bE.cloneNode(true).checked;bG.disabled=true;bJ.optDisabled=!bx.disabled;try{delete bv.test}catch(bC){bJ.deleteExpando=false}if(!bv.addEventListener&&bv.attachEvent&&bv.fireEvent){bv.attachEvent("onclick",function(){bJ.noCloneEvent=false});bv.cloneNode(true).fireEvent("onclick")}bE=av.createElement("input");bE.value="t";bE.setAttribute("type","radio");bJ.radioValue=bE.value==="t";bE.setAttribute("checked","checked");bv.appendChild(bE);bD=av.createDocumentFragment();bD.appendChild(bv.lastChild);bJ.checkClone=bD.cloneNode(true).cloneNode(true).lastChild.checked;bJ.appendChecked=bE.checked;bD.removeChild(bE);bD.appendChild(bv);bv.innerHTML="";if(bb.getComputedStyle){bA=av.createElement("div");bA.style.width="0";bA.style.marginRight="0";bv.style.width="2px";bv.appendChild(bA);bJ.reliableMarginRight=(parseInt((bb.getComputedStyle(bA,null)||{marginRight:0}).marginRight,10)||0)===0}if(bv.attachEvent){for(by in {submit:1,change:1,focusin:1}){bB="on"+by;bw=(bB in bv);if(!bw){bv.setAttribute(bB,"return;");bw=(typeof bv[bB]==="function")}bJ[by+"Bubbles"]=bw}}bD.removeChild(bv);bD=bG=bx=bA=bv=bE=null;b(function(){var bM,bU,bV,bT,bN,bO,bL,bS,bR,e,bP,bQ=av.getElementsByTagName("body")[0];if(!bQ){return}bL=1;bS="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;";bR="visibility:hidden;border:0;";e="style='"+bS+"border:5px solid #000;padding:0;'";bP="
                          ";bM=av.createElement("div");bM.style.cssText=bR+"width:0;height:0;position:static;top:0;margin-top:"+bL+"px";bQ.insertBefore(bM,bQ.firstChild);bv=av.createElement("div");bM.appendChild(bv);bv.innerHTML="
                          t
                          ";bz=bv.getElementsByTagName("td");bw=(bz[0].offsetHeight===0);bz[0].style.display="";bz[1].style.display="none";bJ.reliableHiddenOffsets=bw&&(bz[0].offsetHeight===0);bv.innerHTML="";bv.style.width=bv.style.paddingLeft="1px";b.boxModel=bJ.boxModel=bv.offsetWidth===2;if(typeof bv.style.zoom!=="undefined"){bv.style.display="inline";bv.style.zoom=1;bJ.inlineBlockNeedsLayout=(bv.offsetWidth===2);bv.style.display="";bv.innerHTML="
                          ";bJ.shrinkWrapBlocks=(bv.offsetWidth!==2)}bv.style.cssText=bS+bR;bv.innerHTML=bP;bU=bv.firstChild;bV=bU.firstChild;bN=bU.nextSibling.firstChild.firstChild;bO={doesNotAddBorder:(bV.offsetTop!==5),doesAddBorderForTableAndCells:(bN.offsetTop===5)};bV.style.position="fixed";bV.style.top="20px";bO.fixedPosition=(bV.offsetTop===20||bV.offsetTop===15);bV.style.position=bV.style.top="";bU.style.overflow="hidden";bU.style.position="relative";bO.subtractsBorderForOverflowNotVisible=(bV.offsetTop===-5);bO.doesNotIncludeMarginInBodyOffset=(bQ.offsetTop!==bL);bQ.removeChild(bM);bv=bM=null;b.extend(bJ,bO)});return bJ})();var aS=/^(?:\{.*\}|\[.*\])$/,aA=/([A-Z])/g;b.extend({cache:{},uuid:0,expando:"jQuery"+(b.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},hasData:function(e){e=e.nodeType?b.cache[e[b.expando]]:e[b.expando];return !!e&&!S(e)},data:function(bx,bv,bz,by){if(!b.acceptData(bx)){return}var bG,bA,bD,bE=b.expando,bC=typeof bv==="string",bF=bx.nodeType,e=bF?b.cache:bx,bw=bF?bx[bE]:bx[bE]&&bE,bB=bv==="events";if((!bw||!e[bw]||(!bB&&!by&&!e[bw].data))&&bC&&bz===L){return}if(!bw){if(bF){bx[bE]=bw=++b.uuid}else{bw=bE}}if(!e[bw]){e[bw]={};if(!bF){e[bw].toJSON=b.noop}}if(typeof bv==="object"||typeof bv==="function"){if(by){e[bw]=b.extend(e[bw],bv)}else{e[bw].data=b.extend(e[bw].data,bv)}}bG=bA=e[bw];if(!by){if(!bA.data){bA.data={}}bA=bA.data}if(bz!==L){bA[b.camelCase(bv)]=bz}if(bB&&!bA[bv]){return bG.events}if(bC){bD=bA[bv];if(bD==null){bD=bA[b.camelCase(bv)]}}else{bD=bA}return bD},removeData:function(bx,bv,by){if(!b.acceptData(bx)){return}var bB,bA,bz,bC=b.expando,bD=bx.nodeType,e=bD?b.cache:bx,bw=bD?bx[bC]:bC;if(!e[bw]){return}if(bv){bB=by?e[bw]:e[bw].data;if(bB){if(!b.isArray(bv)){if(bv in bB){bv=[bv]}else{bv=b.camelCase(bv);if(bv in bB){bv=[bv]}else{bv=bv.split(" ")}}}for(bA=0,bz=bv.length;bA-1){return true}}return false},val:function(bx){var e,bv,by,bw=this[0];if(!arguments.length){if(bw){e=b.valHooks[bw.nodeName.toLowerCase()]||b.valHooks[bw.type];if(e&&"get" in e&&(bv=e.get(bw,"value"))!==L){return bv}bv=bw.value;return typeof bv==="string"?bv.replace(aU,""):bv==null?"":bv}return}by=b.isFunction(bx);return this.each(function(bA){var bz=b(this),bB;if(this.nodeType!==1){return}if(by){bB=bx.call(this,bA,bz.val())}else{bB=bx}if(bB==null){bB=""}else{if(typeof bB==="number"){bB+=""}else{if(b.isArray(bB)){bB=b.map(bB,function(bC){return bC==null?"":bC+""})}}}e=b.valHooks[this.nodeName.toLowerCase()]||b.valHooks[this.type];if(!e||!("set" in e)||e.set(this,bB,"value")===L){this.value=bB}})}});b.extend({valHooks:{option:{get:function(e){var bv=e.attributes.value;return !bv||bv.specified?e.value:e.text}},select:{get:function(e){var bA,bv,bz,bx,by=e.selectedIndex,bB=[],bC=e.options,bw=e.type==="select-one";if(by<0){return null}bv=bw?by:0;bz=bw?by+1:bC.length;for(;bv=0});if(!e.length){bv.selectedIndex=-1}return e}}},attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(bA,bx,bB,bz){var bw,e,by,bv=bA.nodeType; +if(!bA||bv===3||bv===8||bv===2){return}if(bz&&bx in b.attrFn){return b(bA)[bx](bB)}if(typeof bA.getAttribute==="undefined"){return b.prop(bA,bx,bB)}by=bv!==1||!b.isXMLDoc(bA);if(by){bx=bx.toLowerCase();e=b.attrHooks[bx]||(ao.test(bx)?aY:be)}if(bB!==L){if(bB===null){b.removeAttr(bA,bx);return}else{if(e&&"set" in e&&by&&(bw=e.set(bA,bB,bx))!==L){return bw}else{bA.setAttribute(bx,""+bB);return bB}}}else{if(e&&"get" in e&&by&&(bw=e.get(bA,bx))!==null){return bw}else{bw=bA.getAttribute(bx);return bw===null?L:bw}}},removeAttr:function(bx,bz){var by,bA,bv,e,bw=0;if(bz&&bx.nodeType===1){bA=bz.toLowerCase().split(af);e=bA.length;for(;bw=0)}}})});var bd=/^(?:textarea|input|select)$/i,n=/^([^\.]*)?(?:\.(.+))?$/,J=/\bhover(\.\S+)?\b/,aO=/^key/,bf=/^(?:mouse|contextmenu)|click/,T=/^(?:focusinfocus|focusoutblur)$/,U=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,Y=function(e){var bv=U.exec(e);if(bv){bv[1]=(bv[1]||"").toLowerCase();bv[3]=bv[3]&&new RegExp("(?:^|\\s)"+bv[3]+"(?:\\s|$)")}return bv},j=function(bw,e){var bv=bw.attributes||{};return((!e[1]||bw.nodeName.toLowerCase()===e[1])&&(!e[2]||(bv.id||{}).value===e[2])&&(!e[3]||e[3].test((bv["class"]||{}).value)))},bt=function(e){return b.event.special.hover?e:e.replace(J,"mouseenter$1 mouseleave$1")};b.event={add:function(bx,bC,bJ,bA,by){var bD,bB,bK,bI,bH,bF,e,bG,bv,bz,bw,bE;if(bx.nodeType===3||bx.nodeType===8||!bC||!bJ||!(bD=b._data(bx))){return}if(bJ.handler){bv=bJ;bJ=bv.handler}if(!bJ.guid){bJ.guid=b.guid++}bK=bD.events;if(!bK){bD.events=bK={}}bB=bD.handle;if(!bB){bD.handle=bB=function(bL){return typeof b!=="undefined"&&(!bL||b.event.triggered!==bL.type)?b.event.dispatch.apply(bB.elem,arguments):L};bB.elem=bx}bC=b.trim(bt(bC)).split(" ");for(bI=0;bI=0){bG=bG.slice(0,-1);bw=true}if(bG.indexOf(".")>=0){bx=bG.split(".");bG=bx.shift();bx.sort()}if((!bA||b.event.customEvent[bG])&&!b.event.global[bG]){return}bv=typeof bv==="object"?bv[b.expando]?bv:new b.Event(bG,bv):new b.Event(bG);bv.type=bG;bv.isTrigger=true;bv.exclusive=bw;bv.namespace=bx.join(".");bv.namespace_re=bv.namespace?new RegExp("(^|\\.)"+bx.join("\\.(?:.*\\.)?")+"(\\.|$)"):null;by=bG.indexOf(":")<0?"on"+bG:"";if(!bA){e=b.cache;for(bC in e){if(e[bC].events&&e[bC].events[bG]){b.event.trigger(bv,bD,e[bC].handle.elem,true)}}return}bv.result=L;if(!bv.target){bv.target=bA}bD=bD!=null?b.makeArray(bD):[];bD.unshift(bv);bF=b.event.special[bG]||{};if(bF.trigger&&bF.trigger.apply(bA,bD)===false){return}bB=[[bA,bF.bindType||bG]];if(!bJ&&!bF.noBubble&&!b.isWindow(bA)){bI=bF.delegateType||bG;bH=T.test(bI+bG)?bA:bA.parentNode;bz=null;for(;bH;bH=bH.parentNode){bB.push([bH,bI]);bz=bH}if(bz&&bz===bA.ownerDocument){bB.push([bz.defaultView||bz.parentWindow||bb,bI])}}for(bC=0;bCbA){bH.push({elem:this,matches:bz.slice(bA)})}for(bC=0;bC0?this.on(e,null,bx,bw):this.trigger(e)};if(b.attrFn){b.attrFn[e]=true}if(aO.test(e)){b.event.fixHooks[e]=b.event.keyHooks}if(bf.test(e)){b.event.fixHooks[e]=b.event.mouseHooks}}); +/*! * Sizzle CSS Selector Engine * Copyright 2011, The Dojo Foundation * Released under the MIT, BSD, and GPL Licenses. * More information: http://sizzlejs.com/ */ -(function(){var bH=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,bC="sizcache"+(Math.random()+"").replace(".",""),bI=0,bL=Object.prototype.toString,bB=false,bA=true,bK=/\\/g,bO=/\r\n/g,bQ=/\W/;[0,0].sort(function(){bA=false;return 0});var by=function(bV,e,bY,bZ){bY=bY||[];e=e||av;var b1=e;if(e.nodeType!==1&&e.nodeType!==9){return[]}if(!bV||typeof bV!=="string"){return bY}var bS,b3,b6,bR,b2,b5,b4,bX,bU=true,bT=by.isXML(e),bW=[],b0=bV;do{bH.exec("");bS=bH.exec(b0);if(bS){b0=bS[3];bW.push(bS[1]);if(bS[2]){bR=bS[3];break}}}while(bS);if(bW.length>1&&bD.exec(bV)){if(bW.length===2&&bE.relative[bW[0]]){b3=bM(bW[0]+bW[1],e,bZ)}else{b3=bE.relative[bW[0]]?[e]:by(bW.shift(),e);while(bW.length){bV=bW.shift();if(bE.relative[bV]){bV+=bW.shift()}b3=bM(bV,b3,bZ)}}}else{if(!bZ&&bW.length>1&&e.nodeType===9&&!bT&&bE.match.ID.test(bW[0])&&!bE.match.ID.test(bW[bW.length-1])){b2=by.find(bW.shift(),e,bT);e=b2.expr?by.filter(b2.expr,b2.set)[0]:b2.set[0]}if(e){b2=bZ?{expr:bW.pop(),set:bF(bZ)}:by.find(bW.pop(),bW.length===1&&(bW[0]==="~"||bW[0]==="+")&&e.parentNode?e.parentNode:e,bT);b3=b2.expr?by.filter(b2.expr,b2.set):b2.set;if(bW.length>0){b6=bF(b3)}else{bU=false}while(bW.length){b5=bW.pop();b4=b5;if(!bE.relative[b5]){b5=""}else{b4=bW.pop()}if(b4==null){b4=e}bE.relative[b5](b6,b4,bT)}}else{b6=bW=[]}}if(!b6){b6=b3}if(!b6){by.error(b5||bV)}if(bL.call(b6)==="[object Array]"){if(!bU){bY.push.apply(bY,b6)}else{if(e&&e.nodeType===1){for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&(b6[bX]===true||b6[bX].nodeType===1&&by.contains(e,b6[bX]))){bY.push(b3[bX])}}}else{for(bX=0;b6[bX]!=null;bX++){if(b6[bX]&&b6[bX].nodeType===1){bY.push(b3[bX])}}}}}else{bF(b6,bY)}if(bR){by(bR,b1,bY,bZ);by.uniqueSort(bY)}return bY};by.uniqueSort=function(bR){if(bJ){bB=bA;bR.sort(bJ);if(bB){for(var e=1;e0};by.find=function(bX,e,bY){var bW,bS,bU,bT,bV,bR;if(!bX){return[]}for(bS=0,bU=bE.order.length;bS":function(bW,bR){var bV,bU=typeof bR==="string",bS=0,e=bW.length;if(bU&&!bQ.test(bR)){bR=bR.toLowerCase();for(;bS=0)){if(!bS){e.push(bV)}}else{if(bS){bR[bU]=false}}}}return false},ID:function(e){return e[1].replace(bK,"")},TAG:function(bR,e){return bR[1].replace(bK,"").toLowerCase()},CHILD:function(e){if(e[1]==="nth"){if(!e[2]){by.error(e[0])}e[2]=e[2].replace(/^\+|\s*/g,"");var bR=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(e[2]==="even"&&"2n"||e[2]==="odd"&&"2n+1"||!/\D/.test(e[2])&&"0n+"+e[2]||e[2]);e[2]=(bR[1]+(bR[2]||1))-0;e[3]=bR[3]-0}else{if(e[2]){by.error(e[0])}}e[0]=bI++;return e},ATTR:function(bU,bR,bS,e,bV,bW){var bT=bU[1]=bU[1].replace(bK,"");if(!bW&&bE.attrMap[bT]){bU[1]=bE.attrMap[bT]}bU[4]=(bU[4]||bU[5]||"").replace(bK,"");if(bU[2]==="~="){bU[4]=" "+bU[4]+" "}return bU},PSEUDO:function(bU,bR,bS,e,bV){if(bU[1]==="not"){if((bH.exec(bU[3])||"").length>1||/^\w/.test(bU[3])){bU[3]=by(bU[3],null,null,bR)}else{var bT=by.filter(bU[3],bR,bS,true^bV);if(!bS){e.push.apply(e,bT)}return false}}else{if(bE.match.POS.test(bU[0])||bE.match.CHILD.test(bU[0])){return true}}return bU},POS:function(e){e.unshift(true);return e}},filters:{enabled:function(e){return e.disabled===false&&e.type!=="hidden"},disabled:function(e){return e.disabled===true},checked:function(e){return e.checked===true},selected:function(e){if(e.parentNode){e.parentNode.selectedIndex}return e.selected===true},parent:function(e){return !!e.firstChild},empty:function(e){return !e.firstChild},has:function(bS,bR,e){return !!by(e[3],bS).length},header:function(e){return(/h\d/i).test(e.nodeName)},text:function(bS){var e=bS.getAttribute("type"),bR=bS.type;return bS.nodeName.toLowerCase()==="input"&&"text"===bR&&(e===bR||e===null)},radio:function(e){return e.nodeName.toLowerCase()==="input"&&"radio"===e.type},checkbox:function(e){return e.nodeName.toLowerCase()==="input"&&"checkbox"===e.type},file:function(e){return e.nodeName.toLowerCase()==="input"&&"file"===e.type},password:function(e){return e.nodeName.toLowerCase()==="input"&&"password"===e.type},submit:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"submit"===bR.type},image:function(e){return e.nodeName.toLowerCase()==="input"&&"image"===e.type},reset:function(bR){var e=bR.nodeName.toLowerCase();return(e==="input"||e==="button")&&"reset"===bR.type},button:function(bR){var e=bR.nodeName.toLowerCase();return e==="input"&&"button"===bR.type||e==="button"},input:function(e){return(/input|select|textarea|button/i).test(e.nodeName)},focus:function(e){return e===e.ownerDocument.activeElement}},setFilters:{first:function(bR,e){return e===0},last:function(bS,bR,e,bT){return bR===bT.length-1},even:function(bR,e){return e%2===0},odd:function(bR,e){return e%2===1},lt:function(bS,bR,e){return bRe[3]-0},nth:function(bS,bR,e){return e[3]-0===bR},eq:function(bS,bR,e){return e[3]-0===bR}},filter:{PSEUDO:function(bS,bX,bW,bY){var e=bX[1],bR=bE.filters[e];if(bR){return bR(bS,bW,bX,bY)}else{if(e==="contains"){return(bS.textContent||bS.innerText||bw([bS])||"").indexOf(bX[3])>=0}else{if(e==="not"){var bT=bX[3];for(var bV=0,bU=bT.length;bV=0)}}},ID:function(bR,e){return bR.nodeType===1&&bR.getAttribute("id")===e},TAG:function(bR,e){return(e==="*"&&bR.nodeType===1)||!!bR.nodeName&&bR.nodeName.toLowerCase()===e},CLASS:function(bR,e){return(" "+(bR.className||bR.getAttribute("class"))+" ").indexOf(e)>-1},ATTR:function(bV,bT){var bS=bT[1],e=by.attr?by.attr(bV,bS):bE.attrHandle[bS]?bE.attrHandle[bS](bV):bV[bS]!=null?bV[bS]:bV.getAttribute(bS),bW=e+"",bU=bT[2],bR=bT[4];return e==null?bU==="!=":!bU&&by.attr?e!=null:bU==="="?bW===bR:bU==="*="?bW.indexOf(bR)>=0:bU==="~="?(" "+bW+" ").indexOf(bR)>=0:!bR?bW&&e!==false:bU==="!="?bW!==bR:bU==="^="?bW.indexOf(bR)===0:bU==="$="?bW.substr(bW.length-bR.length)===bR:bU==="|="?bW===bR||bW.substr(0,bR.length+1)===bR+"-":false},POS:function(bU,bR,bS,bV){var e=bR[2],bT=bE.setFilters[e];if(bT){return bT(bU,bS,bR,bV)}}}};var bD=bE.match.POS,bx=function(bR,e){return"\\"+(e-0+1)};for(var bz in bE.match){bE.match[bz]=new RegExp(bE.match[bz].source+(/(?![^\[]*\])(?![^\(]*\))/.source));bE.leftMatch[bz]=new RegExp(/(^(?:.|\r|\n)*?)/.source+bE.match[bz].source.replace(/\\(\d+)/g,bx))}var bF=function(bR,e){bR=Array.prototype.slice.call(bR,0);if(e){e.push.apply(e,bR);return e}return bR};try{Array.prototype.slice.call(av.documentElement.childNodes,0)[0].nodeType}catch(bP){bF=function(bU,bT){var bS=0,bR=bT||[];if(bL.call(bU)==="[object Array]"){Array.prototype.push.apply(bR,bU)}else{if(typeof bU.length==="number"){for(var e=bU.length;bS";e.insertBefore(bR,e.firstChild);if(av.getElementById(bS)){bE.find.ID=function(bU,bV,bW){if(typeof bV.getElementById!=="undefined"&&!bW){var bT=bV.getElementById(bU[1]);return bT?bT.id===bU[1]||typeof bT.getAttributeNode!=="undefined"&&bT.getAttributeNode("id").nodeValue===bU[1]?[bT]:L:[]}};bE.filter.ID=function(bV,bT){var bU=typeof bV.getAttributeNode!=="undefined"&&bV.getAttributeNode("id");return bV.nodeType===1&&bU&&bU.nodeValue===bT}}e.removeChild(bR);e=bR=null})();(function(){var e=av.createElement("div");e.appendChild(av.createComment(""));if(e.getElementsByTagName("*").length>0){bE.find.TAG=function(bR,bV){var bU=bV.getElementsByTagName(bR[1]);if(bR[1]==="*"){var bT=[];for(var bS=0;bU[bS];bS++){if(bU[bS].nodeType===1){bT.push(bU[bS])}}bU=bT}return bU}}e.innerHTML="";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){bE.attrHandle.href=function(bR){return bR.getAttribute("href",2)}}e=null})();if(av.querySelectorAll){(function(){var e=by,bT=av.createElement("div"),bS="__sizzle__";bT.innerHTML="

                          ";if(bT.querySelectorAll&&bT.querySelectorAll(".TEST").length===0){return}by=function(b4,bV,bZ,b3){bV=bV||av;if(!b3&&!by.isXML(bV)){var b2=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b4);if(b2&&(bV.nodeType===1||bV.nodeType===9)){if(b2[1]){return bF(bV.getElementsByTagName(b4),bZ)}else{if(b2[2]&&bE.find.CLASS&&bV.getElementsByClassName){return bF(bV.getElementsByClassName(b2[2]),bZ)}}}if(bV.nodeType===9){if(b4==="body"&&bV.body){return bF([bV.body],bZ)}else{if(b2&&b2[3]){var bY=bV.getElementById(b2[3]);if(bY&&bY.parentNode){if(bY.id===b2[3]){return bF([bY],bZ)}}else{return bF([],bZ)}}}try{return bF(bV.querySelectorAll(b4),bZ)}catch(b0){}}else{if(bV.nodeType===1&&bV.nodeName.toLowerCase()!=="object"){var bW=bV,bX=bV.getAttribute("id"),bU=bX||bS,b6=bV.parentNode,b5=/^\s*[+~]/.test(b4);if(!bX){bV.setAttribute("id",bU)}else{bU=bU.replace(/'/g,"\\$&")}if(b5&&b6){bV=bV.parentNode}try{if(!b5||b6){return bF(bV.querySelectorAll("[id='"+bU+"'] "+b4),bZ)}}catch(b1){}finally{if(!bX){bW.removeAttribute("id")}}}}}return e(b4,bV,bZ,b3)};for(var bR in e){by[bR]=e[bR]}bT=null})()}(function(){var e=av.documentElement,bS=e.matchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.msMatchesSelector;if(bS){var bU=!bS.call(av.createElement("div"),"div"),bR=false;try{bS.call(av.documentElement,"[test!='']:sizzle")}catch(bT){bR=true}by.matchesSelector=function(bW,bY){bY=bY.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!by.isXML(bW)){try{if(bR||!bE.match.PSEUDO.test(bY)&&!/!=/.test(bY)){var bV=bS.call(bW,bY);if(bV||!bU||bW.document&&bW.document.nodeType!==11){return bV}}}catch(bX){}}return by(bY,null,null,[bW]).length>0}}})();(function(){var e=av.createElement("div");e.innerHTML="
                          ";if(!e.getElementsByClassName||e.getElementsByClassName("e").length===0){return}e.lastChild.className="e";if(e.getElementsByClassName("e").length===1){return}bE.order.splice(1,0,"CLASS");bE.find.CLASS=function(bR,bS,bT){if(typeof bS.getElementsByClassName!=="undefined"&&!bT){return bS.getElementsByClassName(bR[1])}};e=null})();function bv(bR,bW,bV,bZ,bX,bY){for(var bT=0,bS=bZ.length;bT0){bU=e;break}}}e=e[bR]}bZ[bT]=bU}}}if(av.documentElement.contains){by.contains=function(bR,e){return bR!==e&&(bR.contains?bR.contains(e):true)}}else{if(av.documentElement.compareDocumentPosition){by.contains=function(bR,e){return !!(bR.compareDocumentPosition(e)&16)}}else{by.contains=function(){return false}}}by.isXML=function(e){var bR=(e?e.ownerDocument||e:0).documentElement;return bR?bR.nodeName!=="HTML":false};var bM=function(bS,e,bW){var bV,bX=[],bU="",bY=e.nodeType?[e]:e;while((bV=bE.match.PSEUDO.exec(bS))){bU+=bV[0];bS=bS.replace(bE.match.PSEUDO,"")}bS=bE.relative[bS]?bS+"*":bS;for(var bT=0,bR=bY.length;bT0){for(bB=bA;bB=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(by,bx){var bv=[],bw,e,bz=this[0];if(b.isArray(by)){var bB=1;while(bz&&bz.ownerDocument&&bz!==bx){for(bw=0;bw-1:b.find.matchesSelector(bz,by)){bv.push(bz);break}else{bz=bz.parentNode;if(!bz||!bz.ownerDocument||bz===bx||bz.nodeType===11){break}}}}bv=bv.length>1?b.unique(bv):bv;return this.pushStack(bv,"closest",by)},index:function(e){if(!e){return(this[0]&&this[0].parentNode)?this.prevAll().length:-1}if(typeof e==="string"){return b.inArray(this[0],b(e))}return b.inArray(e.jquery?e[0]:e,this)},add:function(e,bv){var bx=typeof e==="string"?b(e,bv):b.makeArray(e&&e.nodeType?[e]:e),bw=b.merge(this.get(),bx);return this.pushStack(C(bx[0])||C(bw[0])?bw:b.unique(bw))},andSelf:function(){return this.add(this.prevObject)}});function C(e){return !e||!e.parentNode||e.parentNode.nodeType===11}b.each({parent:function(bv){var e=bv.parentNode;return e&&e.nodeType!==11?e:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(bv,e,bw){return b.dir(bv,"parentNode",bw)},next:function(e){return b.nth(e,2,"nextSibling")},prev:function(e){return b.nth(e,2,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(bv,e,bw){return b.dir(bv,"nextSibling",bw)},prevUntil:function(bv,e,bw){return b.dir(bv,"previousSibling",bw)},siblings:function(e){return b.sibling(e.parentNode.firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.makeArray(e.childNodes)}},function(e,bv){b.fn[e]=function(by,bw){var bx=b.map(this,bv,by);if(!ab.test(e)){bw=by}if(bw&&typeof bw==="string"){bx=b.filter(bw,bx)}bx=this.length>1&&!ay[e]?b.unique(bx):bx;if((this.length>1||a9.test(bw))&&aq.test(e)){bx=bx.reverse()}return this.pushStack(bx,e,P.call(arguments).join(","))}});b.extend({filter:function(bw,e,bv){if(bv){bw=":not("+bw+")"}return e.length===1?b.find.matchesSelector(e[0],bw)?[e[0]]:[]:b.find.matches(bw,e)},dir:function(bw,bv,by){var e=[],bx=bw[bv];while(bx&&bx.nodeType!==9&&(by===L||bx.nodeType!==1||!b(bx).is(by))){if(bx.nodeType===1){e.push(bx)}bx=bx[bv]}return e},nth:function(by,e,bw,bx){e=e||1;var bv=0;for(;by;by=by[bw]){if(by.nodeType===1&&++bv===e){break}}return by},sibling:function(bw,bv){var e=[];for(;bw;bw=bw.nextSibling){if(bw.nodeType===1&&bw!==bv){e.push(bw)}}return e}});function aG(bx,bw,e){bw=bw||0;if(b.isFunction(bw)){return b.grep(bx,function(bz,by){var bA=!!bw.call(bz,by,bz);return bA===e})}else{if(bw.nodeType){return b.grep(bx,function(bz,by){return(bz===bw)===e})}else{if(typeof bw==="string"){var bv=b.grep(bx,function(by){return by.nodeType===1});if(bp.test(bw)){return b.filter(bw,bv,!e)}else{bw=b.filter(bw,bv)}}}}return b.grep(bx,function(bz,by){return(b.inArray(bz,bw)>=0)===e})}function a(e){var bw=aR.split("|"),bv=e.createDocumentFragment();if(bv.createElement){while(bw.length){bv.createElement(bw.pop())}}return bv}var aR="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ag=/ jQuery\d+="(?:\d+|null)"/g,ar=/^\s+/,R=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,d=/<([\w:]+)/,w=/",""],legend:[1,"
                          ","
                          "],thead:[1,"","
                          "],tr:[2,"","
                          "],td:[3,"","
                          "],col:[2,"","
                          "],area:[1,"",""],_default:[0,"",""]},ac=a(av);ax.optgroup=ax.option;ax.tbody=ax.tfoot=ax.colgroup=ax.caption=ax.thead;ax.th=ax.td;if(!b.support.htmlSerialize){ax._default=[1,"div
                          ","
                          "]}b.fn.extend({text:function(e){if(b.isFunction(e)){return this.each(function(bw){var bv=b(this);bv.text(e.call(this,bw,bv.text()))})}if(typeof e!=="object"&&e!==L){return this.empty().append((this[0]&&this[0].ownerDocument||av).createTextNode(e))}return b.text(this)},wrapAll:function(e){if(b.isFunction(e)){return this.each(function(bw){b(this).wrapAll(e.call(this,bw))})}if(this[0]){var bv=b(e,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){bv.insertBefore(this[0])}bv.map(function(){var bw=this;while(bw.firstChild&&bw.firstChild.nodeType===1){bw=bw.firstChild}return bw}).append(this)}return this},wrapInner:function(e){if(b.isFunction(e)){return this.each(function(bv){b(this).wrapInner(e.call(this,bv))})}return this.each(function(){var bv=b(this),bw=bv.contents();if(bw.length){bw.wrapAll(e)}else{bv.append(e)}})},wrap:function(e){var bv=b.isFunction(e);return this.each(function(bw){b(this).wrapAll(bv?e.call(this,bw):e)})},unwrap:function(){return this.parent().each(function(){if(!b.nodeName(this,"body")){b(this).replaceWith(this.childNodes)}}).end()},append:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.appendChild(e)}})},prepend:function(){return this.domManip(arguments,true,function(e){if(this.nodeType===1){this.insertBefore(e,this.firstChild)}})},before:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this)})}else{if(arguments.length){var e=b.clean(arguments);e.push.apply(e,this.toArray());return this.pushStack(e,"before",arguments)}}},after:function(){if(this[0]&&this[0].parentNode){return this.domManip(arguments,false,function(bv){this.parentNode.insertBefore(bv,this.nextSibling)})}else{if(arguments.length){var e=this.pushStack(this,"after",arguments);e.push.apply(e,b.clean(arguments));return e}}},remove:function(e,bx){for(var bv=0,bw;(bw=this[bv])!=null;bv++){if(!e||b.filter(e,[bw]).length){if(!bx&&bw.nodeType===1){b.cleanData(bw.getElementsByTagName("*"));b.cleanData([bw])}if(bw.parentNode){bw.parentNode.removeChild(bw)}}}return this},empty:function(){for(var e=0,bv;(bv=this[e])!=null;e++){if(bv.nodeType===1){b.cleanData(bv.getElementsByTagName("*"))}while(bv.firstChild){bv.removeChild(bv.firstChild)}}return this},clone:function(bv,e){bv=bv==null?false:bv;e=e==null?bv:e;return this.map(function(){return b.clone(this,bv,e)})},html:function(bx){if(bx===L){return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(ag,""):null}else{if(typeof bx==="string"&&!ae.test(bx)&&(b.support.leadingWhitespace||!ar.test(bx))&&!ax[(d.exec(bx)||["",""])[1].toLowerCase()]){bx=bx.replace(R,"<$1>");try{for(var bw=0,bv=this.length;bw1&&bw0?this.clone(true):this).get();b(bC[bA])[bv](by);bz=bz.concat(by)}return this.pushStack(bz,e,bC.selector)}}});function bg(e){if(typeof e.getElementsByTagName!=="undefined"){return e.getElementsByTagName("*")}else{if(typeof e.querySelectorAll!=="undefined"){return e.querySelectorAll("*")}else{return[]}}}function az(e){if(e.type==="checkbox"||e.type==="radio"){e.defaultChecked=e.checked}}function E(e){var bv=(e.nodeName||"").toLowerCase();if(bv==="input"){az(e)}else{if(bv!=="script"&&typeof e.getElementsByTagName!=="undefined"){b.grep(e.getElementsByTagName("input"),az)}}}function al(e){var bv=av.createElement("div");ac.appendChild(bv);bv.innerHTML=e.outerHTML;return bv.firstChild}b.extend({clone:function(by,bA,bw){var e,bv,bx,bz=b.support.html5Clone||!ah.test("<"+by.nodeName)?by.cloneNode(true):al(by);if((!b.support.noCloneEvent||!b.support.noCloneChecked)&&(by.nodeType===1||by.nodeType===11)&&!b.isXMLDoc(by)){ai(by,bz);e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){if(bv[bx]){ai(e[bx],bv[bx])}}}if(bA){t(by,bz);if(bw){e=bg(by);bv=bg(bz);for(bx=0;e[bx];++bx){t(e[bx],bv[bx])}}}e=bv=null;return bz},clean:function(bw,by,bH,bA){var bF;by=by||av;if(typeof by.createElement==="undefined"){by=by.ownerDocument||by[0]&&by[0].ownerDocument||av}var bI=[],bB;for(var bE=0,bz;(bz=bw[bE])!=null;bE++){if(typeof bz==="number"){bz+=""}if(!bz){continue}if(typeof bz==="string"){if(!W.test(bz)){bz=by.createTextNode(bz)}else{bz=bz.replace(R,"<$1>");var bK=(d.exec(bz)||["",""])[1].toLowerCase(),bx=ax[bK]||ax._default,bD=bx[0],bv=by.createElement("div");if(by===av){ac.appendChild(bv)}else{a(by).appendChild(bv)}bv.innerHTML=bx[1]+bz+bx[2];while(bD--){bv=bv.lastChild}if(!b.support.tbody){var e=w.test(bz),bC=bK==="table"&&!e?bv.firstChild&&bv.firstChild.childNodes:bx[1]===""&&!e?bv.childNodes:[];for(bB=bC.length-1;bB>=0;--bB){if(b.nodeName(bC[bB],"tbody")&&!bC[bB].childNodes.length){bC[bB].parentNode.removeChild(bC[bB])}}}if(!b.support.leadingWhitespace&&ar.test(bz)){bv.insertBefore(by.createTextNode(ar.exec(bz)[0]),bv.firstChild)}bz=bv.childNodes}}var bG;if(!b.support.appendChecked){if(bz[0]&&typeof(bG=bz.length)==="number"){for(bB=0;bB=0){return bx+"px"}}else{return bx}}}});if(!b.support.opacity){b.cssHooks.opacity={get:function(bv,e){return au.test((e&&bv.currentStyle?bv.currentStyle.filter:bv.style.filter)||"")?(parseFloat(RegExp.$1)/100)+"":e?"1":""},set:function(by,bz){var bx=by.style,bv=by.currentStyle,e=b.isNumeric(bz)?"alpha(opacity="+bz*100+")":"",bw=bv&&bv.filter||bx.filter||"";bx.zoom=1;if(bz>=1&&b.trim(bw.replace(ak,""))===""){bx.removeAttribute("filter");if(bv&&!bv.filter){return}}bx.filter=ak.test(bw)?bw.replace(ak,e):bw+" "+e}}}b(function(){if(!b.support.reliableMarginRight){b.cssHooks.marginRight={get:function(bw,bv){var e;b.swap(bw,{display:"inline-block"},function(){if(bv){e=Z(bw,"margin-right","marginRight")}else{e=bw.style.marginRight}});return e}}}});if(av.defaultView&&av.defaultView.getComputedStyle){aI=function(by,bw){var bv,bx,e;bw=bw.replace(z,"-$1").toLowerCase();if((bx=by.ownerDocument.defaultView)&&(e=bx.getComputedStyle(by,null))){bv=e.getPropertyValue(bw);if(bv===""&&!b.contains(by.ownerDocument.documentElement,by)){bv=b.style(by,bw)}}return bv}}if(av.documentElement.currentStyle){aX=function(bz,bw){var bA,e,by,bv=bz.currentStyle&&bz.currentStyle[bw],bx=bz.style;if(bv===null&&bx&&(by=bx[bw])){bv=by}if(!bc.test(bv)&&bn.test(bv)){bA=bx.left;e=bz.runtimeStyle&&bz.runtimeStyle.left;if(e){bz.runtimeStyle.left=bz.currentStyle.left}bx.left=bw==="fontSize"?"1em":(bv||0);bv=bx.pixelLeft+"px";bx.left=bA;if(e){bz.runtimeStyle.left=e}}return bv===""?"auto":bv}}Z=aI||aX;function p(by,bw,bv){var bA=bw==="width"?by.offsetWidth:by.offsetHeight,bz=bw==="width"?an:a1,bx=0,e=bz.length;if(bA>0){if(bv!=="border"){for(;bx)<[^<]*)*<\/script>/gi,q=/^(?:select|textarea)/i,h=/\s+/,br=/([?&])_=[^&]*/,K=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,A=b.fn.load,aa={},r={},aE,s,aV=["*/"]+["*"];try{aE=bl.href}catch(aw){aE=av.createElement("a");aE.href="";aE=aE.href}s=K.exec(aE.toLowerCase())||[];function f(e){return function(by,bA){if(typeof by!=="string"){bA=by;by="*"}if(b.isFunction(bA)){var bx=by.toLowerCase().split(h),bw=0,bz=bx.length,bv,bB,bC;for(;bw=0){var e=bw.slice(by,bw.length);bw=bw.slice(0,by)}var bx="GET";if(bz){if(b.isFunction(bz)){bA=bz;bz=L}else{if(typeof bz==="object"){bz=b.param(bz,b.ajaxSettings.traditional);bx="POST"}}}var bv=this;b.ajax({url:bw,type:bx,dataType:"html",data:bz,complete:function(bC,bB,bD){bD=bC.responseText;if(bC.isResolved()){bC.done(function(bE){bD=bE});bv.html(e?b("
                          ").append(bD.replace(a6,"")).find(e):bD)}if(bA){bv.each(bA,[bD,bB,bC])}}});return this},serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?b.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||q.test(this.nodeName)||aZ.test(this.type))}).map(function(e,bv){var bw=b(this).val();return bw==null?null:b.isArray(bw)?b.map(bw,function(by,bx){return{name:bv.name,value:by.replace(bs,"\r\n")}}):{name:bv.name,value:bw.replace(bs,"\r\n")}}).get()}});b.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,bv){b.fn[bv]=function(bw){return this.on(bv,bw)}});b.each(["get","post"],function(e,bv){b[bv]=function(bw,by,bz,bx){if(b.isFunction(by)){bx=bx||bz;bz=by;by=L}return b.ajax({type:bv,url:bw,data:by,success:bz,dataType:bx})}});b.extend({getScript:function(e,bv){return b.get(e,L,bv,"script")},getJSON:function(e,bv,bw){return b.get(e,bv,bw,"json")},ajaxSetup:function(bv,e){if(e){am(bv,b.ajaxSettings)}else{e=bv;bv=b.ajaxSettings}am(bv,e);return bv},ajaxSettings:{url:aE,isLocal:aM.test(s[1]),global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":aV},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":bb.String,"text html":true,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{context:true,url:true}},ajaxPrefilter:f(aa),ajaxTransport:f(r),ajax:function(bz,bx){if(typeof bz==="object"){bx=bz;bz=L}bx=bx||{};var bD=b.ajaxSetup({},bx),bS=bD.context||bD,bG=bS!==bD&&(bS.nodeType||bS instanceof b)?b(bS):b.event,bR=b.Deferred(),bN=b.Callbacks("once memory"),bB=bD.statusCode||{},bC,bH={},bO={},bQ,by,bL,bE,bI,bA=0,bw,bK,bJ={readyState:0,setRequestHeader:function(bT,bU){if(!bA){var e=bT.toLowerCase();bT=bO[e]=bO[e]||bT;bH[bT]=bU}return this},getAllResponseHeaders:function(){return bA===2?bQ:null},getResponseHeader:function(bT){var e;if(bA===2){if(!by){by={};while((e=aD.exec(bQ))){by[e[1].toLowerCase()]=e[2]}}e=by[bT.toLowerCase()]}return e===L?null:e},overrideMimeType:function(e){if(!bA){bD.mimeType=e}return this},abort:function(e){e=e||"abort";if(bL){bL.abort(e)}bF(0,e);return this}};function bF(bZ,bU,b0,bW){if(bA===2){return}bA=2;if(bE){clearTimeout(bE)}bL=L;bQ=bW||"";bJ.readyState=bZ>0?4:0;var bT,b4,b3,bX=bU,bY=b0?bj(bD,bJ,b0):L,bV,b2;if(bZ>=200&&bZ<300||bZ===304){if(bD.ifModified){if((bV=bJ.getResponseHeader("Last-Modified"))){b.lastModified[bC]=bV}if((b2=bJ.getResponseHeader("Etag"))){b.etag[bC]=b2}}if(bZ===304){bX="notmodified";bT=true}else{try{b4=G(bD,bY);bX="success";bT=true}catch(b1){bX="parsererror";b3=b1}}}else{b3=bX;if(!bX||bZ){bX="error";if(bZ<0){bZ=0}}}bJ.status=bZ;bJ.statusText=""+(bU||bX);if(bT){bR.resolveWith(bS,[b4,bX,bJ])}else{bR.rejectWith(bS,[bJ,bX,b3])}bJ.statusCode(bB);bB=L;if(bw){bG.trigger("ajax"+(bT?"Success":"Error"),[bJ,bD,bT?b4:b3])}bN.fireWith(bS,[bJ,bX]);if(bw){bG.trigger("ajaxComplete",[bJ,bD]);if(!(--b.active)){b.event.trigger("ajaxStop")}}}bR.promise(bJ);bJ.success=bJ.done;bJ.error=bJ.fail;bJ.complete=bN.add;bJ.statusCode=function(bT){if(bT){var e;if(bA<2){for(e in bT){bB[e]=[bB[e],bT[e]]}}else{e=bT[bJ.status];bJ.then(e,e)}}return this};bD.url=((bz||bD.url)+"").replace(bq,"").replace(c,s[1]+"//");bD.dataTypes=b.trim(bD.dataType||"*").toLowerCase().split(h);if(bD.crossDomain==null){bI=K.exec(bD.url.toLowerCase());bD.crossDomain=!!(bI&&(bI[1]!=s[1]||bI[2]!=s[2]||(bI[3]||(bI[1]==="http:"?80:443))!=(s[3]||(s[1]==="http:"?80:443))))}if(bD.data&&bD.processData&&typeof bD.data!=="string"){bD.data=b.param(bD.data,bD.traditional)}aW(aa,bD,bx,bJ);if(bA===2){return false}bw=bD.global;bD.type=bD.type.toUpperCase();bD.hasContent=!aQ.test(bD.type);if(bw&&b.active++===0){b.event.trigger("ajaxStart")}if(!bD.hasContent){if(bD.data){bD.url+=(M.test(bD.url)?"&":"?")+bD.data;delete bD.data}bC=bD.url;if(bD.cache===false){var bv=b.now(),bP=bD.url.replace(br,"$1_="+bv);bD.url=bP+((bP===bD.url)?(M.test(bD.url)?"&":"?")+"_="+bv:"")}}if(bD.data&&bD.hasContent&&bD.contentType!==false||bx.contentType){bJ.setRequestHeader("Content-Type",bD.contentType)}if(bD.ifModified){bC=bC||bD.url;if(b.lastModified[bC]){bJ.setRequestHeader("If-Modified-Since",b.lastModified[bC])}if(b.etag[bC]){bJ.setRequestHeader("If-None-Match",b.etag[bC])}}bJ.setRequestHeader("Accept",bD.dataTypes[0]&&bD.accepts[bD.dataTypes[0]]?bD.accepts[bD.dataTypes[0]]+(bD.dataTypes[0]!=="*"?", "+aV+"; q=0.01":""):bD.accepts["*"]);for(bK in bD.headers){bJ.setRequestHeader(bK,bD.headers[bK])}if(bD.beforeSend&&(bD.beforeSend.call(bS,bJ,bD)===false||bA===2)){bJ.abort();return false}for(bK in {success:1,error:1,complete:1}){bJ[bK](bD[bK])}bL=aW(r,bD,bx,bJ);if(!bL){bF(-1,"No Transport")}else{bJ.readyState=1;if(bw){bG.trigger("ajaxSend",[bJ,bD])}if(bD.async&&bD.timeout>0){bE=setTimeout(function(){bJ.abort("timeout")},bD.timeout)}try{bA=1;bL.send(bH,bF)}catch(bM){if(bA<2){bF(-1,bM)}else{throw bM}}}return bJ},param:function(e,bw){var bv=[],by=function(bz,bA){bA=b.isFunction(bA)?bA():bA;bv[bv.length]=encodeURIComponent(bz)+"="+encodeURIComponent(bA)};if(bw===L){bw=b.ajaxSettings.traditional}if(b.isArray(e)||(e.jquery&&!b.isPlainObject(e))){b.each(e,function(){by(this.name,this.value)})}else{for(var bx in e){v(bx,e[bx],bw,by)}}return bv.join("&").replace(k,"+")}});function v(bw,by,bv,bx){if(b.isArray(by)){b.each(by,function(bA,bz){if(bv||ap.test(bw)){bx(bw,bz)}else{v(bw+"["+(typeof bz==="object"||b.isArray(bz)?bA:"")+"]",bz,bv,bx)}})}else{if(!bv&&by!=null&&typeof by==="object"){for(var e in by){v(bw+"["+e+"]",by[e],bv,bx)}}else{bx(bw,by)}}}b.extend({active:0,lastModified:{},etag:{}});function bj(bD,bC,bz){var bv=bD.contents,bB=bD.dataTypes,bw=bD.responseFields,by,bA,bx,e;for(bA in bw){if(bA in bz){bC[bw[bA]]=bz[bA]}}while(bB[0]==="*"){bB.shift();if(by===L){by=bD.mimeType||bC.getResponseHeader("content-type")}}if(by){for(bA in bv){if(bv[bA]&&bv[bA].test(by)){bB.unshift(bA);break}}}if(bB[0] in bz){bx=bB[0]}else{for(bA in bz){if(!bB[0]||bD.converters[bA+" "+bB[0]]){bx=bA;break}if(!e){e=bA}}bx=bx||e}if(bx){if(bx!==bB[0]){bB.unshift(bx)}return bz[bx]}}function G(bH,bz){if(bH.dataFilter){bz=bH.dataFilter(bz,bH.dataType)}var bD=bH.dataTypes,bG={},bA,bE,bw=bD.length,bB,bC=bD[0],bx,by,bF,bv,e;for(bA=1;bA=bw.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();bw.animatedProperties[this.prop]=true;for(bA in bw.animatedProperties){if(bw.animatedProperties[bA]!==true){e=false}}if(e){if(bw.overflow!=null&&!b.support.shrinkWrapBlocks){b.each(["","X","Y"],function(bC,bD){bz.style["overflow"+bD]=bw.overflow[bC]})}if(bw.hide){b(bz).hide()}if(bw.hide||bw.show){for(bA in bw.animatedProperties){b.style(bz,bA,bw.orig[bA]);b.removeData(bz,"fxshow"+bA,true);b.removeData(bz,"toggle"+bA,true)}}bv=bw.complete;if(bv){bw.complete=false;bv.call(bz)}}return false}else{if(bw.duration==Infinity){this.now=bx}else{bB=bx-this.startTime;this.state=bB/bw.duration;this.pos=b.easing[bw.animatedProperties[this.prop]](this.state,bB,0,1,bw.duration);this.now=this.start+((this.end-this.start)*this.pos)}this.update()}return true}};b.extend(b.fx,{tick:function(){var bw,bv=b.timers,e=0;for(;e").appendTo(e),bw=bv.css("display");bv.remove();if(bw==="none"||bw===""){if(!a8){a8=av.createElement("iframe");a8.frameBorder=a8.width=a8.height=0}e.appendChild(a8);if(!m||!a8.createElement){m=(a8.contentWindow||a8.contentDocument).document;m.write((av.compatMode==="CSS1Compat"?"":"")+"");m.close()}bv=m.createElement(bx);m.body.appendChild(bv);bw=b.css(bv,"display");e.removeChild(a8)}Q[bx]=bw}return Q[bx]}var V=/^t(?:able|d|h)$/i,ad=/^(?:body|html)$/i;if("getBoundingClientRect" in av.documentElement){b.fn.offset=function(bI){var by=this[0],bB;if(bI){return this.each(function(e){b.offset.setOffset(this,bI,e)})}if(!by||!by.ownerDocument){return null}if(by===by.ownerDocument.body){return b.offset.bodyOffset(by)}try{bB=by.getBoundingClientRect()}catch(bF){}var bH=by.ownerDocument,bw=bH.documentElement;if(!bB||!b.contains(bw,by)){return bB?{top:bB.top,left:bB.left}:{top:0,left:0}}var bC=bH.body,bD=aK(bH),bA=bw.clientTop||bC.clientTop||0,bE=bw.clientLeft||bC.clientLeft||0,bv=bD.pageYOffset||b.support.boxModel&&bw.scrollTop||bC.scrollTop,bz=bD.pageXOffset||b.support.boxModel&&bw.scrollLeft||bC.scrollLeft,bG=bB.top+bv-bA,bx=bB.left+bz-bE;return{top:bG,left:bx}}}else{b.fn.offset=function(bF){var bz=this[0];if(bF){return this.each(function(bG){b.offset.setOffset(this,bF,bG)})}if(!bz||!bz.ownerDocument){return null}if(bz===bz.ownerDocument.body){return b.offset.bodyOffset(bz)}var bC,bw=bz.offsetParent,bv=bz,bE=bz.ownerDocument,bx=bE.documentElement,bA=bE.body,bB=bE.defaultView,e=bB?bB.getComputedStyle(bz,null):bz.currentStyle,bD=bz.offsetTop,by=bz.offsetLeft;while((bz=bz.parentNode)&&bz!==bA&&bz!==bx){if(b.support.fixedPosition&&e.position==="fixed"){break}bC=bB?bB.getComputedStyle(bz,null):bz.currentStyle;bD-=bz.scrollTop;by-=bz.scrollLeft;if(bz===bw){bD+=bz.offsetTop;by+=bz.offsetLeft;if(b.support.doesNotAddBorder&&!(b.support.doesAddBorderForTableAndCells&&V.test(bz.nodeName))){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}bv=bw;bw=bz.offsetParent}if(b.support.subtractsBorderForOverflowNotVisible&&bC.overflow!=="visible"){bD+=parseFloat(bC.borderTopWidth)||0;by+=parseFloat(bC.borderLeftWidth)||0}e=bC}if(e.position==="relative"||e.position==="static"){bD+=bA.offsetTop;by+=bA.offsetLeft}if(b.support.fixedPosition&&e.position==="fixed"){bD+=Math.max(bx.scrollTop,bA.scrollTop);by+=Math.max(bx.scrollLeft,bA.scrollLeft)}return{top:bD,left:by}}}b.offset={bodyOffset:function(e){var bw=e.offsetTop,bv=e.offsetLeft;if(b.support.doesNotIncludeMarginInBodyOffset){bw+=parseFloat(b.css(e,"marginTop"))||0;bv+=parseFloat(b.css(e,"marginLeft"))||0}return{top:bw,left:bv}},setOffset:function(bx,bG,bA){var bB=b.css(bx,"position");if(bB==="static"){bx.style.position="relative"}var bz=b(bx),bv=bz.offset(),e=b.css(bx,"top"),bE=b.css(bx,"left"),bF=(bB==="absolute"||bB==="fixed")&&b.inArray("auto",[e,bE])>-1,bD={},bC={},bw,by;if(bF){bC=bz.position();bw=bC.top;by=bC.left}else{bw=parseFloat(e)||0;by=parseFloat(bE)||0}if(b.isFunction(bG)){bG=bG.call(bx,bA,bv)}if(bG.top!=null){bD.top=(bG.top-bv.top)+bw}if(bG.left!=null){bD.left=(bG.left-bv.left)+by}if("using" in bG){bG.using.call(bx,bD)}else{bz.css(bD)}}};b.fn.extend({position:function(){if(!this[0]){return null}var bw=this[0],bv=this.offsetParent(),bx=this.offset(),e=ad.test(bv[0].nodeName)?{top:0,left:0}:bv.offset();bx.top-=parseFloat(b.css(bw,"marginTop"))||0;bx.left-=parseFloat(b.css(bw,"marginLeft"))||0;e.top+=parseFloat(b.css(bv[0],"borderTopWidth"))||0;e.left+=parseFloat(b.css(bv[0],"borderLeftWidth"))||0;return{top:bx.top-e.top,left:bx.left-e.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||av.body;while(e&&(!ad.test(e.nodeName)&&b.css(e,"position")==="static")){e=e.offsetParent}return e})}});b.each(["Left","Top"],function(bv,e){var bw="scroll"+e;b.fn[bw]=function(bz){var bx,by;if(bz===L){bx=this[0];if(!bx){return null}by=aK(bx);return by?("pageXOffset" in by)?by[bv?"pageYOffset":"pageXOffset"]:b.support.boxModel&&by.document.documentElement[bw]||by.document.body[bw]:bx[bw]}return this.each(function(){by=aK(this);if(by){by.scrollTo(!bv?bz:b(by).scrollLeft(),bv?bz:b(by).scrollTop())}else{this[bw]=bz}})}});function aK(e){return b.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:false}b.each(["Height","Width"],function(bv,e){var bw=e.toLowerCase();b.fn["inner"+e]=function(){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,"padding")):this[bw]():null};b.fn["outer"+e]=function(by){var bx=this[0];return bx?bx.style?parseFloat(b.css(bx,bw,by?"margin":"border")):this[bw]():null};b.fn[bw]=function(bz){var bA=this[0];if(!bA){return bz==null?null:this}if(b.isFunction(bz)){return this.each(function(bE){var bD=b(this);bD[bw](bz.call(this,bE,bD[bw]()))})}if(b.isWindow(bA)){var bB=bA.document.documentElement["client"+e],bx=bA.document.body;return bA.document.compatMode==="CSS1Compat"&&bB||bx&&bx["client"+e]||bB}else{if(bA.nodeType===9){return Math.max(bA.documentElement["client"+e],bA.body["scroll"+e],bA.documentElement["scroll"+e],bA.body["offset"+e],bA.documentElement["offset"+e])}else{if(bz===L){var bC=b.css(bA,bw),by=parseFloat(bC);return b.isNumeric(by)?by:bC}else{return this.css(bw,typeof bz==="string"?bz:bz+"px")}}}}});bb.jQuery=bb.$=b;if(typeof define==="function"&&define.amd&&define.amd.jQuery){define("jquery",[],function(){return b})}})(window);/* - * jQuery UI 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI - */ -(function(a,d){a.ui=a.ui||{};if(a.ui.version){return}a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(e,f){return typeof e==="number"?this.each(function(){var g=this;setTimeout(function(){a(g).focus();if(f){f.call(g)}},e)}):this._focus.apply(this,arguments)},scrollParent:function(){var e;if((a.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){e=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(a.curCSS(this,"position",1))&&(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}else{e=this.parents().filter(function(){return(/(auto|scroll)/).test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!e.length?a(document):e},zIndex:function(h){if(h!==d){return this.css("zIndex",h)}if(this.length){var f=a(this[0]),e,g;while(f.length&&f[0]!==document){e=f.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){g=parseInt(f.css("zIndex"),10);if(!isNaN(g)&&g!==0){return g}}f=f.parent()}}return 0},disableSelection:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(e){e.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});a.each(["Width","Height"],function(g,e){var f=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),k={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function j(m,l,i,n){a.each(f,function(){l-=parseFloat(a.curCSS(m,"padding"+this,true))||0;if(i){l-=parseFloat(a.curCSS(m,"border"+this+"Width",true))||0}if(n){l-=parseFloat(a.curCSS(m,"margin"+this,true))||0}});return l}a.fn["inner"+e]=function(i){if(i===d){return k["inner"+e].call(this)}return this.each(function(){a(this).css(h,j(this,i)+"px")})};a.fn["outer"+e]=function(i,l){if(typeof i!=="number"){return k["outer"+e].call(this,i)}return this.each(function(){a(this).css(h,j(this,i,true,l)+"px")})}});function c(g,e){var j=g.nodeName.toLowerCase();if("area"===j){var i=g.parentNode,h=i.name,f;if(!g.href||!h||i.nodeName.toLowerCase()!=="map"){return false}f=a("img[usemap=#"+h+"]")[0];return !!f&&b(f)}return(/input|select|textarea|button|object/.test(j)?!g.disabled:"a"==j?g.href||e:e)&&b(g)}function b(e){return !a(e).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}a.extend(a.expr[":"],{data:function(g,f,e){return !!a.data(g,e[3])},focusable:function(e){return c(e,!isNaN(a.attr(e,"tabindex")))},tabbable:function(g){var e=a.attr(g,"tabindex"),f=isNaN(e);return(f||e>=0)&&c(g,!f)}});a(function(){var e=document.body,f=e.appendChild(f=document.createElement("div"));f.offsetHeight;a.extend(f.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});a.support.minHeight=f.offsetHeight===100;a.support.selectstart="onselectstart" in f;e.removeChild(f).style.display="none"});a.extend(a.ui,{plugin:{add:function(f,g,j){var h=a.ui[f].prototype;for(var e in j){h.plugins[e]=h.plugins[e]||[];h.plugins[e].push([g,j[e]])}},call:function(e,g,f){var j=e.plugins[g];if(!j||!e.element[0].parentNode){return}for(var h=0;h0){return true}h[e]=1;g=(h[e]>0);h[e]=0;return g},isOverAxis:function(f,e,g){return(f>e)&&(f<(e+g))},isOver:function(j,f,i,h,e,g){return a.ui.isOverAxis(j,i,e)&&a.ui.isOverAxis(f,h,g)}})})(jQuery);/* - * jQuery UI Widget 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Widget - */ -(function(b,d){if(b.cleanData){var c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)}}else{var a=b.fn.remove;b.fn.remove=function(e,f){return this.each(function(){if(!f){if(!e||b.filter(e,[this]).length){b("*",this).add([this]).each(function(){try{b(this).triggerHandler("remove")}catch(g){}})}}return a.call(b(this),e,f)})}}b.widget=function(f,h,e){var g=f.split(".")[0],j;f=f.split(".")[1];j=g+"-"+f;if(!e){e=h;h=b.Widget}b.expr[":"][j]=function(k){return !!b.data(k,f)};b[g]=b[g]||{};b[g][f]=function(k,l){if(arguments.length){this._createWidget(k,l)}};var i=new h();i.options=b.extend(true,{},i.options);b[g][f].prototype=b.extend(true,i,{namespace:g,widgetName:f,widgetEventPrefix:b[g][f].prototype.widgetEventPrefix||f,widgetBaseClass:j},e);b.widget.bridge(f,b[g][f])};b.widget.bridge=function(f,e){b.fn[f]=function(i){var g=typeof i==="string",h=Array.prototype.slice.call(arguments,1),j=this;i=!g&&h.length?b.extend.apply(null,[true,i].concat(h)):i;if(g&&i.charAt(0)==="_"){return j}if(g){this.each(function(){var k=b.data(this,f),l=k&&b.isFunction(k[i])?k[i].apply(k,h):k;if(l!==k&&l!==d){j=l;return false}})}else{this.each(function(){var k=b.data(this,f);if(k){k.option(i||{})._init()}else{b.data(this,f,new e(i,this))}})}return j}};b.Widget=function(e,f){if(arguments.length){this._createWidget(e,f)}};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(f,g){b.data(g,this.widgetName,this);this.element=b(g);this.options=b.extend(true,{},this.options,this._getCreateOptions(),f);var e=this;this.element.bind("remove."+this.widgetName,function(){e.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(f,g){var e=f;if(arguments.length===0){return b.extend({},this.options)}if(typeof f==="string"){if(g===d){return this.options[f]}e={};e[f]=g}this._setOptions(e);return this},_setOptions:function(f){var e=this;b.each(f,function(g,h){e._setOption(g,h)});return this},_setOption:function(e,f){this.options[e]=f;if(e==="disabled"){this.widget()[f?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",f)}return this},enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,f,g){var j,i,h=this.options[e];g=g||{};f=b.Event(f);f.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();f.target=this.element[0];i=f.originalEvent;if(i){for(j in i){if(!(j in f)){f[j]=i[j]}}}this.element.trigger(f,g);return !(b.isFunction(h)&&h.call(this.element[0],f,g)===false||f.isDefaultPrevented())}}})(jQuery);/* - * jQuery UI Mouse 1.8.18 - * - * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * http://docs.jquery.com/UI/Mouse - * - * Depends: - * jquery.ui.widget.js - */ -(function(b,c){var a=false;b(document).mouseup(function(d){a=false});b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var d=this;this.element.bind("mousedown."+this.widgetName,function(e){return d._mouseDown(e)}).bind("click."+this.widgetName,function(e){if(true===b.data(e.target,d.widgetName+".preventClickEvent")){b.removeData(e.target,d.widgetName+".preventClickEvent");e.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(f){if(a){return}(this._mouseStarted&&this._mouseUp(f));this._mouseDownEvent=f;var e=this,g=(f.which==1),d=(typeof this.options.cancel=="string"&&f.target.nodeName?b(f.target).closest(this.options.cancel).length:false);if(!g||d||!this._mouseCapture(f)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(f)&&this._mouseDelayMet(f)){this._mouseStarted=(this._mouseStart(f)!==false);if(!this._mouseStarted){f.preventDefault();return true}}if(true===b.data(f.target,this.widgetName+".preventClickEvent")){b.removeData(f.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(h){return e._mouseMove(h)};this._mouseUpDelegate=function(h){return e._mouseUp(h)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);f.preventDefault();a=true;return true},_mouseMove:function(d){if(b.browser.msie&&!(document.documentMode>=9)&&!d.button){return this._mouseUp(d)}if(this._mouseStarted){this._mouseDrag(d);return d.preventDefault()}if(this._mouseDistanceMet(d)&&this._mouseDelayMet(d)){this._mouseStarted=(this._mouseStart(this._mouseDownEvent,d)!==false);(this._mouseStarted?this._mouseDrag(d):this._mouseUp(d))}return !this._mouseStarted},_mouseUp:function(d){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(d.target==this._mouseDownEvent.target){b.data(d.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(d)}return false},_mouseDistanceMet:function(d){return(Math.max(Math.abs(this._mouseDownEvent.pageX-d.pageX),Math.abs(this._mouseDownEvent.pageY-d.pageY))>=this.options.distance)},_mouseDelayMet:function(d){return this.mouseDelayMet},_mouseStart:function(d){},_mouseDrag:function(d){},_mouseStop:function(d){},_mouseCapture:function(d){return true}})})(jQuery);(function(c,d){c.widget("ui.resizable",c.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1000},_create:function(){var f=this,k=this.options;this.element.addClass("ui-resizable");c.extend(this,{_aspectRatio:!!(k.aspectRatio),aspectRatio:k.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:k.helper||k.ghost||k.animate?k.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(c('
                          ').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=k.handles||(!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all"){this.handles="n,e,s,w,se,sw,ne,nw"}var l=this.handles.split(",");this.handles={};for(var g=0;g
                          ');if(/sw|se|ne|nw/.test(j)){h.css({zIndex:++k.zIndex})}if("se"==j){h.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[j]=".ui-resizable-"+j;this.element.append(h)}}this._renderAxis=function(q){q=q||this.element;for(var n in this.handles){if(this.handles[n].constructor==String){this.handles[n]=c(this.handles[n],this.element).show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var o=c(this.handles[n],this.element),p=0;p=/sw|ne|nw|se|n|s/.test(n)?o.outerHeight():o.outerWidth();var m=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");q.css(m,p);this._proportionallyResize()}if(!c(this.handles[n]).length){continue}}};this._renderAxis(this.element);this._handles=c(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!f.resizing){if(this.className){var i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}f.axis=i&&i[1]?i[1]:"se"}});if(k.autoHide){this._handles.hide();c(this.element).addClass("ui-resizable-autohide").hover(function(){if(k.disabled){return}c(this).removeClass("ui-resizable-autohide");f._handles.show()},function(){if(k.disabled){return}if(!f.resizing){c(this).addClass("ui-resizable-autohide");f._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var e=function(g){c(g).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){e(this.element);var f=this.element;f.after(this.originalElement.css({position:f.css("position"),width:f.outerWidth(),height:f.outerHeight(),top:f.css("top"),left:f.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);e(this.originalElement);return this},_mouseCapture:function(f){var g=false;for(var e in this.handles){if(c(this.handles[e])[0]==f.target){g=true}}return !this.options.disabled&&g},_mouseStart:function(g){var j=this.options,f=this.element.position(),e=this.element;this.resizing=true;this.documentScroll={top:c(document).scrollTop(),left:c(document).scrollLeft()};if(e.is(".ui-draggable")||(/absolute/).test(e.css("position"))){e.css({position:"absolute",top:f.top,left:f.left})}this._renderProxy();var k=b(this.helper.css("left")),h=b(this.helper.css("top"));if(j.containment){k+=c(j.containment).scrollLeft()||0;h+=c(j.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:k,top:h};this.size=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalSize=this._helper?{width:e.outerWidth(),height:e.outerHeight()}:{width:e.width(),height:e.height()};this.originalPosition={left:k,top:h};this.sizeDiff={width:e.outerWidth()-e.width(),height:e.outerHeight()-e.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=(typeof j.aspectRatio=="number")?j.aspectRatio:((this.originalSize.width/this.originalSize.height)||1);var i=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",i=="auto"?this.axis+"-resize":i);e.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(e){var h=this.helper,g=this.options,m={},q=this,j=this.originalMousePosition,n=this.axis;var r=(e.pageX-j.left)||0,p=(e.pageY-j.top)||0;var i=this._change[n];if(!i){return false}var l=i.apply(this,[e,r,p]),k=c.browser.msie&&c.browser.version<7,f=this.sizeDiff;this._updateVirtualBoundaries(e.shiftKey);if(this._aspectRatio||e.shiftKey){l=this._updateRatio(l,e)}l=this._respectSize(l,e);this._propagate("resize",e);h.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}this._updateCache(l);this._trigger("resize",e,this.ui());return false},_mouseStop:function(h){this.resizing=false;var i=this.options,m=this;if(this._helper){var g=this._proportionallyResizeElements,e=g.length&&(/textarea/i).test(g[0].nodeName),f=e&&c.ui.hasScroll(g[0],"left")?0:m.sizeDiff.height,k=e?0:m.sizeDiff.width;var n={width:(m.helper.width()-k),height:(m.helper.height()-f)},j=(parseInt(m.element.css("left"),10)+(m.position.left-m.originalPosition.left))||null,l=(parseInt(m.element.css("top"),10)+(m.position.top-m.originalPosition.top))||null;if(!i.animate){this.element.css(c.extend(n,{top:l,left:j}))}m.helper.height(m.size.height);m.helper.width(m.size.width);if(this._helper&&!i.animate){this._proportionallyResize()}}c("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",h);if(this._helper){this.helper.remove()}return false},_updateVirtualBoundaries:function(g){var j=this.options,i,h,f,k,e;e={minWidth:a(j.minWidth)?j.minWidth:0,maxWidth:a(j.maxWidth)?j.maxWidth:Infinity,minHeight:a(j.minHeight)?j.minHeight:0,maxHeight:a(j.maxHeight)?j.maxHeight:Infinity};if(this._aspectRatio||g){i=e.minHeight*this.aspectRatio;f=e.minWidth/this.aspectRatio;h=e.maxHeight*this.aspectRatio;k=e.maxWidth/this.aspectRatio;if(i>e.minWidth){e.minWidth=i}if(f>e.minHeight){e.minHeight=f}if(hl.width),s=a(l.height)&&i.minHeight&&(i.minHeight>l.height);if(h){l.width=i.minWidth}if(s){l.height=i.minHeight}if(t){l.width=i.maxWidth}if(m){l.height=i.maxHeight}var f=this.originalPosition.left+this.originalSize.width,p=this.position.top+this.size.height;var k=/sw|nw|w/.test(q),e=/nw|ne|n/.test(q);if(h&&k){l.left=f-i.minWidth}if(t&&k){l.left=f-i.maxWidth}if(s&&e){l.top=p-i.minHeight}if(m&&e){l.top=p-i.maxHeight}var n=!l.width&&!l.height;if(n&&!l.left&&l.top){l.top=null}else{if(n&&!l.top&&l.left){l.left=null}}return l},_proportionallyResize:function(){var k=this.options;if(!this._proportionallyResizeElements.length){return}var g=this.helper||this.element;for(var f=0;f');var e=c.browser.msie&&c.browser.version<7,g=(e?1:0),h=(e?2:-1);this.helper.addClass(this._helper).css({width:this.element.outerWidth()+h,height:this.element.outerHeight()+h,position:"absolute",left:this.elementOffset.left-g+"px",top:this.elementOffset.top-g+"px",zIndex:++i.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(g,f,e){return{width:this.originalSize.width+f}},w:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{left:i.left+f,width:g.width-f}},n:function(h,f,e){var j=this.options,g=this.originalSize,i=this.originalPosition;return{top:i.top+e,height:g.height-e}},s:function(g,f,e){return{height:this.originalSize.height+e}},se:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},sw:function(g,f,e){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,f,e]))},ne:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[g,f,e]))},nw:function(g,f,e){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,f,e]))}},_propagate:function(f,e){c.ui.plugin.call(this,f,[e,this.ui()]);(f!="resize"&&this._trigger(f,e,this.ui()))},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});c.extend(c.ui.resizable,{version:"1.8.18"});c.ui.plugin.add("resizable","alsoResize",{start:function(f,g){var e=c(this).data("resizable"),i=e.options;var h=function(j){c(j).each(function(){var k=c(this);k.data("resizable-alsoresize",{width:parseInt(k.width(),10),height:parseInt(k.height(),10),left:parseInt(k.css("left"),10),top:parseInt(k.css("top"),10)})})};if(typeof(i.alsoResize)=="object"&&!i.alsoResize.parentNode){if(i.alsoResize.length){i.alsoResize=i.alsoResize[0];h(i.alsoResize)}else{c.each(i.alsoResize,function(j){h(j)})}}else{h(i.alsoResize)}},resize:function(g,i){var f=c(this).data("resizable"),j=f.options,h=f.originalSize,l=f.originalPosition;var k={height:(f.size.height-h.height)||0,width:(f.size.width-h.width)||0,top:(f.position.top-l.top)||0,left:(f.position.left-l.left)||0},e=function(m,n){c(m).each(function(){var q=c(this),r=c(this).data("resizable-alsoresize"),p={},o=n&&n.length?n:q.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];c.each(o,function(s,u){var t=(r[u]||0)+(k[u]||0);if(t&&t>=0){p[u]=t||null}});q.css(p)})};if(typeof(j.alsoResize)=="object"&&!j.alsoResize.nodeType){c.each(j.alsoResize,function(m,n){e(m,n)})}else{e(j.alsoResize)}},stop:function(e,f){c(this).removeData("resizable-alsoresize")}});c.ui.plugin.add("resizable","animate",{stop:function(i,n){var p=c(this).data("resizable"),j=p.options;var h=p._proportionallyResizeElements,e=h.length&&(/textarea/i).test(h[0].nodeName),f=e&&c.ui.hasScroll(h[0],"left")?0:p.sizeDiff.height,l=e?0:p.sizeDiff.width;var g={width:(p.size.width-l),height:(p.size.height-f)},k=(parseInt(p.element.css("left"),10)+(p.position.left-p.originalPosition.left))||null,m=(parseInt(p.element.css("top"),10)+(p.position.top-p.originalPosition.top))||null;p.element.animate(c.extend(g,m&&k?{top:m,left:k}:{}),{duration:j.animateDuration,easing:j.animateEasing,step:function(){var o={width:parseInt(p.element.css("width"),10),height:parseInt(p.element.css("height"),10),top:parseInt(p.element.css("top"),10),left:parseInt(p.element.css("left"),10)};if(h&&h.length){c(h[0]).css({width:o.width,height:o.height})}p._updateCache(o);p._propagate("resize",i)}})}});c.ui.plugin.add("resizable","containment",{start:function(f,r){var t=c(this).data("resizable"),j=t.options,l=t.element;var g=j.containment,k=(g instanceof c)?g.get(0):(/parent/.test(g))?l.parent().get(0):g;if(!k){return}t.containerElement=c(k);if(/document/.test(g)||g==document){t.containerOffset={left:0,top:0};t.containerPosition={left:0,top:0};t.parentData={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentNode.scrollHeight}}else{var n=c(k),i=[];c(["Top","Right","Left","Bottom"]).each(function(p,o){i[p]=b(n.css("padding"+o))});t.containerOffset=n.offset();t.containerPosition=n.position();t.containerSize={height:(n.innerHeight()-i[3]),width:(n.innerWidth()-i[1])};var q=t.containerOffset,e=t.containerSize.height,m=t.containerSize.width,h=(c.ui.hasScroll(k,"left")?k.scrollWidth:m),s=(c.ui.hasScroll(k)?k.scrollHeight:e);t.parentData={element:k,left:q.left,top:q.top,width:h,height:s}}},resize:function(g,q){var t=c(this).data("resizable"),i=t.options,f=t.containerSize,p=t.containerOffset,m=t.size,n=t.position,r=t._aspectRatio||g.shiftKey,e={top:0,left:0},h=t.containerElement;if(h[0]!=document&&(/static/).test(h.css("position"))){e=p}if(n.left<(t._helper?p.left:0)){t.size.width=t.size.width+(t._helper?(t.position.left-p.left):(t.position.left-e.left));if(r){t.size.height=t.size.width/i.aspectRatio}t.position.left=i.helper?p.left:0}if(n.top<(t._helper?p.top:0)){t.size.height=t.size.height+(t._helper?(t.position.top-p.top):t.position.top);if(r){t.size.width=t.size.height*i.aspectRatio}t.position.top=t._helper?p.top:0}t.offset.left=t.parentData.left+t.position.left;t.offset.top=t.parentData.top+t.position.top;var l=Math.abs((t._helper?t.offset.left-e.left:(t.offset.left-e.left))+t.sizeDiff.width),s=Math.abs((t._helper?t.offset.top-e.top:(t.offset.top-p.top))+t.sizeDiff.height);var k=t.containerElement.get(0)==t.element.parent().get(0),j=/relative|absolute/.test(t.containerElement.css("position"));if(k&&j){l-=t.parentData.left}if(l+t.size.width>=t.parentData.width){t.size.width=t.parentData.width-l;if(r){t.size.height=t.size.width/t.aspectRatio}}if(s+t.size.height>=t.parentData.height){t.size.height=t.parentData.height-s;if(r){t.size.width=t.size.height*t.aspectRatio}}},stop:function(f,n){var q=c(this).data("resizable"),g=q.options,l=q.position,m=q.containerOffset,e=q.containerPosition,i=q.containerElement;var j=c(q.helper),r=j.offset(),p=j.outerWidth()-q.sizeDiff.width,k=j.outerHeight()-q.sizeDiff.height;if(q._helper&&!g.animate&&(/relative/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}if(q._helper&&!g.animate&&(/static/).test(i.css("position"))){c(this).css({left:r.left-e.left-m.left,width:p,height:k})}}});c.ui.plugin.add("resizable","ghost",{start:function(g,h){var e=c(this).data("resizable"),i=e.options,f=e.size;e.ghost=e.originalElement.clone();e.ghost.css({opacity:0.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof i.ghost=="string"?i.ghost:"");e.ghost.appendTo(e.helper)},resize:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost){e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})}},stop:function(f,g){var e=c(this).data("resizable"),h=e.options;if(e.ghost&&e.helper){e.helper.get(0).removeChild(e.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(e,m){var p=c(this).data("resizable"),h=p.options,k=p.size,i=p.originalSize,j=p.originalPosition,n=p.axis,l=h._aspectRatio||e.shiftKey;h.grid=typeof h.grid=="number"?[h.grid,h.grid]:h.grid;var g=Math.round((k.width-i.width)/(h.grid[0]||1))*(h.grid[0]||1),f=Math.round((k.height-i.height)/(h.grid[1]||1))*(h.grid[1]||1);if(/^(se|s|e)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f}else{if(/^(ne)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f}else{if(/^(sw)$/.test(n)){p.size.width=i.width+g;p.size.height=i.height+f;p.position.left=j.left-g}else{p.size.width=i.width+g;p.size.height=i.height+f;p.position.top=j.top-f;p.position.left=j.left-g}}}}});var b=function(e){return parseInt(e,10)||0};var a=function(e){return !isNaN(parseInt(e,10))}})(jQuery);/* - * jQuery hashchange event - v1.3 - 7/21/2010 - * http://benalman.com/projects/jquery-hashchange-plugin/ - * - * Copyright (c) 2010 "Cowboy" Ben Alman - * Dual licensed under the MIT and GPL licenses. - * http://benalman.com/about/license/ - */ -(function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('