htslib 0.0.0 → 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8b19cf8cd36bbb9ffeb34a9c92b98adba85716f57d24ec6990cc95c53c8f658d
4
- data.tar.gz: e678bdbe86be9c73c8fb3e378f86236a0a6eaf36ce047368af9263753bdca439
3
+ metadata.gz: 5c0c00377d4485fa702cc429c3005e98d1d095842d51fa6d27346fad9891c280
4
+ data.tar.gz: 56e680d3f890ef1df37f2d99644c13bde250a130ca46e5d6b756ca16366fe81e
5
5
  SHA512:
6
- metadata.gz: cf6a74ee14a7f0d3bbff603c1af232d7a106a0c7d70e4c8e4c7ac4270ab98866a971611a793a1b6d994fde2b5d0a400b0e73fe04a99c9b2abfa16d5e0d82a2c5
7
- data.tar.gz: d24f1fa238f3ad8d541f649a03cede9580bcdedad52e81a97f7d33a44a9c3d8fbfcf162b5912fcc9f7e5c832f09979d59cf7a4bc13fc6da7aa4facd0102fdfbb
6
+ metadata.gz: 1a38ecbb819edb2f81e5b76250c8ef070bf5d252925fecb859a4083462a7934feefd8ac50b2628f9f3912915982354bd61d424224302b45e9e2911321469bba6
7
+ data.tar.gz: 01d5ac7826b5db6b6838986d05801b69c76320bbb4a89029cf21a6f01031c9bcc23c287526fbda02c8a2c0a32453e53ed6d689373754680c584f969214c58f6f
data/README.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # HTSlib
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/htslib.svg)](https://badge.fury.io/rb/htslib)
4
- ![CI](https://github.com/kojix2/ruby-htslib/workflows/CI/badge.svg?branch=master)
4
+ ![CI](https://github.com/kojix2/ruby-htslib/workflows/CI/badge.svg)
5
5
  [![The MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.txt)
6
+ [![DOI](https://zenodo.org/badge/247078205.svg)](https://zenodo.org/badge/latestdoi/247078205)
7
+
8
+ :dna: [HTSlib](https://github.com/samtools/htslib) - high-throughput sequencing data manipulation - for Ruby
6
9
 
7
10
  :apple: Feel free to fork it out if you can develop it!
8
11
 
@@ -26,6 +29,8 @@ export HTSLIBDIR="/your/path/to/htslib"
26
29
 
27
30
  ## Usage
28
31
 
32
+ HTS::FFI - Low-level API
33
+
29
34
  ```ruby
30
35
  require 'htslib'
31
36
 
@@ -35,13 +40,36 @@ p b[:category]
35
40
  p b[:format]
36
41
  ```
37
42
 
43
+ A high-level API based on [hts-python](https://github.com/quinlan-lab/hts-python) is under development.
44
+
45
+ ## Documentation
46
+
47
+ * [RubyDoc.info - HTSlib](https://rdoc.info/gems/htslib)
48
+
38
49
  ## Development
39
50
 
51
+ To get started with development
52
+
53
+ ```sh
54
+ git clone --recurse-submodules https://github.com/kojix2/ruby-htslib
55
+ cd ruby-htslib
56
+ bundle install
57
+ bundle exec rake htslib:compile
58
+ bundle exec rake spec
59
+ ```
60
+
40
61
  ## Contributing
41
62
 
42
- Bug reports and pull requests are welcome on GitHub at https://github.com/kojix2/ruby-htslib.
63
+ * [Report bugs](https://github.com/kojix2/ruby-htslib/issues)
64
+ * Fix bugs and [submit pull requests](https://github.com/kojix2/ruby-htslib/pulls)
65
+ * Write, clarify, or fix documentation
66
+ * Suggest or add new features
67
+
68
+ ## Links
43
69
 
70
+ * [samtools/hts-spec](https://github.com/samtools/hts-specs)
71
+ * [c2ffi](https://github.com/rpav/c2ffi)
44
72
 
45
73
  ## License
46
74
 
47
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
75
+ [MIT License](https://opensource.org/licenses/MIT).
@@ -1,87 +1,79 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Create a skeleton using hts-python as a reference.
3
+ # Based on hts-python
4
4
  # https://github.com/quinlan-lab/hts-python
5
5
 
6
- class BamHeader
7
- def initialize; end
8
-
9
- def seqs; end
10
- end
11
-
12
- class Cigar
13
- def initialize; end
14
-
15
- def to_s; end
16
-
17
- def inspect; end
18
- end
19
-
20
- class Alignment
21
- def initialize; end
22
-
23
- def self.rom_sam_str; end
24
-
25
- def tags; end
26
-
27
- def qname; end
28
-
29
- def qname=; end
30
-
31
- def rnext; end
32
-
33
- def pnext; end
34
-
35
- def rname; end
36
-
37
- def strand; end
38
-
39
- def base_qualities; end
40
-
41
- def pos; end
42
-
43
- def pos=; end
44
-
45
- def isize; end
46
-
47
- def mapping_quality; end
48
-
49
- def cigar; end
50
-
51
- def qlen; end
52
-
53
- def rlen; end
54
-
55
- def seqs; end
56
-
57
- def flag_str; end
58
-
59
- def flag; end
60
-
61
- # def eql?
62
- # def hash
63
-
64
- def inspect; end
65
-
66
- def to_s; end
67
- end
68
-
69
- class Bam
70
- def initialize; end
71
-
72
- def self.header_from_fasta; end
73
-
74
- def inspect; end
75
-
76
- def write; end
77
-
78
- def close; end
79
-
80
- def flush; end
81
-
82
- def to_s; end
83
-
84
- def each; end
85
-
86
- # def call
6
+ require_relative 'bam/header'
7
+ require_relative 'bam/cigar'
8
+ require_relative 'bam/alignment'
9
+
10
+ module HTS
11
+ class Bam
12
+ include Enumerable
13
+ attr_reader :fname, :mode, :header, :htf
14
+
15
+ def initialize(fname, mode = 'r', create_index: nil, header: nil, fasta: nil)
16
+ @fname = File.expand_path(fname)
17
+ File.exist?(@fname) || raise("No such SAM/BAM file - #{@fname}")
18
+
19
+ @mode = mode
20
+ @htf = FFI.hts_open(@fname, mode)
21
+
22
+ if mode[0] == 'r'
23
+ @idx = FFI.sam_index_load(@htf, @fname)
24
+ if (@idx.null? && create_index.nil?) || create_index
25
+ FFI.sam_index_build(fname, -1)
26
+ @idx = FFI.sam_index_load(@htf, @fname)
27
+ warn 'NO querying'
28
+ end
29
+ @header = Bam::Header.new(FFI.sam_hdr_read(@htf))
30
+ @b = FFI.bam_init1
31
+
32
+ else
33
+ # FIXME
34
+ raise 'not implemented yet.'
35
+
36
+ end
37
+ end
38
+
39
+ def self.header_from_fasta; end
40
+
41
+ def write(alns)
42
+ alns.each do
43
+ FFI.sam_write1(@htf, @header, alns.b) > 0 || raise
44
+ end
45
+ end
46
+
47
+ # Close the current file.
48
+ def close
49
+ FFI.hts_close(@htf)
50
+ end
51
+
52
+ # Flush the current file.
53
+ def flush
54
+ raise
55
+ # FFI.bgzf_flush(@htf.fp.bgzf)
56
+ end
57
+
58
+ def each(&block)
59
+ # Each does not always start at the beginning of the file.
60
+ # This is the common behavior of IO objects in Ruby.
61
+ # This may change in the future.
62
+ block.call(Alignment.new(@b, @header.h)) while FFI.sam_read1(@htf, @header.h, @b) > 0
63
+ end
64
+
65
+ # query [WIP]
66
+ def query(region)
67
+ qiter = FFI.sam_itr_querys(@idx, @header.h, region)
68
+ begin
69
+ slen = FFI.sam_itr_next(@htf, qiter, @b)
70
+ while slen > 0
71
+ yield Alignment.new(@b, @header.h)
72
+ slen = FFI.sam_itr_next(@htf, qiter, @b)
73
+ end
74
+ ensure
75
+ FFI.hts_itr_destroy(qiter)
76
+ end
77
+ end
78
+ end
87
79
  end
@@ -0,0 +1,156 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Based on hts-python
4
+ # https://github.com/quinlan-lab/hts-python
5
+
6
+ module HTS
7
+ # A cigar object usually created from `Alignment`.
8
+ class Bam
9
+ class Alignment
10
+ def initialize(bam1_t, bam_hdr_t)
11
+ @b = bam1_t
12
+ @h = bam_hdr_t
13
+ end
14
+
15
+ # def initialize_copy
16
+ # super
17
+ # end
18
+
19
+ def self.rom_sam_str; end
20
+
21
+ def tags; end
22
+
23
+ # Read (query) name.
24
+ def qname
25
+ FFI.bam_get_qname(@b).read_string
26
+ end
27
+
28
+ # Set (query) name.
29
+ # def qname=(name)
30
+ # raise 'Not Implemented'
31
+ # end
32
+
33
+ # returns the chromosome of the mate or '' if not mapped.
34
+ def mate_chrom
35
+ tid = @b[:core][:mtid]
36
+ return '' if tid == -1
37
+
38
+ FFI.sam_hdr_tid2name(@h, tid)
39
+ end
40
+
41
+ # returns the tid of the mate or -1 if not mapped.
42
+ def mate_tid
43
+ @b[:core][:mtid]
44
+ end
45
+
46
+ # returns the tid of the alignment or -1 if not mapped.
47
+ def tid
48
+ @b[:core][:tid]
49
+ end
50
+
51
+ # mate position
52
+ def mate_pos
53
+ @b[:core][:mpos]
54
+ end
55
+
56
+ # returns 0-based start position.
57
+ def start
58
+ @b[:core][:pos]
59
+ end
60
+
61
+ # returns end position of the read.
62
+ def stop
63
+ FFI.bam_endpos @b
64
+ end
65
+
66
+ # returns the chromosome or '' if not mapped.
67
+ def chrom
68
+ tid = @b[:core][:tid]
69
+ return '' if tid == -1
70
+
71
+ FFI.sam_hdr_tid2name(@h, tid)
72
+ end
73
+
74
+ def strand
75
+ FFI.bam_is_rev(@b) ? '-' : '+'
76
+ end
77
+
78
+ # def start=(v)
79
+ # raise 'Not Implemented'
80
+ # end
81
+
82
+ # insert size
83
+ def isize
84
+ @b[:core][:isize]
85
+ end
86
+
87
+ # mapping quality
88
+ def mapping_quality
89
+ @b[:core][:qual]
90
+ end
91
+
92
+ # returns a `Cigar` object.
93
+ def cigar
94
+ Cigar.new(FFI.bam_get_cigar(@b), @b[:core][:n_cigar])
95
+ end
96
+
97
+ def qlen
98
+ FFI.bam_cigar2qlen(
99
+ @b[:core][:n_cigar],
100
+ FFI.bam_get_cigar(@b)
101
+ )
102
+ end
103
+
104
+ def rlen
105
+ FFI.bam_cigar2rlen(
106
+ @b[:core][:n_cigar],
107
+ FFI.bam_get_cigar(@b)
108
+ )
109
+ end
110
+
111
+ # return the read sequence
112
+ def sequence
113
+ seq_nt16_str = '=ACMGRSVTWYHKDBN'
114
+ r = FFI.bam_get_seq(@b)
115
+ Array.new(@b[:core][:l_qseq]) do |i|
116
+ seq_nt16_str[FFI.bam_seqi(r, i)]
117
+ end.join
118
+ end
119
+
120
+ def base_at(n)
121
+ n += @b[:core][:l_qseq] if n < 0
122
+ seq_nt16_str = '=ACMGRSVTWYHKDBN'
123
+ return '.' if (n >= @b[:core][:l_qseq]) || (n < 0) # eg. base_at(-1000)
124
+
125
+ r = FFI.bam_get_seq(@b)
126
+ seq_nt16_str[FFI.bam_seqi(r, n)]
127
+ end
128
+
129
+ def base_qualities
130
+ q_ptr = FFI.bam_get_qual(@b)
131
+ q_ptr.read_array_of_uint8(@b[:core][:l_qseq])
132
+ end
133
+
134
+ def base_quality_at(n)
135
+ n += @b[:core][:l_qseq] if n < 0 # eg. base_quality_at(-1000)
136
+ return 0 if (n >= @b[:core][:l_qseq]) || (n < 0)
137
+
138
+ q_ptr = FFI.bam_get_qual(@b)
139
+ q_ptr.get_uint8(n)
140
+ end
141
+
142
+ def flag_str
143
+ FFI.bam_flag2str(flag)
144
+ end
145
+
146
+ # returns a `Flag` object.
147
+ def flag
148
+ @b[:core][:flag]
149
+ end
150
+
151
+ # TODO:
152
+ # def eql?
153
+ # def hash
154
+ end
155
+ end
156
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Based on hts-python
4
+ # https://github.com/quinlan-lab/hts-python
5
+
6
+ module HTS
7
+ class Bam
8
+ class Cigar
9
+ include Enumerable
10
+ OPS = 'MIDNSHP=XB'
11
+
12
+ def initialize(cigar, n_cigar)
13
+ @c = cigar
14
+ @n_cigar = n_cigar
15
+ end
16
+
17
+ def to_s
18
+ to_a.flatten.join
19
+ end
20
+
21
+ def each
22
+ @n_cigar.times do |i|
23
+ c = @c[i].read_uint32
24
+ yield [FFI.bam_cigar_oplen(c),
25
+ FFI.bam_cigar_opchr(c)]
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Based on hts-python
4
+ # https://github.com/quinlan-lab/hts-python
5
+
6
+ module HTS
7
+ class Bam
8
+ class Header
9
+ attr_reader :h
10
+
11
+ def initialize(h)
12
+ @h = h
13
+ end
14
+
15
+ # FIXME: better name?
16
+ def seqs
17
+ Array.new(@h[:n_targets]) do |i|
18
+ FFI.sam_hdr_tid2name(@h, i)
19
+ end
20
+ end
21
+
22
+ def text
23
+ FFI.sam_hdr_str(@h)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -1,16 +1,18 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Create a skeleton using hts-python as a reference.
3
+ # Based on hts-python
4
4
  # https://github.com/quinlan-lab/hts-python
5
5
 
6
- class Fai
7
- def initialize; end
6
+ module HTS
7
+ class Fai
8
+ def initialize; end
8
9
 
9
- # def call
10
+ # def call
10
11
 
11
- def nseqs; end
12
+ def nseqs; end
12
13
 
13
- def include?; end
14
+ def include?; end
14
15
 
15
- # __iter__
16
+ # __iter__
17
+ end
16
18
  end
@@ -7,7 +7,7 @@ module HTS
7
7
  begin
8
8
  ffi_lib HTS.ffi_lib
9
9
  rescue LoadError => e
10
- raise LoadError, "Could not find HTSlib.#{FFI::Platform::LIBSUFFIX}"
10
+ raise LoadError, "#{e}\nCould not find #{HTS.ffi_lib}"
11
11
  end
12
12
 
13
13
  def self.attach_function(*)
@@ -18,8 +18,19 @@ module HTS
18
18
  end
19
19
  end
20
20
 
21
- require_relative 'ffi/struct'
22
- require_relative 'ffi_constants'
21
+ module FFI
22
+ class Struct
23
+ def self.union_layout(*args)
24
+ Class.new(FFI::Union) { layout(*args) }
25
+ end
26
+
27
+ def self.struct_layout(*args)
28
+ Class.new(FFI::Struct) { layout(*args) }
29
+ end
30
+ end
31
+ end
32
+
33
+ require_relative 'ffi/constants'
23
34
 
24
35
  # alphabetical order
25
36
  require_relative 'ffi/bgzf'
@@ -141,7 +141,8 @@ module HTS
141
141
  )
142
142
  end
143
143
 
144
- class SamHdr < ::FFI::Struct # HtsFile
144
+ # HtsFile
145
+ class SamHdr < ::FFI::Struct
145
146
  layout \
146
147
  :n_targets, :int32,
147
148
  :ignore_sam_err, :int32,
@@ -225,6 +226,7 @@ module HTS
225
226
  :a, :pointer
226
227
  )
227
228
  end
229
+
228
230
  class Bam1Core < ::FFI::Struct
229
231
  layout \
230
232
  :pos, :hts_pos_t,
@@ -12,8 +12,8 @@ module HTS
12
12
  c >> BAM_CIGAR_SHIFT
13
13
  end
14
14
 
15
- def bam_cigar_opchar(c)
16
- _BAM_CIGAR_STR_PADDED[bam_cigar_op(c)]
15
+ def bam_cigar_opchr(c)
16
+ (BAM_CIGAR_STR + '??????')[bam_cigar_op(c)]
17
17
  end
18
18
 
19
19
  def bam_cigar_gen(l, o)
@@ -60,7 +60,9 @@ module HTS
60
60
  b[:l_data] - (b[:core][:n_cigar] << 2) - b[:core][:l_qname] - b[:core][:l_qseq] - ((b[:core][:l_qseq] + 1) >> 1)
61
61
  end
62
62
 
63
- # def bam_seqi(s, i)
63
+ def bam_seqi(s, i)
64
+ s[(i) >> 1].read_uint8 >> ((~i & 1) << 2) & 0xf
65
+ end
64
66
 
65
67
  # def bam_set_seqi(s, i, b)
66
68
  end
@@ -405,6 +407,14 @@ module HTS
405
407
  [HtsIdx, SamHdr, :pointer, :uint],
406
408
  HtsItr.by_ref
407
409
 
410
+ # Get the next read from a SAM/BAM/CRAM iterator
411
+ def self.sam_itr_next(htsfp, itr, r)
412
+ # FIXME: check if htsfp is compressed BGZF
413
+ hts_log_error('Null iterator') if itr.null?
414
+ # FIXME: check multi
415
+ hts_itr_next(htsfp[:fp][:bgzf], itr, r, htsfp)
416
+ end
417
+
408
418
  attach_function \
409
419
  :sam_parse_region,
410
420
  [SamHdr, :string, :pointer, :pointer, :pointer, :int],
@@ -1,14 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Create a skeleton using hts-python as a reference.
3
+ # Based on hts-python
4
4
  # https://github.com/quinlan-lab/hts-python
5
5
 
6
- class Tbx
7
- def initialize; end
6
+ module HTS
7
+ class Tbx
8
+ def initialize; end
8
9
 
9
- def build; end
10
+ def build; end
10
11
 
11
- def sequences; end
12
+ def sequences; end
12
13
 
13
- # def __call__\
14
+ # def __call__\
15
+ end
14
16
  end
@@ -1,30 +1,32 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Create a skeleton using hts-python as a reference.
3
+ # Based on hts-python
4
4
  # https://github.com/quinlan-lab/hts-python
5
5
 
6
- class VCF
7
- def initialize; end
6
+ module HTS
7
+ class VCF
8
+ def initialize; end
8
9
 
9
- def inspect; end
10
+ def inspect; end
10
11
 
11
- def each; end
12
+ def each; end
12
13
 
13
- def seq; end
14
+ def seq; end
14
15
 
15
- def n_samples; end
16
- end
16
+ def n_samples; end
17
+ end
17
18
 
18
- class Variant
19
- def initialize; end
19
+ class Variant
20
+ def initialize; end
20
21
 
21
- def inspect; end
22
+ def inspect; end
22
23
 
23
- def formats; end
24
+ def formats; end
24
25
 
25
- def genotypes; end
26
- end
26
+ def genotypes; end
27
+ end
27
28
 
28
- class Format
29
- def initialize; end
29
+ class Format
30
+ def initialize; end
31
+ end
30
32
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HTS
4
- VERSION = '0.0.0'
4
+ VERSION = '0.0.1'
5
5
  end
@@ -10,9 +10,21 @@ module HTS
10
10
  class << self
11
11
  attr_accessor :ffi_lib
12
12
  end
13
- self.ffi_lib = File.expand_path("libhts.#{FFI::Platform::LIBSUFFIX}", ENV['HTSLIBDIR'])
13
+
14
+ suffix = ::FFI::Platform::LIBSUFFIX
15
+
16
+ self.ffi_lib = if ENV['HTSLIBDIR']
17
+ File.expand_path("libhts.#{suffix}", ENV['HTSLIBDIR'])
18
+ else
19
+ File.expand_path("../vendor/libhts.#{suffix}", __dir__)
20
+ end
14
21
  autoload :FFI, 'hts/ffi'
15
22
  end
16
23
 
17
24
  # alias
18
25
  HTSlib = HTS
26
+
27
+ require_relative 'hts/bam'
28
+ require_relative 'hts/fai'
29
+ require_relative 'hts/tbx'
30
+ require_relative 'hts/vcf'
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.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - kojix2
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-21 00:00:00.000000000 Z
11
+ date: 2021-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: pry
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -67,7 +81,7 @@ dependencies:
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0'
69
83
  - !ruby/object:Gem::Dependency
70
- name: rspec
84
+ name: rubocop
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - ">="
@@ -81,7 +95,7 @@ dependencies:
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
- name: rubocop
98
+ name: simplecov
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
101
  - - ">="
@@ -94,7 +108,7 @@ dependencies:
94
108
  - - ">="
95
109
  - !ruby/object:Gem::Version
96
110
  version: '0'
97
- description:
111
+ description:
98
112
  email:
99
113
  - 2xijok@gmail.com
100
114
  executables: []
@@ -104,18 +118,20 @@ files:
104
118
  - LICENSE.txt
105
119
  - README.md
106
120
  - lib/hts/bam.rb
121
+ - lib/hts/bam/alignment.rb
122
+ - lib/hts/bam/cigar.rb
123
+ - lib/hts/bam/header.rb
107
124
  - lib/hts/fai.rb
108
125
  - lib/hts/ffi.rb
109
126
  - lib/hts/ffi/bgzf.rb
127
+ - lib/hts/ffi/constants.rb
110
128
  - lib/hts/ffi/faidx.rb
111
129
  - lib/hts/ffi/hfile.rb
112
130
  - lib/hts/ffi/hts.rb
113
131
  - lib/hts/ffi/kfunc.rb
114
132
  - lib/hts/ffi/sam.rb
115
- - lib/hts/ffi/struct.rb
116
133
  - lib/hts/ffi/tbx.rb
117
134
  - lib/hts/ffi/vcf.rb
118
- - lib/hts/ffi_constants.rb
119
135
  - lib/hts/tbx.rb
120
136
  - lib/hts/vcf.rb
121
137
  - lib/hts/version.rb
@@ -124,7 +140,7 @@ homepage: https://github.com/kojix2/ruby-htslib
124
140
  licenses:
125
141
  - MIT
126
142
  metadata: {}
127
- post_install_message:
143
+ post_install_message:
128
144
  rdoc_options: []
129
145
  require_paths:
130
146
  - lib
@@ -139,8 +155,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
139
155
  - !ruby/object:Gem::Version
140
156
  version: '0'
141
157
  requirements: []
142
- rubygems_version: 3.1.4
143
- signing_key:
158
+ rubygems_version: 3.0.3
159
+ signing_key:
144
160
  specification_version: 4
145
161
  summary: HTSlib bindings for Ruby
146
162
  test_files: []
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # This should be removed if you get the better way...
4
- module FFI
5
- class Struct
6
- def self.union_layout(*args)
7
- Class.new(FFI::Union) { layout(*args) }
8
- end
9
-
10
- def self.struct_layout(*args)
11
- Class.new(FFI::Struct) { layout(*args) }
12
- end
13
- end
14
- end