bio-bigwig 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b9937e02151804bc5a6440481d7e6ec99ff411e474f04c6889b86d6a396287f5
|
|
4
|
+
data.tar.gz: ec2cef28451cb57e4cfd3e49436f86e64e248a804032b40e8cff3f4817f9bc98
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c3110386fbb9c9c9b892a934abc6ac5f66b10049e4c6a69cd23727a2e7a83ac111a6801122e1c49619e5b905ef06a87c27a5c1696111a6c7121e5c5afd0b4013
|
|
7
|
+
data.tar.gz: c77e2b59ab87c285b111f46d466f8e71272355666ac3940253675536e58f1c0a4cbc3d2ed6a971558c53b4e1201c2a0340ff75b842335f176722ff6dfe023402
|
data/ext/bio/bigwig/extconf.rb
CHANGED
|
@@ -487,7 +487,7 @@ bbOverlappingEntries_t *bbGetOverlappingEntriesCore(bigWigFile_t *fp, bwOverlapB
|
|
|
487
487
|
uint64_t i;
|
|
488
488
|
int compressed = 0, rv, slen;
|
|
489
489
|
uLongf sz = fp->hdr->bufSize, tmp = 0;
|
|
490
|
-
void *buf = NULL, *bufEnd = NULL, *compBuf = NULL;
|
|
490
|
+
void *buf = NULL, *bufBase = NULL, *bufEnd = NULL, *compBuf = NULL;
|
|
491
491
|
uint32_t entryTid = 0, start = 0, end;
|
|
492
492
|
char *str;
|
|
493
493
|
bbOverlappingEntries_t *output = calloc(1, sizeof(bbOverlappingEntries_t));
|
|
@@ -499,7 +499,7 @@ bbOverlappingEntries_t *bbGetOverlappingEntriesCore(bigWigFile_t *fp, bwOverlapB
|
|
|
499
499
|
|
|
500
500
|
if(sz) {
|
|
501
501
|
compressed = 1;
|
|
502
|
-
buf = malloc(sz);
|
|
502
|
+
bufBase = buf = malloc(sz);
|
|
503
503
|
}
|
|
504
504
|
sz = 0; //This is now the size of the compressed buffer
|
|
505
505
|
|
|
@@ -544,15 +544,14 @@ bbOverlappingEntries_t *bbGetOverlappingEntriesCore(bigWigFile_t *fp, bwOverlapB
|
|
|
544
544
|
buf = (char*)bufEnd - tmp; //reset the buffer pointer
|
|
545
545
|
}
|
|
546
546
|
|
|
547
|
-
if(compressed &&
|
|
547
|
+
if(compressed && bufBase) free(bufBase);
|
|
548
548
|
if(compBuf) free(compBuf);
|
|
549
549
|
return output;
|
|
550
550
|
|
|
551
551
|
error:
|
|
552
552
|
fprintf(stderr, "[bbGetOverlappingEntriesCore] Got an error\n");
|
|
553
|
-
buf = (char*)bufEnd - tmp;
|
|
554
553
|
if(output) bbDestroyOverlappingEntries(output);
|
|
555
|
-
if(compressed &&
|
|
554
|
+
if(compressed && bufBase) free(bufBase);
|
|
556
555
|
if(compBuf) free(compBuf);
|
|
557
556
|
return NULL;
|
|
558
557
|
}
|
|
@@ -544,7 +544,7 @@ int bwAddIntervalSpanSteps(bigWigFile_t *fp, const char *chrom, uint32_t start,
|
|
|
544
544
|
updateStats(fp, wb->span, values[i]);
|
|
545
545
|
wb->l += 4;
|
|
546
546
|
}
|
|
547
|
-
wb->end = wb->start + (wb->l>>2) * step;
|
|
547
|
+
wb->end = wb->start + ((wb->l-24)>>2) * step;
|
|
548
548
|
|
|
549
549
|
return 0;
|
|
550
550
|
}
|
|
@@ -567,7 +567,7 @@ int bwAppendIntervalSpanSteps(bigWigFile_t *fp, const float *values, uint32_t n)
|
|
|
567
567
|
updateStats(fp, wb->span, values[i]);
|
|
568
568
|
wb->l += 4;
|
|
569
569
|
}
|
|
570
|
-
wb->end = wb->start + (wb->l>>2) * wb->step;
|
|
570
|
+
wb->end = wb->start + ((wb->l-24)>>2) * wb->step;
|
|
571
571
|
|
|
572
572
|
return 0;
|
|
573
573
|
}
|
|
@@ -209,6 +209,11 @@ URL_t *urlOpen(const char *fname, CURLcode (*callBack)(CURL*), const char *mode)
|
|
|
209
209
|
fprintf(stderr, "[urlOpen] Failed instructing curl to use any HTTP authentication it finds to be suitable!\n");
|
|
210
210
|
goto error;
|
|
211
211
|
}
|
|
212
|
+
// set user-agent
|
|
213
|
+
if(curl_easy_setopt(URL->x.curl, CURLOPT_USERAGENT, "libBigWig") != CURLE_OK) {
|
|
214
|
+
fprintf(stderr, "[urlOpen] Failed instructing curl to use libBigWig as a user-agent!\n");
|
|
215
|
+
goto error;
|
|
216
|
+
}
|
|
212
217
|
//Follow redirects
|
|
213
218
|
if(curl_easy_setopt(URL->x.curl, CURLOPT_FOLLOWLOCATION, 1L) != CURLE_OK) {
|
|
214
219
|
fprintf(stderr, "[urlOpen] Failed instructing curl to follow redirects!\n");
|
data/lib/bio/bigwig/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bio-bigwig
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- kojix2
|
|
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
requirements: []
|
|
56
|
-
rubygems_version:
|
|
56
|
+
rubygems_version: 4.0.20
|
|
57
57
|
specification_version: 4
|
|
58
58
|
summary: A ruby library for accessing bigWig / bigBed files
|
|
59
59
|
test_files: []
|