bio-twobit 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rubocop.yml +13 -0
- data/Gemfile +14 -0
- data/LICENSE.txt +21 -0
- data/README.md +98 -0
- data/Rakefile +25 -0
- data/bio-twobit.gemspec +29 -0
- data/ext/bio/twobit/2bit.c +734 -0
- data/ext/bio/twobit/2bit.h +134 -0
- data/ext/bio/twobit/LICENSE +24 -0
- data/ext/bio/twobit/extconf.rb +5 -0
- data/ext/bio/twobit/twobit.c +524 -0
- data/ext/bio/twobit/twobit.h +7 -0
- data/lib/bio/twobit/version.rb +7 -0
- data/lib/bio/twobit.rb +40 -0
- metadata +59 -0
data/lib/bio/twobit.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "twobit/version"
|
4
|
+
require_relative "twobit/twobit"
|
5
|
+
|
6
|
+
module Bio
|
7
|
+
class TwoBit
|
8
|
+
class << self
|
9
|
+
alias open new
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(fname, masked: false)
|
13
|
+
mskd = masked ? 1 : 0
|
14
|
+
initialize_raw(fname, mskd)
|
15
|
+
if block_given?
|
16
|
+
begin
|
17
|
+
yield self
|
18
|
+
ensure
|
19
|
+
close
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def sequence(chrom, start = 0, stop = 0)
|
25
|
+
sequence_raw(chrom, start, stop)
|
26
|
+
end
|
27
|
+
|
28
|
+
def bases(chrom, start = 0, stop = 0, fraction: true)
|
29
|
+
bases_raw(chrom, start, stop, fraction ? 1 : 0)
|
30
|
+
end
|
31
|
+
|
32
|
+
def hard_masked_blocks(chrom, start = 0, stop = 0)
|
33
|
+
hard_masked_blocks_raw(chrom, start, stop)
|
34
|
+
end
|
35
|
+
|
36
|
+
def soft_masked_blocks(chrom, start = 0, stop = 0)
|
37
|
+
soft_masked_blocks_raw(chrom, start, stop)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
metadata
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bio-twobit
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- kojix2
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-12-18 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: This is a Ruby binding for lib2bit(https://github.com/dpryan79/lib2bit),
|
14
|
+
which provides high-speed access to genomic data in 2bit file format.
|
15
|
+
email:
|
16
|
+
- 2xijok@gmail.com
|
17
|
+
executables: []
|
18
|
+
extensions:
|
19
|
+
- ext/bio/twobit/extconf.rb
|
20
|
+
extra_rdoc_files: []
|
21
|
+
files:
|
22
|
+
- ".rubocop.yml"
|
23
|
+
- Gemfile
|
24
|
+
- LICENSE.txt
|
25
|
+
- README.md
|
26
|
+
- Rakefile
|
27
|
+
- bio-twobit.gemspec
|
28
|
+
- ext/bio/twobit/2bit.c
|
29
|
+
- ext/bio/twobit/2bit.h
|
30
|
+
- ext/bio/twobit/LICENSE
|
31
|
+
- ext/bio/twobit/extconf.rb
|
32
|
+
- ext/bio/twobit/twobit.c
|
33
|
+
- ext/bio/twobit/twobit.h
|
34
|
+
- lib/bio/twobit.rb
|
35
|
+
- lib/bio/twobit/version.rb
|
36
|
+
homepage: https://github.com/ruby-on-bioc/bio-twobit
|
37
|
+
licenses:
|
38
|
+
- MIT
|
39
|
+
metadata: {}
|
40
|
+
post_install_message:
|
41
|
+
rdoc_options: []
|
42
|
+
require_paths:
|
43
|
+
- lib
|
44
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 2.6.0
|
49
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
requirements: []
|
55
|
+
rubygems_version: 3.2.22
|
56
|
+
signing_key:
|
57
|
+
specification_version: 4
|
58
|
+
summary: A ruby library for accessing 2bit files
|
59
|
+
test_files: []
|