htslib 0.2.2 → 0.2.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/README.md +42 -22
- data/lib/hts/bam/{aux.rb → auxi.rb} +6 -0
- data/lib/hts/bam/header.rb +53 -2
- data/lib/hts/bam/header_record.rb +11 -0
- data/lib/hts/bam/record.rb +65 -24
- data/lib/hts/bam.rb +73 -66
- data/lib/hts/bcf/format.rb +4 -4
- data/lib/hts/bcf/header.rb +79 -2
- data/lib/hts/bcf/header_record.rb +35 -1
- data/lib/hts/bcf/info.rb +4 -4
- data/lib/hts/bcf.rb +85 -76
- data/lib/hts/hts.rb +2 -2
- data/lib/hts/libhts/constants.rb +36 -4
- data/lib/hts/libhts/cram.rb +39 -0
- data/lib/hts/libhts/sam_funcs.rb +16 -0
- data/lib/hts/libhts/tbx_funcs.rb +2 -0
- data/lib/hts/libhts/vcf.rb +84 -2
- data/lib/hts/libhts/vcf_funcs.rb +49 -8
- data/lib/hts/libhts.rb +2 -1
- data/lib/hts/tbx.rb +1 -5
- data/lib/hts/version.rb +1 -1
- data/lib/htslib.rb +16 -1
- metadata +6 -4
data/lib/hts/tbx.rb
CHANGED
@@ -45,8 +45,6 @@ module HTS
|
|
45
45
|
|
46
46
|
# build_index(index) if build_index
|
47
47
|
@idx = load_index(index)
|
48
|
-
|
49
|
-
super # do nothing
|
50
48
|
end
|
51
49
|
|
52
50
|
def build_index
|
@@ -68,9 +66,7 @@ module HTS
|
|
68
66
|
def seqnames
|
69
67
|
nseq = FFI::MemoryPointer.new(:int)
|
70
68
|
LibHTS.tbx_seqnames(@idx, nseq).then do |pts|
|
71
|
-
pts.read_array_of_pointer(nseq.read_int).map
|
72
|
-
pt.read_string
|
73
|
-
end
|
69
|
+
pts.read_array_of_pointer(nseq.read_int).map(&:read_string)
|
74
70
|
end
|
75
71
|
end
|
76
72
|
end
|
data/lib/hts/version.rb
CHANGED
data/lib/htslib.rb
CHANGED
@@ -30,14 +30,29 @@ module HTS
|
|
30
30
|
|
31
31
|
warn "htslib shared library '#{name}' not found."
|
32
32
|
end
|
33
|
+
|
34
|
+
def search_htslib_windows
|
35
|
+
ENV["HTSLIBDIR"] ||= [
|
36
|
+
RubyInstaller::Runtime.msys2_installation.msys_path,
|
37
|
+
RubyInstaller::Runtime.msys2_installation.mingwarch
|
38
|
+
].join(File::ALT_SEPARATOR)
|
39
|
+
path = File.expand_path("bin/hts-3.dll", ENV["HTSLIBDIR"])
|
40
|
+
RubyInstaller::Runtime.add_dll_directory(File.dirname(path))
|
41
|
+
path
|
42
|
+
end
|
33
43
|
end
|
34
44
|
|
35
|
-
self.lib_path =
|
45
|
+
self.lib_path = if Object.const_defined?(:RubyInstaller)
|
46
|
+
search_htslib_windows
|
47
|
+
else
|
48
|
+
search_htslib
|
49
|
+
end
|
36
50
|
|
37
51
|
# You can change the path of the shared library with `HTS.lib_path=`
|
38
52
|
# before calling the LibHTS module.
|
39
53
|
autoload :LibHTS, "hts/libhts"
|
40
54
|
|
55
|
+
autoload :Hts, "hts/hts"
|
41
56
|
autoload :Bam, "hts/bam"
|
42
57
|
autoload :Bcf, "hts/bcf"
|
43
58
|
autoload :Tbx, "hts/tbx"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: htslib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kojix2
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -132,10 +132,11 @@ files:
|
|
132
132
|
- LICENSE.txt
|
133
133
|
- README.md
|
134
134
|
- lib/hts/bam.rb
|
135
|
-
- lib/hts/bam/
|
135
|
+
- lib/hts/bam/auxi.rb
|
136
136
|
- lib/hts/bam/cigar.rb
|
137
137
|
- lib/hts/bam/flag.rb
|
138
138
|
- lib/hts/bam/header.rb
|
139
|
+
- lib/hts/bam/header_record.rb
|
139
140
|
- lib/hts/bam/record.rb
|
140
141
|
- lib/hts/bcf.rb
|
141
142
|
- lib/hts/bcf/format.rb
|
@@ -169,7 +170,8 @@ files:
|
|
169
170
|
homepage: https://github.com/kojix2/ruby-htslib
|
170
171
|
licenses:
|
171
172
|
- MIT
|
172
|
-
metadata:
|
173
|
+
metadata:
|
174
|
+
msys2_mingw_dependencies: htslib
|
173
175
|
post_install_message:
|
174
176
|
rdoc_options: []
|
175
177
|
require_paths:
|