bio-bigwig 0.0.4 → 0.0.5
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 +4 -4
- data/ext/bio/bigwig/bigwigext.c +30 -8
- data/lib/bio/bigwig/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a7c6f632a8789e179e25df4689ba33ea3afa6ab2e61eaa3eb4e2ec9aa83595b
|
4
|
+
data.tar.gz: d60bff195ccd4b53bce8c7cdc826e204d28df864bf6c564f23dea925e012b751
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf0692a90f5dc3fd04d86f155360d4d917657dfd460fc93f44b49acf8669290d5b9c836b941b7723fdda3ad9afcf7ced19e0e73c5e81ad72df7bd46f8623e674
|
7
|
+
data.tar.gz: 3e9a81e355c12c6c161f46f66a16db12f707135f7b37b9459eb50e4824cf4739759bc346dede7237dafa4d181b0914317de9ccf0e3255df839edf9f2752fa2e3
|
data/ext/bio/bigwig/bigwigext.c
CHANGED
@@ -162,6 +162,21 @@ bigwig_close(VALUE self)
|
|
162
162
|
return Qnil;
|
163
163
|
}
|
164
164
|
|
165
|
+
static VALUE
|
166
|
+
bigwig_is_closed(VALUE self)
|
167
|
+
{
|
168
|
+
bigWigFile_t *bw = get_bigWigFile(self);
|
169
|
+
|
170
|
+
if (bw)
|
171
|
+
{
|
172
|
+
return Qfalse;
|
173
|
+
}
|
174
|
+
else
|
175
|
+
{
|
176
|
+
return Qtrue;
|
177
|
+
}
|
178
|
+
}
|
179
|
+
|
165
180
|
static VALUE
|
166
181
|
bw_get_header(VALUE self)
|
167
182
|
{
|
@@ -170,7 +185,7 @@ bw_get_header(VALUE self)
|
|
170
185
|
|
171
186
|
if (!bw)
|
172
187
|
{
|
173
|
-
rb_raise(
|
188
|
+
rb_raise(rb_eIOError, "The bigWig file handle is not opened!");
|
174
189
|
return Qnil;
|
175
190
|
}
|
176
191
|
|
@@ -210,7 +225,7 @@ bw_get_chroms(int argc, VALUE *argv, VALUE self)
|
|
210
225
|
|
211
226
|
if (!bw)
|
212
227
|
{
|
213
|
-
rb_raise(
|
228
|
+
rb_raise(rb_eIOError, "The bigWig file handle is not opened!");
|
214
229
|
return Qnil;
|
215
230
|
}
|
216
231
|
|
@@ -284,7 +299,7 @@ bw_get_stats(VALUE self, VALUE rb_chrom, VALUE rb_start, VALUE rb_end, VALUE rb_
|
|
284
299
|
|
285
300
|
if (!bw)
|
286
301
|
{
|
287
|
-
rb_raise(
|
302
|
+
rb_raise(rb_eIOError, "The bigWig file handle is not opened!");
|
288
303
|
return Qnil;
|
289
304
|
}
|
290
305
|
|
@@ -397,7 +412,7 @@ bw_get_values(VALUE self, VALUE rb_chrom, VALUE rb_start, VALUE rb_end)
|
|
397
412
|
|
398
413
|
if (!bw)
|
399
414
|
{
|
400
|
-
rb_raise(
|
415
|
+
rb_raise(rb_eIOError, "The bigWig file handle is not opened!");
|
401
416
|
return Qnil;
|
402
417
|
}
|
403
418
|
|
@@ -469,7 +484,7 @@ bw_get_intervals(VALUE self, VALUE rb_chrom, VALUE rb_start, VALUE rb_end)
|
|
469
484
|
|
470
485
|
if (!bw)
|
471
486
|
{
|
472
|
-
rb_raise(
|
487
|
+
rb_raise(rb_eIOError, "The bigWig file handle is not opened!");
|
473
488
|
return Qnil;
|
474
489
|
}
|
475
490
|
|
@@ -558,7 +573,7 @@ bb_get_entries(VALUE self, VALUE rb_chrom, VALUE rb_start, VALUE rb_end, VALUE r
|
|
558
573
|
|
559
574
|
if (!bw)
|
560
575
|
{
|
561
|
-
rb_raise(
|
576
|
+
rb_raise(rb_eIOError, "The bigBed file handle is not opened!");
|
562
577
|
return Qnil;
|
563
578
|
}
|
564
579
|
|
@@ -656,7 +671,7 @@ bb_get_sql(VALUE self)
|
|
656
671
|
|
657
672
|
if (!bw)
|
658
673
|
{
|
659
|
-
rb_raise(
|
674
|
+
rb_raise(rb_eIOError, "The bigBed file handle is not opened!");
|
660
675
|
return Qnil;
|
661
676
|
}
|
662
677
|
|
@@ -684,6 +699,12 @@ bw_get_file_type(VALUE self)
|
|
684
699
|
{
|
685
700
|
bigWigFile_t *bw = get_bigWigFile(self);
|
686
701
|
|
702
|
+
if (!bw)
|
703
|
+
{
|
704
|
+
rb_raise(rb_eIOError, "The bigWig file handle is not opened!");
|
705
|
+
return Qnil;
|
706
|
+
}
|
707
|
+
|
687
708
|
if (bw->type == 0)
|
688
709
|
{
|
689
710
|
return rb_str_new2("BigWig");
|
@@ -703,7 +724,7 @@ bw_is_file_type(VALUE self, int type_check)
|
|
703
724
|
|
704
725
|
if (!bw)
|
705
726
|
{
|
706
|
-
rb_raise(
|
727
|
+
rb_raise(rb_eIOError, "The bigWig file handle is not opened!");
|
707
728
|
return Qnil;
|
708
729
|
}
|
709
730
|
|
@@ -738,6 +759,7 @@ void Init_bigwigext()
|
|
738
759
|
|
739
760
|
rb_define_private_method(rb_BigWig, "initialize_raw", bigwig_init, 2);
|
740
761
|
rb_define_method(rb_BigWig, "close", bigwig_close, 0);
|
762
|
+
rb_define_method(rb_BigWig, "closed?", bigwig_is_closed, 0);
|
741
763
|
rb_define_method(rb_BigWig, "header", bw_get_header, 0);
|
742
764
|
rb_define_method(rb_BigWig, "chroms", bw_get_chroms, -1);
|
743
765
|
rb_define_private_method(rb_BigWig, "stats_raw", bw_get_stats, 6);
|
data/lib/bio/bigwig/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bio-bigwig
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kojix2
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This is a Ruby binding for libBigWig (https://github.com/dpryan79/libBigWig),
|
14
14
|
which provides high-speed access to bigWig or bigBed files.
|