htslib 0.0.0.pre → 0.0.0

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: c4cf91042ebfca63fa53176e80b71d93e0a3deb8938edbeccb306ac66b2f4d9b
4
- data.tar.gz: 33ef01ac381c684c1da7ef03e12043164c70e58849e03c97d7fd9f89f19382c7
3
+ metadata.gz: 8b19cf8cd36bbb9ffeb34a9c92b98adba85716f57d24ec6990cc95c53c8f658d
4
+ data.tar.gz: e678bdbe86be9c73c8fb3e378f86236a0a6eaf36ce047368af9263753bdca439
5
5
  SHA512:
6
- metadata.gz: a0334a54d5e96243652ded099b6d07352f6a145e01dbb7853a0a00f1e040ac5175f0f95c4262600bb4e76ea282e1d283ff12b1b44e54f8d75f1a206a6f5ca319
7
- data.tar.gz: 006b404fa6a9a05a316bd214bf4a3b737d46a8cc6e9b3fd05772e3547b03960e254bc3aad5d04d26ce741709e8926e6d57eca4a396b345cfe5165646d28a6a11
6
+ metadata.gz: cf6a74ee14a7f0d3bbff603c1af232d7a106a0c7d70e4c8e4c7ac4270ab98866a971611a793a1b6d994fde2b5d0a400b0e73fe04a99c9b2abfa16d5e0d82a2c5
7
+ data.tar.gz: d24f1fa238f3ad8d541f649a03cede9580bcdedad52e81a97f7d33a44a9c3d8fbfcf162b5912fcc9f7e5c832f09979d59cf7a4bc13fc6da7aa4facd0102fdfbb
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # HTSlib
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/htslib.svg)](https://badge.fury.io/rb/htslib)
3
4
  ![CI](https://github.com/kojix2/ruby-htslib/workflows/CI/badge.svg?branch=master)
5
+ [![The MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE.txt)
4
6
 
5
7
  :apple: Feel free to fork it out if you can develop it!
6
8
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Create a skeleton using hts-python as a reference.
2
4
  # https://github.com/quinlan-lab/hts-python
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Create a skeleton using hts-python as a reference.
2
4
  # https://github.com/quinlan-lab/hts-python
3
5
 
@@ -29,3 +29,4 @@ require_relative 'ffi/hts'
29
29
  require_relative 'ffi/sam'
30
30
  require_relative 'ffi/kfunc'
31
31
  require_relative 'ffi/tbx'
32
+ require_relative 'ffi/vcf'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # BGZF
2
4
  module HTS
3
5
  module FFI
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module HTS
2
4
  module FFI
3
5
  # Build index for a FASTA or FASTQ or bgzip-compressed FASTA or FASTQ file.
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module HTS
2
4
  module FFI
3
5
  # Open the named file or URL as a stream
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module HTS
2
4
  module FFI
3
5
  # hts_expand
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module HTS
2
4
  module FFI
3
5
  # Log gamma function
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module HTS
2
4
  module FFI
3
5
  # macros
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This should be removed if you get the better way...
2
4
  module FFI
3
5
  class Struct
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module HTS
2
4
  module FFI
3
5
  attach_function \
@@ -0,0 +1,430 @@
1
+ # frozen_string_literal: true
2
+
3
+ module HTS
4
+ module FFI
5
+ attach_function \
6
+ :bcf_hdr_init,
7
+ [:string],
8
+ BcfHdr.by_ref
9
+
10
+ attach_function \
11
+ :bcf_hdr_destroy,
12
+ [BcfHdr],
13
+ :void
14
+
15
+ attach_function \
16
+ :bcf_init,
17
+ [:void],
18
+ Bcf1.by_ref
19
+
20
+ attach_function \
21
+ :bcf_destroy,
22
+ [Bcf1],
23
+ :void
24
+
25
+ attach_function \
26
+ :bcf_empty,
27
+ [Bcf1],
28
+ :void
29
+
30
+ attach_function \
31
+ :bcf_clear,
32
+ [Bcf1],
33
+ :void
34
+
35
+ attach_function \
36
+ :bcf_hdr_read,
37
+ [HtsFile],
38
+ BcfHdr.by_ref
39
+
40
+ attach_function \
41
+ :bcf_hdr_set_samples,
42
+ [BcfHdr, :string, :int],
43
+ :int
44
+
45
+ attach_function \
46
+ :bcf_subset_format,
47
+ [BcfHdr, Bcf1],
48
+ :int
49
+
50
+ attach_function \
51
+ :bcf_hdr_write,
52
+ [HtsFile, BcfHdr],
53
+ :int
54
+
55
+ attach_function \
56
+ :vcf_parse,
57
+ [Kstring, BcfHdr, Bcf1],
58
+ :int
59
+
60
+ attach_function \
61
+ :vcf_open_mode,
62
+ %i[string string string],
63
+ :int
64
+
65
+ attach_function \
66
+ :vcf_format,
67
+ [BcfHdr, Bcf1, Kstring],
68
+ :int
69
+
70
+ attach_function \
71
+ :bcf_read,
72
+ [HtsFile, BcfHdr, Bcf1],
73
+ :int
74
+
75
+ attach_function \
76
+ :bcf_unpack,
77
+ [Bcf1, :int],
78
+ :int
79
+
80
+ attach_function \
81
+ :bcf_dup,
82
+ [Bcf1],
83
+ Bcf1.by_ref
84
+
85
+ attach_function \
86
+ :bcf_copy,
87
+ [Bcf1, Bcf1],
88
+ Bcf1.by_ref
89
+
90
+ attach_function \
91
+ :bcf_write,
92
+ [HtsFile, BcfHdr, Bcf1],
93
+ :int
94
+
95
+ attach_function \
96
+ :vcf_hdr_read,
97
+ [HtsFile],
98
+ BcfHdr.by_ref
99
+
100
+ attach_function \
101
+ :vcf_hdr_write,
102
+ [HtsFile, BcfHdr],
103
+ :int
104
+
105
+ attach_function \
106
+ :vcf_read,
107
+ [HtsFile, BcfHdr, Bcf1],
108
+ :int
109
+
110
+ attach_function \
111
+ :vcf_write,
112
+ [HtsFile, BcfHdr, Bcf1],
113
+ :int
114
+
115
+ attach_function \
116
+ :bcf_readrec,
117
+ [BGZF, :pointer, :pointer, :pointer, :hts_pos_t, :hts_pos_t],
118
+ :int
119
+
120
+ attach_function \
121
+ :vcf_write_line,
122
+ [HtsFile, Kstring],
123
+ :int
124
+
125
+ attach_function \
126
+ :bcf_hdr_dup,
127
+ [BcfHdr],
128
+ BcfHdr.by_ref
129
+
130
+ attach_function \
131
+ :bcf_hdr_merge,
132
+ [BcfHdr, BcfHdr],
133
+ BcfHdr.by_ref
134
+
135
+ attach_function \
136
+ :bcf_hdr_add_sample,
137
+ [BcfHdr, :string],
138
+ :int
139
+
140
+ attach_function \
141
+ :bcf_hdr_set,
142
+ [BcfHdr, :string],
143
+ :int
144
+
145
+ attach_function \
146
+ :bcf_hdr_format,
147
+ [BcfHdr, :int, Kstring],
148
+ :int
149
+
150
+ attach_function \
151
+ :bcf_hdr_fmt_text,
152
+ [BcfHdr, :int, :pointer],
153
+ :string
154
+
155
+ attach_function \
156
+ :bcf_hdr_append,
157
+ [BcfHdr, :string],
158
+ :int
159
+
160
+ attach_function \
161
+ :bcf_hdr_printf,
162
+ [BcfHdr, :string, :varargs],
163
+ :int
164
+
165
+ attach_function \
166
+ :bcf_hdr_get_version,
167
+ [BcfHdr],
168
+ :string
169
+
170
+ attach_function \
171
+ :bcf_hdr_set_version,
172
+ [BcfHdr, :string],
173
+ :int
174
+
175
+ attach_function \
176
+ :bcf_hdr_remove,
177
+ [BcfHdr, :int, :string],
178
+ :void
179
+
180
+ attach_function \
181
+ :bcf_hdr_subset,
182
+ [BcfHdr, :int, :pointer, :pointer],
183
+ BcfHdr.by_ref
184
+
185
+ attach_function \
186
+ :bcf_hdr_seqnames,
187
+ [BcfHdr, :pointer],
188
+ :pointer
189
+
190
+ attach_function \
191
+ :bcf_hdr_parse,
192
+ [BcfHdr, :string],
193
+ :int
194
+
195
+ attach_function \
196
+ :bcf_hdr_sync,
197
+ [BcfHdr],
198
+ :int
199
+
200
+ attach_function \
201
+ :bcf_hdr_parse_line,
202
+ [BcfHdr, :string, :pointer],
203
+ BcfHrec.by_ref
204
+
205
+ attach_function \
206
+ :bcf_hrec_format,
207
+ [BcfHrec, Kstring],
208
+ :int
209
+
210
+ attach_function \
211
+ :bcf_hdr_add_hrec,
212
+ [BcfHdr, BcfHrec],
213
+ :int
214
+
215
+ attach_function \
216
+ :bcf_hdr_get_hrec,
217
+ [BcfHdr, :int, :string, :string, :string],
218
+ BcfHrec.by_ref
219
+
220
+ attach_function \
221
+ :bcf_hrec_dup,
222
+ [BcfHrec],
223
+ BcfHrec.by_ref
224
+
225
+ attach_function \
226
+ :bcf_hrec_add_key,
227
+ [BcfHrec, :string, :size_t],
228
+ :int
229
+
230
+ attach_function \
231
+ :bcf_hrec_set_val,
232
+ [BcfHrec, :int, :string, :size_t, :int],
233
+ :int
234
+
235
+ attach_function \
236
+ :bcf_hrec_find_key,
237
+ [BcfHrec, :string],
238
+ :int
239
+
240
+ attach_function \
241
+ :hrec_add_idx,
242
+ [BcfHrec, :int],
243
+ :int
244
+
245
+ attach_function \
246
+ :bcf_hrec_destroy,
247
+ [BcfHrec],
248
+ :void
249
+
250
+ attach_function \
251
+ :bcf_subset,
252
+ [BcfHdr, Bcf1, :int, :pointer],
253
+ :int
254
+
255
+ attach_function \
256
+ :bcf_translate,
257
+ [BcfHdr, BcfHdr, Bcf1],
258
+ :int
259
+
260
+ attach_function \
261
+ :bcf_get_variant_types,
262
+ [Bcf1],
263
+ :int
264
+
265
+ attach_function \
266
+ :bcf_get_variant_type,
267
+ [Bcf1, :int],
268
+ :int
269
+
270
+ attach_function \
271
+ :bcf_is_snp,
272
+ [Bcf1],
273
+ :int
274
+
275
+ attach_function \
276
+ :bcf_update_filter,
277
+ [BcfHdr, Bcf1, :pointer, :int],
278
+ :int
279
+
280
+ attach_function \
281
+ :bcf_add_filter,
282
+ [BcfHdr, Bcf1, :int],
283
+ :int
284
+
285
+ attach_function \
286
+ :bcf_remove_filter,
287
+ [BcfHdr, Bcf1, :int, :int],
288
+ :int
289
+
290
+ attach_function \
291
+ :bcf_has_filter,
292
+ [BcfHdr, Bcf1, :string],
293
+ :int
294
+
295
+ attach_function \
296
+ :bcf_update_alleles,
297
+ [BcfHdr, Bcf1, :pointer, :int],
298
+ :int
299
+
300
+ attach_function \
301
+ :bcf_update_alleles_str,
302
+ [BcfHdr, Bcf1, :string],
303
+ :int
304
+
305
+ attach_function \
306
+ :bcf_update_id,
307
+ [BcfHdr, Bcf1, :string],
308
+ :int
309
+
310
+ attach_function \
311
+ :bcf_add_id,
312
+ [BcfHdr, Bcf1, :string],
313
+ :int
314
+
315
+ attach_function \
316
+ :bcf_update_info,
317
+ [BcfHdr, Bcf1, :string, :pointer, :int, :int],
318
+ :int
319
+
320
+ attach_function \
321
+ :bcf_update_format_string,
322
+ [BcfHdr, Bcf1, :string, :pointer, :int],
323
+ :int
324
+
325
+ attach_function \
326
+ :bcf_update_format,
327
+ [BcfHdr, Bcf1, :string, :pointer, :int, :int],
328
+ :int
329
+
330
+ attach_function \
331
+ :bcf_get_fmt,
332
+ [BcfHdr, Bcf1, :string],
333
+ BcfFmt.by_ref
334
+
335
+ attach_function \
336
+ :bcf_get_info,
337
+ [BcfHdr, Bcf1, :string],
338
+ BcfInfo.by_ref
339
+
340
+ attach_function \
341
+ :bcf_get_fmt_id,
342
+ [Bcf1, :int],
343
+ BcfFmt.by_ref
344
+
345
+ attach_function \
346
+ :bcf_get_info_id,
347
+ [Bcf1, :int],
348
+ BcfInfo.by_ref
349
+
350
+ attach_function \
351
+ :bcf_get_info_values,
352
+ [BcfHdr, Bcf1, :string, :pointer, :pointer, :int],
353
+ :int
354
+
355
+ attach_function \
356
+ :bcf_get_format_string,
357
+ [BcfHdr, Bcf1, :string, :pointer, :pointer],
358
+ :int
359
+
360
+ attach_function \
361
+ :bcf_get_format_values,
362
+ [BcfHdr, Bcf1, :string, :pointer, :pointer, :int],
363
+ :int
364
+
365
+ attach_function \
366
+ :bcf_hdr_id2int,
367
+ [BcfHdr, :int, :string],
368
+ :int
369
+
370
+ attach_function \
371
+ :bcf_fmt_array,
372
+ [Kstring, :int, :int, :pointer],
373
+ :int
374
+
375
+ attach_function \
376
+ :bcf_fmt_sized_array,
377
+ [Kstring, :pointer],
378
+ :uint8_t
379
+
380
+ attach_function \
381
+ :bcf_enc_vchar,
382
+ [Kstring, :int, :string],
383
+ :int
384
+
385
+ attach_function \
386
+ :bcf_enc_vint,
387
+ [Kstring, :int, :pointer, :int],
388
+ :int
389
+
390
+ attach_function \
391
+ :bcf_enc_vfloat,
392
+ [Kstring, :int, :pointer],
393
+ :int
394
+
395
+ attach_function \
396
+ :bcf_index_load2,
397
+ %i[string string],
398
+ HtsIdx.by_ref
399
+
400
+ attach_function \
401
+ :bcf_index_load3,
402
+ %i[string string int],
403
+ HtsIdx.by_ref
404
+
405
+ attach_function \
406
+ :bcf_index_build,
407
+ %i[string int],
408
+ :int
409
+
410
+ attach_function \
411
+ :bcf_index_build2,
412
+ %i[string string int],
413
+ :int
414
+
415
+ attach_function \
416
+ :bcf_index_build3,
417
+ %i[string string int int],
418
+ :int
419
+
420
+ attach_function \
421
+ :bcf_idx_init,
422
+ [HtsFile, BcfHdr, :int, :string],
423
+ :int
424
+
425
+ attach_function \
426
+ :bcf_idx_save,
427
+ [HtsFile],
428
+ :int
429
+ end
430
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module HTS
2
4
  module FFI
3
5
  typedef :pointer, :HFILE
@@ -266,8 +268,8 @@ module HTS
266
268
  BAM_CDIFF = 8
267
269
  BAM_CBACK = 9
268
270
 
269
- BAM_CIGAR_STR = 'MIDNSHP=XB'.freeze
270
- BAM_CIGAR_STR_PADDED = 'MIDNSHP=XB??????'.freeze
271
+ BAM_CIGAR_STR = 'MIDNSHP=XB'
272
+ BAM_CIGAR_STR_PADDED = 'MIDNSHP=XB??????'
271
273
  BAM_CIGAR_SHIFT = 4
272
274
  BAM_CIGAR_MASK = 0xf
273
275
  BAM_CIGAR_TYPE = 0x3C1A7
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Create a skeleton using hts-python as a reference.
2
4
  # https://github.com/quinlan-lab/hts-python
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Create a skeleton using hts-python as a reference.
2
4
  # https://github.com/quinlan-lab/hts-python
3
5
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HTS
4
- VERSION = '0.0.0.pre'
4
+ VERSION = '0.0.0'
5
5
  end
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.pre
4
+ version: 0.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kojix2
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-08-20 00:00:00.000000000 Z
11
+ date: 2020-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -114,6 +114,7 @@ files:
114
114
  - lib/hts/ffi/sam.rb
115
115
  - lib/hts/ffi/struct.rb
116
116
  - lib/hts/ffi/tbx.rb
117
+ - lib/hts/ffi/vcf.rb
117
118
  - lib/hts/ffi_constants.rb
118
119
  - lib/hts/tbx.rb
119
120
  - lib/hts/vcf.rb
@@ -134,11 +135,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
134
135
  version: '2.4'
135
136
  required_rubygems_version: !ruby/object:Gem::Requirement
136
137
  requirements:
137
- - - ">"
138
+ - - ">="
138
139
  - !ruby/object:Gem::Version
139
- version: 1.3.1
140
+ version: '0'
140
141
  requirements: []
141
- rubygems_version: 3.1.2
142
+ rubygems_version: 3.1.4
142
143
  signing_key:
143
144
  specification_version: 4
144
145
  summary: HTSlib bindings for Ruby