Module: HTS::LibHTS

Extended by:
FFI::Library
Defined in:
lib/hts/libhts.rb,
lib/hts/libhts/hts.rb,
lib/hts/libhts/sam.rb,
lib/hts/libhts/tbx.rb,
lib/hts/libhts/vcf.rb,
lib/hts/libhts/bgzf.rb,
lib/hts/libhts/cram.rb,
lib/hts/libhts/faidx.rb,
lib/hts/libhts/hfile.rb,
lib/hts/libhts/kfunc.rb,
lib/hts/libhts/constants.rb,
lib/hts/libhts/sam_funcs.rb,
lib/hts/libhts/vcf_funcs.rb,
lib/hts/libhts/thread_pool.rb

Defined Under Namespace

Classes: BGZF, Bam1, Bam1Core, BamPileup1, BamPileupCd, Bcf1, BcfDec, BcfFmt, BcfHdr, BcfHrec, BcfIdinfo, BcfIdpair, BcfInfo, BcfVariant, Faidx, HFILE, HtsFile, HtsFormat, HtsIdx, HtsItr, HtsOpt, HtsTpool, KSeq, KString, SamHdr, Tbx, TbxConf

Constant Summary collapse

BAM_CMATCH =

constants

0
BAM_CINS =
1
BAM_CDEL =
2
BAM_CREF_SKIP =
3
BAM_CSOFT_CLIP =
4
BAM_CHARD_CLIP =
5
BAM_CPAD =
6
BAM_CEQUAL =
7
BAM_CDIFF =
8
BAM_CBACK =
9
BAM_CIGAR_STR =
"MIDNSHP=XB"
BAM_CIGAR_SHIFT =
4
BAM_CIGAR_MASK =
0xf
BAM_CIGAR_TYPE =
0x3C1A7
BAM_FPAIRED =
1
BAM_FPROPER_PAIR =
2
BAM_FUNMAP =
4
BAM_FMUNMAP =
8
BAM_FREVERSE =
16
BAM_FMREVERSE =
32
BAM_FREAD1 =
64
BAM_FREAD2 =
128
BAM_FSECONDARY =
256
BAM_FQCFAIL =
512
BAM_FDUP =
1024
BAM_FSUPPLEMENTARY =
2048
BCF_HL_FLT =

constants

0
BCF_HL_INFO =

header line

1
BCF_HL_FMT =
2
BCF_HL_CTG =
3
BCF_HL_STR =

structured header line TAG=<A=..,B=..>

4
BCF_HL_GEN =

generic header line

5
BCF_HT_FLAG =

header type

0
BCF_HT_INT =
1
BCF_HT_REAL =
2
BCF_HT_STR =
3
BCF_HT_LONG =

BCF_HT_INT, but for int64_t values; VCF only!

(BCF_HT_INT | 0x100)
BCF_VL_FIXED =

variable length

0
BCF_VL_VAR =
1
BCF_VL_A =
2
BCF_VL_G =
3
BCF_VL_R =
4
BCF_DT_ID =

dictionary type

0
BCF_DT_CTG =
1
BCF_DT_SAMPLE =
2
BCF_BT_NULL =
0
BCF_BT_INT8 =
1
BCF_BT_INT16 =
2
BCF_BT_INT32 =
3
BCF_BT_INT64 =

Unofficial, for internal use only.

4
BCF_BT_FLOAT =
5
BCF_BT_CHAR =
7
VCF_REF =
0
VCF_SNP =
1
VCF_MNP =
2
VCF_INDEL =
4
VCF_OTHER =
8
VCF_BND =

breakend

16
VCF_OVERLAP =

overlapping deletion, ALT=*

32
BCF1_DIRTY_ID =
1
BCF1_DIRTY_ALS =
2
BCF1_DIRTY_FLT =
4
BCF1_DIRTY_INF =
8
BCF_ERR_CTG_UNDEF =
1
BCF_ERR_TAG_UNDEF =
2
BCF_ERR_NCOLS =
4
BCF_ERR_LIMITS =
8
BCF_ERR_CHAR =
16
BCF_ERR_CTG_INVALID =
32
BCF_ERR_TAG_INVALID =
64
BCF_UN_STR =

up to ALT inclusive

1
BCF_UN_FLT =

up to FILTER

2
BCF_UN_INFO =

up to INFO

4
BCF_UN_SHR =

all shared information

(BCF_UN_STR | BCF_UN_FLT | BCF_UN_INFO)
BCF_UN_FMT =

unpack format and each sample

8
BCF_UN_IND =

a synonym of BCF_UN_FMT

BCF_UN_FMT
BCF_UN_ALL =

everything

(BCF_UN_SHR | BCF_UN_FMT)
HtsLogLevel =

hts

enum(
  :off,            # All logging disabled.
  :error,          # Logging of errors only.
  :warning, 3,     # Logging of errors and warnings.
  :info,           # Logging of errors, warnings, and normal but significant events.
  :debug,          # Logging of all except the most detailed debug events.
  :trace           # All logging enabled.
)
HtsFormatCategory =
enum(
  :unknown_category,
  :sequence_data,    # Sequence data -- SAM, BAM, CRAM, etc
  :variant_data,     # Variant calling data -- VCF, BCF, etc
  :index_file,       # Index file associated with some data file
  :region_list,      # Coordinate intervals or regions -- BED, etc
  :category_maximum, 32_767
)
HtsExactFormat =
enum(
  :unknown_format,
  :binary_format, :text_format,
  :sam, :bam, :bai, :cram, :crai, :vcf, :bcf, :csi, :gzi, :tbi, :bed,
  :htsget, :json,
  :empty_format,
  :fasta_format, :fastq_format, :fai_format, :fqi_format,
  :hts_crypt4gh_format,
  :format_maximum, 32_767
)
HtsCompression =
enum(
  :no_compression, :gzip, :bgzf, :custom,
  :compression_maximum, 32_767
)
HtsFmtOption =
enum(
  :CRAM_OPT_DECODE_MD,
  :CRAM_OPT_PREFIX,
  :CRAM_OPT_VERBOSITY,   # obsolete, use hts_set_log_level() instead
  :CRAM_OPT_SEQS_PER_SLICE,
  :CRAM_OPT_SLICES_PER_CONTAINER,
  :CRAM_OPT_RANGE,
  :CRAM_OPT_VERSION,     # rename to :CRAM_version?
  :CRAM_OPT_EMBED_REF,
  :CRAM_OPT_IGNORE_MD5,
  :CRAM_OPT_REFERENCE,   # make general
  :CRAM_OPT_MULTI_SEQ_PER_SLICE,
  :CRAM_OPT_NO_REF,
  :CRAM_OPT_USE_BZIP2,
  :CRAM_OPT_SHARED_REF,
  :CRAM_OPT_NTHREADS,    # deprecated, use HTS_OPT_NTHREADS
  :CRAM_OPT_THREAD_POOL, # make general
  :CRAM_OPT_USE_LZMA,
  :CRAM_OPT_USE_RANS,
  :CRAM_OPT_REQUIRED_FIELDS,
  :CRAM_OPT_LOSSY_NAMES,
  :CRAM_OPT_BASES_PER_SLICE,
  :CRAM_OPT_STORE_MD,
  :CRAM_OPT_STORE_NM,
  :CRAM_OPT_RANGE_NOSEEK, # CRAM_OPT_RANGE minus the seek
  # General purpose
  :HTS_OPT_COMPRESSION_LEVEL, 100,
  :HTS_OPT_NTHREADS,
  :HTS_OPT_THREAD_POOL,
  :HTS_OPT_CACHE_SIZE,
  :HTS_OPT_BLOCK_SIZE
)
BamHdr =
SamHdr
SamFile =
HtsFile
FaiFormatOptions =

faidx

enum(:FAI_NONE, :FAI_FASTA, :FAI_FASTQ)
HtsTpoolProcess =

FIXME: struct

:pointer
HtsTpoolResult =
:pointer

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.attach_functionObject



19
20
21
22
23
# File 'lib/hts/libhts.rb', line 19

def self.attach_function(*)
  super
rescue FFI::NotFoundError => e
  warn e.message
end

.bam_cigar_gen(l, o) ⇒ Object



38
39
40
# File 'lib/hts/libhts/sam.rb', line 38

def bam_cigar_gen(l, o)
  l << BAM_CIGAR_SHIFT | o
end

.bam_cigar_op(c) ⇒ Object



26
27
28
# File 'lib/hts/libhts/sam.rb', line 26

def bam_cigar_op(c)
  c & BAM_CIGAR_MASK
end

.bam_cigar_opchr(c) ⇒ Object



34
35
36
# File 'lib/hts/libhts/sam.rb', line 34

def bam_cigar_opchr(c)
  ("#{BAM_CIGAR_STR}??????")[bam_cigar_op(c)]
end

.bam_cigar_oplen(c) ⇒ Object



30
31
32
# File 'lib/hts/libhts/sam.rb', line 30

def bam_cigar_oplen(c)
  c >> BAM_CIGAR_SHIFT
end

.bam_cigar_type(o) ⇒ Object



42
43
44
# File 'lib/hts/libhts/sam.rb', line 42

def bam_cigar_type(o)
  BAM_CIGAR_TYPE >> (o << 1) & 3
end

.bam_get_aux(b) ⇒ Object



87
88
89
# File 'lib/hts/libhts/sam.rb', line 87

def bam_get_aux(b)
  b[:data] + (b[:core][:n_cigar] << 2) + b[:core][:l_qname] + ((b[:core][:l_qseq] + 1) >> 1) + b[:core][:l_qseq]
end

.bam_get_cigar(b) ⇒ Object



75
76
77
# File 'lib/hts/libhts/sam.rb', line 75

def bam_get_cigar(b)
  b[:data] + b[:core][:l_qname]
end

.bam_get_l_aux(b) ⇒ Object



91
92
93
# File 'lib/hts/libhts/sam.rb', line 91

def bam_get_l_aux(b)
  b[:l_data] - (b[:core][:n_cigar] << 2) - b[:core][:l_qname] - b[:core][:l_qseq] - ((b[:core][:l_qseq] + 1) >> 1)
end

.bam_get_qname(b) ⇒ Object



71
72
73
# File 'lib/hts/libhts/sam.rb', line 71

def bam_get_qname(b)
  b[:data]
end

.bam_get_qual(b) ⇒ Object



83
84
85
# File 'lib/hts/libhts/sam.rb', line 83

def bam_get_qual(b)
  b[:data] + (b[:core][:n_cigar] << 2) + b[:core][:l_qname] + ((b[:core][:l_qseq] + 1) >> 1)
end

.bam_get_seq(b) ⇒ Object



79
80
81
# File 'lib/hts/libhts/sam.rb', line 79

def bam_get_seq(b)
  b[:data] + (b[:core][:n_cigar] << 2) + b[:core][:l_qname]
end

.bam_is_mrev(b) ⇒ Object



67
68
69
# File 'lib/hts/libhts/sam.rb', line 67

def bam_is_mrev(b)
  b[:core][:flag] & BAM_FMREVERSE != 0
end

.bam_is_rev(b) ⇒ Object



63
64
65
# File 'lib/hts/libhts/sam.rb', line 63

def bam_is_rev(b)
  b[:core][:flag] & BAM_FREVERSE != 0
end

.bam_seqi(s, i) ⇒ Object



95
96
97
# File 'lib/hts/libhts/sam.rb', line 95

def bam_seqi(s, i)
  s[(i) >> 1].read_uint8 >> ((~i & 1) << 2) & 0xf
end

.bcf_alleles2gt(a, b) ⇒ Object



155
156
157
# File 'lib/hts/libhts/vcf.rb', line 155

def bcf_alleles2gt(a, b)
  ((a) > (b) ? (a * (a + 1) / 2 + b) : (b * (b + 1) / 2 + a))
end

.bcf_get_format_char(hdr, line, tag, dst, ndst) ⇒ Object



183
184
185
# File 'lib/hts/libhts/vcf.rb', line 183

def bcf_get_format_char(hdr, line, tag, dst, ndst)
  bcf_get_format_values(hdr, line, tag, dst, ndst, BCF_HT_STR)
end

.bcf_get_format_float(hdr, line, tag, dst, ndst) ⇒ Object



179
180
181
# File 'lib/hts/libhts/vcf.rb', line 179

def bcf_get_format_float(hdr, line, tag, dst, ndst)
  bcf_get_format_values(hdr, line, tag, dst, ndst, BCF_HT_REAL)
end

.bcf_get_format_int32(hdr, line, tag, dst, ndst) ⇒ Object



175
176
177
# File 'lib/hts/libhts/vcf.rb', line 175

def bcf_get_format_int32(hdr, line, tag, dst, ndst)
  bcf_get_format_values(hdr, line, tag, dst, ndst, BCF_HT_INT)
end

.bcf_get_genotypes(hdr, line, dst, ndst) ⇒ Object



187
188
189
# File 'lib/hts/libhts/vcf.rb', line 187

def bcf_get_genotypes(hdr, line, dst, ndst)
  bcf_get_format_values(hdr, line, "GT", dst, ndst, BCF_HT_INT)
end

.bcf_get_info_flag(hdr, line, tag, dst, ndst) ⇒ Object



171
172
173
# File 'lib/hts/libhts/vcf.rb', line 171

def bcf_get_info_flag(hdr, line, tag, dst, ndst)
  bcf_get_info_values(hdr, line, tag, dst, ndst, BCF_HT_FLAG)
end

.bcf_get_info_float(hdr, line, tag, dst, ndst) ⇒ Object



163
164
165
# File 'lib/hts/libhts/vcf.rb', line 163

def bcf_get_info_float(hdr, line, tag, dst, ndst)
  bcf_get_info_values(hdr, line, tag, dst, ndst, BCF_HT_REAL)
end

.bcf_get_info_int32(hdr, line, tag, dst, ndst) ⇒ Object



159
160
161
# File 'lib/hts/libhts/vcf.rb', line 159

def bcf_get_info_int32(hdr, line, tag, dst, ndst)
  bcf_get_info_values(hdr, line, tag, dst, ndst, BCF_HT_INT)
end

.bcf_get_info_string(hdr, line, tag, dst, ndst) ⇒ Object



167
168
169
# File 'lib/hts/libhts/vcf.rb', line 167

def bcf_get_info_string(hdr, line, tag, dst, ndst)
  bcf_get_info_values(hdr, line, tag, dst, ndst, BCF_HT_STR)
end

.bcf_gt_allele(val) ⇒ Object



151
152
153
# File 'lib/hts/libhts/vcf.rb', line 151

def bcf_gt_allele(val)
  (((val) >> 1) - 1)
end

.bcf_gt_is_missing(val) ⇒ Object



143
144
145
# File 'lib/hts/libhts/vcf.rb', line 143

def bcf_gt_is_missing(val)
  ((val) >> 1 ? 0 : 1)
end

.bcf_gt_is_phased(idx) ⇒ Object



147
148
149
# File 'lib/hts/libhts/vcf.rb', line 147

def bcf_gt_is_phased(idx)
  ((idx) & 1)
end

.bcf_gt_missingObject



139
140
141
# File 'lib/hts/libhts/vcf.rb', line 139

def bcf_gt_missing
  0
end

.bcf_gt_phased(idx) ⇒ Object



131
132
133
# File 'lib/hts/libhts/vcf.rb', line 131

def bcf_gt_phased(idx)
  ((idx + 1) << 1 | 1)
end

.bcf_gt_unphased(idx) ⇒ Object



135
136
137
# File 'lib/hts/libhts/vcf.rb', line 135

def bcf_gt_unphased(idx)
  ((idx + 1) << 1)
end

.bcf_hdr_id2coltype(hdr, type, int_id) ⇒ Object



232
233
234
235
236
237
# File 'lib/hts/libhts/vcf.rb', line 232

def bcf_hdr_id2coltype(hdr, type, int_id)
  LibHTS::BcfIdpair.new(
    hdr[:id][LibHTS::BCF_DT_ID].to_ptr +
    LibHTS::BcfIdpair.size * int_id # offset
  )[:val][:info][type] & 0xf
end

.bcf_hdr_id2length(hdr, type, int_id) ⇒ Object



211
212
213
214
215
216
# File 'lib/hts/libhts/vcf.rb', line 211

def bcf_hdr_id2length(hdr, type, int_id)
  LibHTS::BcfIdpair.new(
    hdr[:id][LibHTS::BCF_DT_ID].to_ptr +
    LibHTS::BcfIdpair.size * int_id # offset
  )[:val][:info][type] >> 8 & 0xf
end

.bcf_hdr_id2name(hdr, rid) ⇒ Object



202
203
204
205
206
207
208
209
# File 'lib/hts/libhts/vcf.rb', line 202

def bcf_hdr_id2name(hdr, rid)
  return nil if hdr.null? || rid < 0 || rid >= hdr[:n][LibHTS::BCF_DT_CTG]

  LibHTS::BcfIdpair.new(
    hdr[:id][LibHTS::BCF_DT_CTG].to_ptr +
    LibHTS::BcfIdpair.size * rid # offset
  )[:key]
end

.bcf_hdr_id2number(hdr, type, int_id) ⇒ Object



218
219
220
221
222
223
# File 'lib/hts/libhts/vcf.rb', line 218

def bcf_hdr_id2number(hdr, type, int_id)
  LibHTS::BcfIdpair.new(
    hdr[:id][LibHTS::BCF_DT_ID].to_ptr +
    LibHTS::BcfIdpair.size * int_id # offset
  )[:val][:info][type] >> 12
end

.bcf_hdr_id2type(hdr, type, int_id) ⇒ Object



225
226
227
228
229
230
# File 'lib/hts/libhts/vcf.rb', line 225

def bcf_hdr_id2type(hdr, type, int_id)
  LibHTS::BcfIdpair.new(
    hdr[:id][LibHTS::BCF_DT_ID].to_ptr +
    LibHTS::BcfIdpair.size * int_id # offset
  )[:val][:info][type] >> 4 & 0xf
end

.bcf_hdr_int2id(hdr, type, int_id) ⇒ Object



191
192
193
194
195
196
# File 'lib/hts/libhts/vcf.rb', line 191

def bcf_hdr_int2id(hdr, type, int_id)
  LibHTS::BcfIdpair.new(
    hdr[:id][type].to_ptr +
    LibHTS::BcfIdpair.size * int_id # offsets
  )[:key]
end

.bcf_hdr_name2id(hdr, id) ⇒ Object



198
199
200
# File 'lib/hts/libhts/vcf.rb', line 198

def bcf_hdr_name2id(hdr, id)
  bcf_hdr_id2int(hdr, BCF_DT_CTG, id)
end

.bcf_hdr_nsamples(hdr) ⇒ Object



92
93
94
# File 'lib/hts/libhts/vcf.rb', line 92

def bcf_hdr_nsamples(hdr)
  hdr[:n][BCF_DT_SAMPLE]
end

.bcf_update_format_char(hdr, line, key, values, n) ⇒ Object



122
123
124
125
# File 'lib/hts/libhts/vcf.rb', line 122

def bcf_update_format_char(hdr, line, key, values, n)
  bcf_update_format(hdr, line, key, values, n,
                    BCF_HT_STR)
end

.bcf_update_format_float(hdr, line, key, values, n) ⇒ Object



117
118
119
120
# File 'lib/hts/libhts/vcf.rb', line 117

def bcf_update_format_float(hdr, line, key, values, n)
  bcf_update_format(hdr, line, key, values, n,
                    BCF_HT_REAL)
end

.bcf_update_format_int32(hdr, line, key, values, n) ⇒ Object



112
113
114
115
# File 'lib/hts/libhts/vcf.rb', line 112

def bcf_update_format_int32(hdr, line, key, values, n)
  bcf_update_format(hdr, line, key, values, n,
                    BCF_HT_INT)
end

.bcf_update_genotypes(hdr, line, gts, n) ⇒ Object



127
128
129
# File 'lib/hts/libhts/vcf.rb', line 127

def bcf_update_genotypes(hdr, line, gts, n)
  bcf_update_format(hdr, line, "GT", gts, n, BCF_HT_INT)
end

.bcf_update_info_flag(hdr, line, key, string, n) ⇒ Object



104
105
106
# File 'lib/hts/libhts/vcf.rb', line 104

def bcf_update_info_flag(hdr, line, key, string, n)
  bcf_update_info(hdr, line, key, string, n, BCF_HT_FLAG)
end

.bcf_update_info_float(hdr, line, key, values, n) ⇒ Object



100
101
102
# File 'lib/hts/libhts/vcf.rb', line 100

def bcf_update_info_float(hdr, line, key, values, n)
  bcf_update_info(hdr, line, key, values, n, BCF_HT_REAL)
end

.bcf_update_info_int32(hdr, line, key, values, n) ⇒ Object



96
97
98
# File 'lib/hts/libhts/vcf.rb', line 96

def bcf_update_info_int32(hdr, line, key, values, n)
  bcf_update_info(hdr, line, key, values, n, BCF_HT_INT)
end

.bcf_update_info_string(hdr, line, key, string) ⇒ Object



108
109
110
# File 'lib/hts/libhts/vcf.rb', line 108

def bcf_update_info_string(hdr, line, key, string)
  bcf_update_info(hdr, line, key, string, 1, BCF_HT_STR)
end

.bgzf_tell(fp) ⇒ Object

Return a virtual file pointer to the current location in the file.



79
80
81
# File 'lib/hts/libhts/bgzf.rb', line 79

def self.bgzf_tell(fp)
  (fp[:block_address] << 16) | (fp[:block_offset] & 0xFFFF)
end

.htell(fp) ⇒ Object

Report the current stream offset



48
49
50
51
52
53
# File 'lib/hts/libhts/hfile.rb', line 48

def self.htell(fp)
  # TODO: This is a hack. Is this OK?
  bg = FFI::Pointer.new(:int, fp.pointer.address + fp.offset_of(:begin)).read_int
  bf = FFI::Pointer.new(:int, fp.pointer.address + fp.offset_of(:buffer)).read_int
  fp[:offset] + (bg - bf)
end

.sam_itr_next(htsfp, itr, r) ⇒ Object

Get the next read from a SAM/BAM/CRAM iterator



346
347
348
349
350
351
352
# File 'lib/hts/libhts/sam_funcs.rb', line 346

def self.sam_itr_next(htsfp, itr, r)
  # FIXME: check if htsfp is compressed BGZF
  raise("Null iterator") if itr.null?

  # FIXME: check multi
  hts_itr_next(htsfp[:fp][:bgzf], itr, r, htsfp)
end

Instance Method Details

#bam_aux2A(pointer) ⇒ char

Get a character aux value

Returns:

  • (char)

    the return value of attach_function



423
424
425
426
# File 'lib/hts/libhts/sam_funcs.rb', line 423

attach_function \
:bam_aux2A,
[:pointer],
:char

#bam_aux2f(pointer) ⇒ double

Get an integer aux value

Returns:

  • (double)

    the return value of attach_function



417
418
419
420
# File 'lib/hts/libhts/sam_funcs.rb', line 417

attach_function \
:bam_aux2f,
[:pointer],
:double

#bam_aux2i(pointer) ⇒ int64

Get an integer aux value

Returns:

  • (int64)

    the return value of attach_function



411
412
413
414
# File 'lib/hts/libhts/sam_funcs.rb', line 411

attach_function \
:bam_aux2i,
[:pointer],
:int64

#bam_aux2Z(pointer) ⇒ string

Get a string aux value

Returns:

  • (string)

    the return value of attach_function



429
430
431
432
# File 'lib/hts/libhts/sam_funcs.rb', line 429

attach_function \
:bam_aux2Z,
[:pointer],
:string

#bam_aux_append(string) ⇒ int

Append tag data to a bam record

Returns:

  • (int)

    the return value of attach_function



453
454
455
456
# File 'lib/hts/libhts/sam_funcs.rb', line 453

attach_function \
:bam_aux_append,
[Bam1, :string, :string, :int, :pointer],
:int

#bam_aux_del(pointer) ⇒ int

Delete tag data from a bam record

Returns:

  • (int)

    the return value of attach_function



459
460
461
462
# File 'lib/hts/libhts/sam_funcs.rb', line 459

attach_function \
:bam_aux_del,
[Bam1, :pointer],
:int

#bam_aux_get(string) ⇒ pointer

Return a pointer to an aux record

Returns:

  • (pointer)

    the return value of attach_function



405
406
407
408
# File 'lib/hts/libhts/sam_funcs.rb', line 405

attach_function \
:bam_aux_get,
[Bam1, :string], # FIXME
:pointer

#bam_aux_update_array(string) ⇒ int

Update or add an array tag

Returns:

  • (int)

    the return value of attach_function



483
484
485
486
# File 'lib/hts/libhts/sam_funcs.rb', line 483

attach_function \
:bam_aux_update_array,
[Bam1, :string, :uint8, :uint32, :pointer],
:int

#bam_aux_update_float(string) ⇒ int

Update or add a floating-point tag

Returns:

  • (int)

    the return value of attach_function



477
478
479
480
# File 'lib/hts/libhts/sam_funcs.rb', line 477

attach_function \
:bam_aux_update_float,
[Bam1, :string, :float],
:int

#bam_aux_update_int(string) ⇒ int

Update or add an integer tag

Returns:

  • (int)

    the return value of attach_function



471
472
473
474
# File 'lib/hts/libhts/sam_funcs.rb', line 471

attach_function \
:bam_aux_update_int,
[Bam1, :string, :int64],
:int

#bam_aux_update_str(string) ⇒ int

Update or add a string-type tag

Returns:

  • (int)

    the return value of attach_function



465
466
467
468
# File 'lib/hts/libhts/sam_funcs.rb', line 465

attach_function \
:bam_aux_update_str,
[Bam1, :string, :int, :string],
:int

#bam_auxB2f(pointer) ⇒ double

Get a floating-point value from an array-type tag

Returns:

  • (double)

    the return value of attach_function



447
448
449
450
# File 'lib/hts/libhts/sam_funcs.rb', line 447

attach_function \
:bam_auxB2f,
%i[pointer uint],
:double

#bam_auxB2i(pointer) ⇒ int64

Get an integer value from an array-type tag

Returns:

  • (int64)

    the return value of attach_function



441
442
443
444
# File 'lib/hts/libhts/sam_funcs.rb', line 441

attach_function \
:bam_auxB2i,
%i[pointer uint],
:int64

#bam_auxB_len(pointer) ⇒ uint

Get the length of an array-type (‘B’) tag

Returns:

  • (uint)

    the return value of attach_function



435
436
437
438
# File 'lib/hts/libhts/sam_funcs.rb', line 435

attach_function \
:bam_auxB_len,
[:pointer],
:uint

#bam_cigar2qlen(int) ⇒ int64

Calculate query length from CIGAR data

Returns:

  • (int64)

    the return value of attach_function



240
241
242
243
# File 'lib/hts/libhts/sam_funcs.rb', line 240

attach_function \
:bam_cigar2qlen,
%i[int pointer],
:int64

#bam_cigar2rlen(int) ⇒ hts_pos_t

Calculate reference length from CIGAR data

Returns:

  • (hts_pos_t)

    the return value of attach_function



246
247
248
249
# File 'lib/hts/libhts/sam_funcs.rb', line 246

attach_function \
:bam_cigar2rlen,
%i[int pointer],
:hts_pos_t

#bam_copy1([Bam1, Bam1]) ⇒ by_ref

Copy alignment record data

Returns:

  • (by_ref)

    the return value of attach_function



228
229
230
231
# File 'lib/hts/libhts/sam_funcs.rb', line 228

attach_function \
:bam_copy1,
[Bam1, Bam1],
Bam1.by_ref

#bam_destroy1([Bam1]) ⇒ void

This method returns an undefined value.

Destroy a bam1_t structure



210
211
212
213
# File 'lib/hts/libhts/sam_funcs.rb', line 210

attach_function \
:bam_destroy1,
[Bam1],
:void

#bam_dup1([Bam1]) ⇒ by_ref

Create a duplicate alignment record

Returns:

  • (by_ref)

    the return value of attach_function



234
235
236
237
# File 'lib/hts/libhts/sam_funcs.rb', line 234

attach_function \
:bam_dup1,
[Bam1],
Bam1.by_ref

#bam_endpos([Bam1]) ⇒ hts_pos_t

Calculate the rightmost base position of an alignment on the reference genome.

Returns:

  • (hts_pos_t)

    the return value of attach_function



252
253
254
255
# File 'lib/hts/libhts/sam_funcs.rb', line 252

attach_function \
:bam_endpos,
[Bam1],
:hts_pos_t

#bam_flag2str(int) ⇒ string

Returns the return value of attach_function.

Returns:

  • (string)

    the return value of attach_function



262
263
264
265
# File 'lib/hts/libhts/sam_funcs.rb', line 262

attach_function \
:bam_flag2str,
[:int],
:string

#bam_hdr_read([BGZF]) ⇒ by_ref

Read the header from a BAM compressed file.

Returns:

  • (by_ref)

    the return value of attach_function



12
13
14
15
# File 'lib/hts/libhts/sam_funcs.rb', line 12

attach_function \
:bam_hdr_read,
[BGZF],
SamHdr.by_ref

#bam_hdr_write([BGZF, SamHdr]) ⇒ int

Writes the header to a BAM file.

Returns:

  • (int)

    the return value of attach_function



18
19
20
21
# File 'lib/hts/libhts/sam_funcs.rb', line 18

attach_function \
:bam_hdr_write,
[BGZF, SamHdr],
:int

#bam_init1([]) ⇒ by_ref

Create a new bam1_t alignment structure

Returns:

  • (by_ref)

    the return value of attach_function



204
205
206
207
# File 'lib/hts/libhts/sam_funcs.rb', line 204

attach_function \
:bam_init1,
[],
Bam1.by_ref

#bam_mplp64_auto(bam_mplp) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



573
574
575
576
# File 'lib/hts/libhts/sam_funcs.rb', line 573

attach_function \
:bam_mplp64_auto,
%i[bam_mplp pointer pointer pointer pointer], # BamPileup1T
:int

#bam_mplp_auto(bam_mplp) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



568
569
570
571
# File 'lib/hts/libhts/sam_funcs.rb', line 568

attach_function \
:bam_mplp_auto,
%i[bam_mplp pointer pointer pointer pointer], # BamPileup1T
:int

#bam_mplp_destroy(bam_mplp) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



558
559
560
561
# File 'lib/hts/libhts/sam_funcs.rb', line 558

attach_function \
:bam_mplp_destroy,
[:bam_mplp],
:void

#bam_mplp_init(int) ⇒ bam_mplp

Get pileup padded insertion sequence bam_plp_insertion

Returns:

  • (bam_mplp)

    the return value of attach_function



548
549
550
551
# File 'lib/hts/libhts/sam_funcs.rb', line 548

attach_function \
:bam_mplp_init,
%i[int bam_plp_auto_f pointer],
:bam_mplp

#bam_mplp_init_overlaps(bam_mplp) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



553
554
555
556
# File 'lib/hts/libhts/sam_funcs.rb', line 553

attach_function \
:bam_mplp_init_overlaps,
[:bam_mplp],
:int

#bam_mplp_reset(bam_mplp) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



578
579
580
581
# File 'lib/hts/libhts/sam_funcs.rb', line 578

attach_function \
:bam_mplp_reset,
[:bam_mplp],
:void

#bam_mplp_set_maxcnt(bam_mplp) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



563
564
565
566
# File 'lib/hts/libhts/sam_funcs.rb', line 563

attach_function \
:bam_mplp_set_maxcnt,
%i[bam_mplp int],
:void

#bam_plp64_auto(bam_plp) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



519
520
521
522
# File 'lib/hts/libhts/sam_funcs.rb', line 519

attach_function \
:bam_plp64_auto,
%i[bam_plp pointer pointer pointer],
BamPileup1.by_ref

#bam_plp64_next(bam_plp) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



514
515
516
517
# File 'lib/hts/libhts/sam_funcs.rb', line 514

attach_function \
:bam_plp64_next,
%i[bam_plp pointer pointer pointer],
BamPileup1.by_ref

#bam_plp_auto(bam_plp) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



509
510
511
512
# File 'lib/hts/libhts/sam_funcs.rb', line 509

attach_function \
:bam_plp_auto,
%i[bam_plp pointer pointer pointer],
BamPileup1.by_ref

#bam_plp_destroy(bam_plp) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



494
495
496
497
# File 'lib/hts/libhts/sam_funcs.rb', line 494

attach_function \
:bam_plp_destroy,
[:bam_plp],
:void

#bam_plp_init(bam_plp_auto_f) ⇒ bam_plp

sets an iterator over multiple

Returns:

  • (bam_plp)

    the return value of attach_function



489
490
491
492
# File 'lib/hts/libhts/sam_funcs.rb', line 489

attach_function \
:bam_plp_init,
%i[bam_plp_auto_f pointer],
:bam_plp

#bam_plp_insertion(pointer) ⇒ int

sets a callback to initialise any per-pileup1_t fields.

Returns:

  • (int)

    the return value of attach_function



535
536
537
538
# File 'lib/hts/libhts/sam_funcs.rb', line 535

attach_function \
:bam_plp_insertion,
[BamPileup1, KString, :pointer],
:int

#bam_plp_next(bam_plp) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



504
505
506
507
# File 'lib/hts/libhts/sam_funcs.rb', line 504

attach_function \
:bam_plp_next,
%i[bam_plp pointer pointer pointer],
BamPileup1.by_ref

#bam_plp_push(bam_plp) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



499
500
501
502
# File 'lib/hts/libhts/sam_funcs.rb', line 499

attach_function \
:bam_plp_push,
[:bam_plp, Bam1],
:int

#bam_plp_reset(bam_plp) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



529
530
531
532
# File 'lib/hts/libhts/sam_funcs.rb', line 529

attach_function \
:bam_plp_reset,
[:bam_plp],
:void

#bam_plp_set_maxcnt(bam_plp) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



524
525
526
527
# File 'lib/hts/libhts/sam_funcs.rb', line 524

attach_function \
:bam_plp_set_maxcnt,
%i[bam_plp int],
:void

#bam_read1([BGZF, Bam1]) ⇒ int

Read a BAM format alignment record

Returns:

  • (int)

    the return value of attach_function



216
217
218
219
# File 'lib/hts/libhts/sam_funcs.rb', line 216

attach_function \
:bam_read1,
[BGZF, Bam1],
:int

#bam_set_qname(string) ⇒ int

Set the name of the query

Returns:

  • (int)

    the return value of attach_function



268
269
270
271
# File 'lib/hts/libhts/sam_funcs.rb', line 268

attach_function \
:bam_set_qname,
[Bam1, :string],
:int

#bam_str2flag(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



257
258
259
260
# File 'lib/hts/libhts/sam_funcs.rb', line 257

attach_function \
:bam_str2flag,
[:string],
:int

#bam_write1([BGZF, Bam1]) ⇒ int

Write a BAM format alignment record

Returns:

  • (int)

    the return value of attach_function



222
223
224
225
# File 'lib/hts/libhts/sam_funcs.rb', line 222

attach_function \
:bam_write1,
[BGZF, Bam1],
:int

#bcf_add_filter(int) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



280
281
282
283
# File 'lib/hts/libhts/vcf_funcs.rb', line 280

attach_function \
:bcf_add_filter,
[BcfHdr, Bcf1, :int],
:int

#bcf_add_id(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



310
311
312
313
# File 'lib/hts/libhts/vcf_funcs.rb', line 310

attach_function \
:bcf_add_id,
[BcfHdr, Bcf1, :string],
:int

#bcf_clear([Bcf1]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



30
31
32
33
# File 'lib/hts/libhts/vcf_funcs.rb', line 30

attach_function \
:bcf_clear,
[Bcf1],
:void

#bcf_copy([Bcf1, Bcf1]) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



85
86
87
88
# File 'lib/hts/libhts/vcf_funcs.rb', line 85

attach_function \
:bcf_copy,
[Bcf1, Bcf1],
Bcf1.by_ref

#bcf_destroy([Bcf1]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



20
21
22
23
# File 'lib/hts/libhts/vcf_funcs.rb', line 20

attach_function \
:bcf_destroy,
[Bcf1],
:void

#bcf_dup([Bcf1]) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



80
81
82
83
# File 'lib/hts/libhts/vcf_funcs.rb', line 80

attach_function \
:bcf_dup,
[Bcf1],
Bcf1.by_ref

#bcf_empty([Bcf1]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



25
26
27
28
# File 'lib/hts/libhts/vcf_funcs.rb', line 25

attach_function \
:bcf_empty,
[Bcf1],
:void

#bcf_enc_vchar(int) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



380
381
382
383
# File 'lib/hts/libhts/vcf_funcs.rb', line 380

attach_function \
:bcf_enc_vchar,
[KString, :int, :string],
:int

#bcf_enc_vfloat(int) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



390
391
392
393
# File 'lib/hts/libhts/vcf_funcs.rb', line 390

attach_function \
:bcf_enc_vfloat,
[KString, :int, :pointer],
:int

#bcf_enc_vint(int) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



385
386
387
388
# File 'lib/hts/libhts/vcf_funcs.rb', line 385

attach_function \
:bcf_enc_vint,
[KString, :int, :pointer, :int],
:int

#bcf_fmt_array(int) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



370
371
372
373
# File 'lib/hts/libhts/vcf_funcs.rb', line 370

attach_function \
:bcf_fmt_array,
[KString, :int, :int, :pointer],
:int

#bcf_fmt_sized_array(pointer) ⇒ uint8_t

Returns the return value of attach_function.

Returns:

  • (uint8_t)

    the return value of attach_function



375
376
377
378
# File 'lib/hts/libhts/vcf_funcs.rb', line 375

attach_function \
:bcf_fmt_sized_array,
[KString, :pointer],
:uint8_t

#bcf_get_fmt(string) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



330
331
332
333
# File 'lib/hts/libhts/vcf_funcs.rb', line 330

attach_function \
:bcf_get_fmt,
[BcfHdr, Bcf1, :string],
BcfFmt.by_ref

#bcf_get_fmt_id(int) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



340
341
342
343
# File 'lib/hts/libhts/vcf_funcs.rb', line 340

attach_function \
:bcf_get_fmt_id,
[Bcf1, :int],
BcfFmt.by_ref

#bcf_get_format_string(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



355
356
357
358
# File 'lib/hts/libhts/vcf_funcs.rb', line 355

attach_function \
:bcf_get_format_string,
[BcfHdr, Bcf1, :string, :pointer, :pointer],
:int

#bcf_get_format_values(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



360
361
362
363
# File 'lib/hts/libhts/vcf_funcs.rb', line 360

attach_function \
:bcf_get_format_values,
[BcfHdr, Bcf1, :string, :pointer, :pointer, :int],
:int

#bcf_get_info(string) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



335
336
337
338
# File 'lib/hts/libhts/vcf_funcs.rb', line 335

attach_function \
:bcf_get_info,
[BcfHdr, Bcf1, :string],
BcfInfo.by_ref

#bcf_get_info_id(int) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



345
346
347
348
# File 'lib/hts/libhts/vcf_funcs.rb', line 345

attach_function \
:bcf_get_info_id,
[Bcf1, :int],
BcfInfo.by_ref

#bcf_get_info_values(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



350
351
352
353
# File 'lib/hts/libhts/vcf_funcs.rb', line 350

attach_function \
:bcf_get_info_values,
[BcfHdr, Bcf1, :string, :pointer, :pointer, :int],
:int

#bcf_get_variant_type(int) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



265
266
267
268
# File 'lib/hts/libhts/vcf_funcs.rb', line 265

attach_function \
:bcf_get_variant_type,
[Bcf1, :int],
:int

#bcf_get_variant_types([Bcf1]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



260
261
262
263
# File 'lib/hts/libhts/vcf_funcs.rb', line 260

attach_function \
:bcf_get_variant_types,
[Bcf1],
:int

#bcf_has_filter(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



290
291
292
293
# File 'lib/hts/libhts/vcf_funcs.rb', line 290

attach_function \
:bcf_has_filter,
[BcfHdr, Bcf1, :string],
:int

#bcf_hdr_add_hrec([BcfHdr, BcfHrec]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



210
211
212
213
# File 'lib/hts/libhts/vcf_funcs.rb', line 210

attach_function \
:bcf_hdr_add_hrec,
[BcfHdr, BcfHrec],
:int

#bcf_hdr_add_sample(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



135
136
137
138
# File 'lib/hts/libhts/vcf_funcs.rb', line 135

attach_function \
:bcf_hdr_add_sample,
[BcfHdr, :string],
:int

#bcf_hdr_append(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



155
156
157
158
# File 'lib/hts/libhts/vcf_funcs.rb', line 155

attach_function \
:bcf_hdr_append,
[BcfHdr, :string],
:int

#bcf_hdr_destroy([BcfHdr]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



10
11
12
13
# File 'lib/hts/libhts/vcf_funcs.rb', line 10

attach_function \
:bcf_hdr_destroy,
[BcfHdr],
:void

#bcf_hdr_dup([BcfHdr]) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



125
126
127
128
# File 'lib/hts/libhts/vcf_funcs.rb', line 125

attach_function \
:bcf_hdr_dup,
[BcfHdr],
BcfHdr.by_ref

#bcf_hdr_fmt_text(int) ⇒ string

Returns the return value of attach_function.

Returns:

  • (string)

    the return value of attach_function



150
151
152
153
# File 'lib/hts/libhts/vcf_funcs.rb', line 150

attach_function \
:bcf_hdr_fmt_text,
[BcfHdr, :int, :pointer],
:string

#bcf_hdr_format(int) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



145
146
147
148
# File 'lib/hts/libhts/vcf_funcs.rb', line 145

attach_function \
:bcf_hdr_format,
[BcfHdr, :int, KString],
:int

#bcf_hdr_get_hrec(int) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



215
216
217
218
# File 'lib/hts/libhts/vcf_funcs.rb', line 215

attach_function \
:bcf_hdr_get_hrec,
[BcfHdr, :int, :string, :string, :string],
BcfHrec.by_ref

#bcf_hdr_get_version([BcfHdr]) ⇒ string

Returns the return value of attach_function.

Returns:

  • (string)

    the return value of attach_function



165
166
167
168
# File 'lib/hts/libhts/vcf_funcs.rb', line 165

attach_function \
:bcf_hdr_get_version,
[BcfHdr],
:string

#bcf_hdr_id2int(int) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



365
366
367
368
# File 'lib/hts/libhts/vcf_funcs.rb', line 365

attach_function \
:bcf_hdr_id2int,
[BcfHdr, :int, :string],
:int

#bcf_hdr_init(string) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



5
6
7
8
# File 'lib/hts/libhts/vcf_funcs.rb', line 5

attach_function \
:bcf_hdr_init,
[:string],
BcfHdr.by_ref

#bcf_hdr_merge([BcfHdr, BcfHdr]) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



130
131
132
133
# File 'lib/hts/libhts/vcf_funcs.rb', line 130

attach_function \
:bcf_hdr_merge,
[BcfHdr, BcfHdr],
BcfHdr.by_ref

#bcf_hdr_parse(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



190
191
192
193
# File 'lib/hts/libhts/vcf_funcs.rb', line 190

attach_function \
:bcf_hdr_parse,
[BcfHdr, :string],
:int

#bcf_hdr_parse_line(string) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



200
201
202
203
# File 'lib/hts/libhts/vcf_funcs.rb', line 200

attach_function \
:bcf_hdr_parse_line,
[BcfHdr, :string, :pointer],
BcfHrec.by_ref

#bcf_hdr_printf(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



160
161
162
163
# File 'lib/hts/libhts/vcf_funcs.rb', line 160

attach_function \
:bcf_hdr_printf,
[BcfHdr, :string, :varargs],
:int

#bcf_hdr_read([HtsFile]) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



35
36
37
38
# File 'lib/hts/libhts/vcf_funcs.rb', line 35

attach_function \
:bcf_hdr_read,
[HtsFile],
BcfHdr.by_ref

#bcf_hdr_remove(int) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



175
176
177
178
# File 'lib/hts/libhts/vcf_funcs.rb', line 175

attach_function \
:bcf_hdr_remove,
[BcfHdr, :int, :string],
:void

#bcf_hdr_seqnames(pointer) ⇒ pointer

Returns the return value of attach_function.

Returns:

  • (pointer)

    the return value of attach_function



185
186
187
188
# File 'lib/hts/libhts/vcf_funcs.rb', line 185

attach_function \
:bcf_hdr_seqnames,
[BcfHdr, :pointer],
:pointer

#bcf_hdr_set(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



140
141
142
143
# File 'lib/hts/libhts/vcf_funcs.rb', line 140

attach_function \
:bcf_hdr_set,
[BcfHdr, :string],
:int

#bcf_hdr_set_samples(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



40
41
42
43
# File 'lib/hts/libhts/vcf_funcs.rb', line 40

attach_function \
:bcf_hdr_set_samples,
[BcfHdr, :string, :int],
:int

#bcf_hdr_set_version(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



170
171
172
173
# File 'lib/hts/libhts/vcf_funcs.rb', line 170

attach_function \
:bcf_hdr_set_version,
[BcfHdr, :string],
:int

#bcf_hdr_subset(int) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



180
181
182
183
# File 'lib/hts/libhts/vcf_funcs.rb', line 180

attach_function \
:bcf_hdr_subset,
[BcfHdr, :int, :pointer, :pointer],
BcfHdr.by_ref

#bcf_hdr_sync([BcfHdr]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



195
196
197
198
# File 'lib/hts/libhts/vcf_funcs.rb', line 195

attach_function \
:bcf_hdr_sync,
[BcfHdr],
:int

#bcf_hdr_write([HtsFile, BcfHdr]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



50
51
52
53
# File 'lib/hts/libhts/vcf_funcs.rb', line 50

attach_function \
:bcf_hdr_write,
[HtsFile, BcfHdr],
:int

#bcf_hrec_add_key(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



225
226
227
228
# File 'lib/hts/libhts/vcf_funcs.rb', line 225

attach_function \
:bcf_hrec_add_key,
[BcfHrec, :string, :size_t],
:int

#bcf_hrec_destroy([BcfHrec]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



245
246
247
248
# File 'lib/hts/libhts/vcf_funcs.rb', line 245

attach_function \
:bcf_hrec_destroy,
[BcfHrec],
:void

#bcf_hrec_dup([BcfHrec]) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



220
221
222
223
# File 'lib/hts/libhts/vcf_funcs.rb', line 220

attach_function \
:bcf_hrec_dup,
[BcfHrec],
BcfHrec.by_ref

#bcf_hrec_find_key(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



235
236
237
238
# File 'lib/hts/libhts/vcf_funcs.rb', line 235

attach_function \
:bcf_hrec_find_key,
[BcfHrec, :string],
:int

#bcf_hrec_format([BcfHrec, KString]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



205
206
207
208
# File 'lib/hts/libhts/vcf_funcs.rb', line 205

attach_function \
:bcf_hrec_format,
[BcfHrec, KString],
:int

#bcf_hrec_set_val(int) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



230
231
232
233
# File 'lib/hts/libhts/vcf_funcs.rb', line 230

attach_function \
:bcf_hrec_set_val,
[BcfHrec, :int, :string, :size_t, :int],
:int

#bcf_idx_init(int) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



420
421
422
423
# File 'lib/hts/libhts/vcf_funcs.rb', line 420

attach_function \
:bcf_idx_init,
[HtsFile, BcfHdr, :int, :string],
:int

#bcf_idx_save([HtsFile]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



425
426
427
428
# File 'lib/hts/libhts/vcf_funcs.rb', line 425

attach_function \
:bcf_idx_save,
[HtsFile],
:int

#bcf_index_build(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



405
406
407
408
# File 'lib/hts/libhts/vcf_funcs.rb', line 405

attach_function \
:bcf_index_build,
%i[string int],
:int

#bcf_index_build2(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



410
411
412
413
# File 'lib/hts/libhts/vcf_funcs.rb', line 410

attach_function \
:bcf_index_build2,
%i[string string int],
:int

#bcf_index_build3(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



415
416
417
418
# File 'lib/hts/libhts/vcf_funcs.rb', line 415

attach_function \
:bcf_index_build3,
%i[string string int int],
:int

#bcf_index_load2(string) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



395
396
397
398
# File 'lib/hts/libhts/vcf_funcs.rb', line 395

attach_function \
:bcf_index_load2,
%i[string string],
HtsIdx.by_ref

#bcf_index_load3(string) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



400
401
402
403
# File 'lib/hts/libhts/vcf_funcs.rb', line 400

attach_function \
:bcf_index_load3,
%i[string string int],
HtsIdx.by_ref

#bcf_init([]) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



15
16
17
18
# File 'lib/hts/libhts/vcf_funcs.rb', line 15

attach_function \
:bcf_init,
[],
Bcf1.by_ref

#bcf_is_snp([Bcf1]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



270
271
272
273
# File 'lib/hts/libhts/vcf_funcs.rb', line 270

attach_function \
:bcf_is_snp,
[Bcf1],
:int

#bcf_read([HtsFile, BcfHdr, Bcf1]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



70
71
72
73
# File 'lib/hts/libhts/vcf_funcs.rb', line 70

attach_function \
:bcf_read,
[HtsFile, BcfHdr, Bcf1],
:int

#bcf_readrec(pointer) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



115
116
117
118
# File 'lib/hts/libhts/vcf_funcs.rb', line 115

attach_function \
:bcf_readrec,
[BGZF, :pointer, :pointer, :pointer, :hts_pos_t, :hts_pos_t],
:int

#bcf_remove_filter(int) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



285
286
287
288
# File 'lib/hts/libhts/vcf_funcs.rb', line 285

attach_function \
:bcf_remove_filter,
[BcfHdr, Bcf1, :int, :int],
:int

#bcf_subset(int) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



250
251
252
253
# File 'lib/hts/libhts/vcf_funcs.rb', line 250

attach_function \
:bcf_subset,
[BcfHdr, Bcf1, :int, :pointer],
:int

#bcf_subset_format([BcfHdr, Bcf1]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



45
46
47
48
# File 'lib/hts/libhts/vcf_funcs.rb', line 45

attach_function \
:bcf_subset_format,
[BcfHdr, Bcf1],
:int

#bcf_translate([BcfHdr, BcfHdr, Bcf1]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



255
256
257
258
# File 'lib/hts/libhts/vcf_funcs.rb', line 255

attach_function \
:bcf_translate,
[BcfHdr, BcfHdr, Bcf1],
:int

#bcf_unpack(int) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



75
76
77
78
# File 'lib/hts/libhts/vcf_funcs.rb', line 75

attach_function \
:bcf_unpack,
[Bcf1, :int],
:int

#bcf_update_alleles(pointer) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



295
296
297
298
# File 'lib/hts/libhts/vcf_funcs.rb', line 295

attach_function \
:bcf_update_alleles,
[BcfHdr, Bcf1, :pointer, :int],
:int

#bcf_update_alleles_str(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



300
301
302
303
# File 'lib/hts/libhts/vcf_funcs.rb', line 300

attach_function \
:bcf_update_alleles_str,
[BcfHdr, Bcf1, :string],
:int

#bcf_update_filter(pointer) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



275
276
277
278
# File 'lib/hts/libhts/vcf_funcs.rb', line 275

attach_function \
:bcf_update_filter,
[BcfHdr, Bcf1, :pointer, :int],
:int

#bcf_update_format(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



325
326
327
328
# File 'lib/hts/libhts/vcf_funcs.rb', line 325

attach_function \
:bcf_update_format,
[BcfHdr, Bcf1, :string, :pointer, :int, :int],
:int

#bcf_update_format_string(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



320
321
322
323
# File 'lib/hts/libhts/vcf_funcs.rb', line 320

attach_function \
:bcf_update_format_string,
[BcfHdr, Bcf1, :string, :pointer, :int],
:int

#bcf_update_id(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



305
306
307
308
# File 'lib/hts/libhts/vcf_funcs.rb', line 305

attach_function \
:bcf_update_id,
[BcfHdr, Bcf1, :string],
:int

#bcf_update_info(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



315
316
317
318
# File 'lib/hts/libhts/vcf_funcs.rb', line 315

attach_function \
:bcf_update_info,
[BcfHdr, Bcf1, :string, :pointer, :int, :int],
:int

#bcf_write([HtsFile, BcfHdr, Bcf1]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



90
91
92
93
# File 'lib/hts/libhts/vcf_funcs.rb', line 90

attach_function \
:bcf_write,
[HtsFile, BcfHdr, Bcf1],
:int

#bgzf_block_write(pointer) ⇒ ssize_t

Write length bytes from data to the file, the index will be used to decide the amount of uncompressed data to be writen to each bgzip block.

Returns:

  • (ssize_t)

    the return value of attach_function



45
46
47
48
# File 'lib/hts/libhts/bgzf.rb', line 45

attach_function \
:bgzf_block_write,
[BGZF, :pointer, :size_t],
:ssize_t

#bgzf_check_EOF([BGZF]) ⇒ int

Check if the BGZF end-of-file (EOF) marker is present

Returns:

  • (int)

    the return value of attach_function



90
91
92
93
# File 'lib/hts/libhts/bgzf.rb', line 90

attach_function \
:bgzf_check_EOF,
[BGZF],
:int

#bgzf_close([HFILE]) ⇒ int

Close the BGZF and free all associated resources.

Returns:

  • (int)

    the return value of attach_function



25
26
27
28
# File 'lib/hts/libhts/bgzf.rb', line 25

attach_function \
:bgzf_close,
[HFILE],
:int

#bgzf_compress(pointer) ⇒ int

Compress a single BGZF block.

Returns:

  • (int)

    the return value of attach_function



152
153
154
155
# File 'lib/hts/libhts/bgzf.rb', line 152

attach_function \
:bgzf_compress,
%i[pointer pointer pointer size_t int],
:int

#bgzf_compression([BGZF]) ⇒ int

Return the file’s compression format

Returns:

  • (int)

    the return value of attach_function



96
97
98
99
# File 'lib/hts/libhts/bgzf.rb', line 96

attach_function \
:bgzf_compression,
[BGZF],
:int

#bgzf_dopen(int) ⇒ by_ref

Open an existing file descriptor for reading or writing.

Returns:

  • (by_ref)

    the return value of attach_function



7
8
9
10
# File 'lib/hts/libhts/bgzf.rb', line 7

attach_function \
:bgzf_dopen,
%i[int string],
BGZF.by_ref

#bgzf_flush([BGZF]) ⇒ int

Write the data in the buffer to the file.

Returns:

  • (int)

    the return value of attach_function



73
74
75
76
# File 'lib/hts/libhts/bgzf.rb', line 73

attach_function \
:bgzf_flush,
[BGZF],
:int

#bgzf_flush_try(ssize_t) ⇒ int

Flush the file if the remaining buffer size is smaller than size

Returns:

  • (int)

    the return value of attach_function



114
115
116
117
# File 'lib/hts/libhts/bgzf.rb', line 114

attach_function \
:bgzf_flush_try,
[BGZF, :ssize_t],
:int

#bgzf_getc([BGZF]) ⇒ int

Read one byte from a BGZF file. It is faster than bgzf_read()

Returns:

  • (int)

    the return value of attach_function



120
121
122
123
# File 'lib/hts/libhts/bgzf.rb', line 120

attach_function \
:bgzf_getc,
[BGZF],
:int

#bgzf_getline(int) ⇒ int

Read one line from a BGZF file. It is faster than bgzf_getc()

Returns:

  • (int)

    the return value of attach_function



126
127
128
129
# File 'lib/hts/libhts/bgzf.rb', line 126

attach_function \
:bgzf_getline,
[BGZF, :int, KString],
:int

#bgzf_hopen(string) ⇒ by_ref

Open an existing hFILE stream for reading or writing.

Returns:

  • (by_ref)

    the return value of attach_function



19
20
21
22
# File 'lib/hts/libhts/bgzf.rb', line 19

attach_function \
:bgzf_hopen,
[HFILE, :string],
BGZF.by_ref

#bgzf_index_build_init([BGZF]) ⇒ int

Tell BGZF to build index while compressing.

Returns:

  • (int)

    the return value of attach_function



170
171
172
173
# File 'lib/hts/libhts/bgzf.rb', line 170

attach_function \
:bgzf_index_build_init,
[BGZF],
:int

#bgzf_index_dump(string) ⇒ int

Save BGZF index

Returns:

  • (int)

    the return value of attach_function



188
189
190
191
# File 'lib/hts/libhts/bgzf.rb', line 188

attach_function \
:bgzf_index_dump,
[BGZF, :string, :string],
:int

#bgzf_index_dump_hfile(string) ⇒ int

Write a BGZF index to an hFILE

Returns:

  • (int)

    the return value of attach_function



194
195
196
197
# File 'lib/hts/libhts/bgzf.rb', line 194

attach_function \
:bgzf_index_dump_hfile,
[BGZF, HFILE, :string],
:int

#bgzf_index_load(string) ⇒ int

Load BGZF index

Returns:

  • (int)

    the return value of attach_function



176
177
178
179
# File 'lib/hts/libhts/bgzf.rb', line 176

attach_function \
:bgzf_index_load,
[BGZF, :string, :string],
:int

#bgzf_index_load_hfile(string) ⇒ int

Load BGZF index from an hFILE

Returns:

  • (int)

    the return value of attach_function



182
183
184
185
# File 'lib/hts/libhts/bgzf.rb', line 182

attach_function \
:bgzf_index_load_hfile,
[BGZF, HFILE, :string],
:int

#bgzf_is_bgzf(string) ⇒ int

Check if a file is in the BGZF format

Returns:

  • (int)

    the return value of attach_function



102
103
104
105
# File 'lib/hts/libhts/bgzf.rb', line 102

attach_function \
:bgzf_is_bgzf,
[:string],
:int

#bgzf_mt(int) ⇒ int

Enable multi-threading (only effective when the library was compiled with -DBGZF_MT)

Returns:

  • (int)

    the return value of attach_function



146
147
148
149
# File 'lib/hts/libhts/bgzf.rb', line 146

attach_function \
:bgzf_mt,
[BGZF, :int, :int],
:int

#bgzf_open(string) ⇒ by_ref

Open the specified file for reading or writing.

Returns:

  • (by_ref)

    the return value of attach_function



13
14
15
16
# File 'lib/hts/libhts/bgzf.rb', line 13

attach_function \
:bgzf_open,
%i[string string],
BGZF.by_ref

#bgzf_peek([BGZF]) ⇒ int

Returns the next byte in the file without consuming it.

Returns:

  • (int)

    the return value of attach_function



51
52
53
54
# File 'lib/hts/libhts/bgzf.rb', line 51

attach_function \
:bgzf_peek,
[BGZF],
:int

#bgzf_raw_read(pointer) ⇒ ssize_t

Read up to length bytes directly from the underlying stream without decompressing. Bypasses BGZF blocking, so must be used with care in specialised circumstances only.

Returns:

  • (ssize_t)

    the return value of attach_function



59
60
61
62
# File 'lib/hts/libhts/bgzf.rb', line 59

attach_function \
:bgzf_raw_read,
[BGZF, :pointer, :size_t],
:ssize_t

#bgzf_raw_write(pointer) ⇒ ssize_t

Write length bytes directly to the underlying stream without compressing. Bypasses BGZF blocking, so must be used with care in specialised circumstances only.

Returns:

  • (ssize_t)

    the return value of attach_function



67
68
69
70
# File 'lib/hts/libhts/bgzf.rb', line 67

attach_function \
:bgzf_raw_write,
[BGZF, :pointer, :size_t],
:ssize_t

#bgzf_read(pointer) ⇒ ssize_t

Read up to length bytes from the file storing into data.

Returns:

  • (ssize_t)

    the return value of attach_function



31
32
33
34
# File 'lib/hts/libhts/bgzf.rb', line 31

attach_function \
:bgzf_read,
[HFILE, :pointer, :size_t],
:ssize_t

#bgzf_read_block([BGZF]) ⇒ int

Read the next BGZF block.

Returns:

  • (int)

    the return value of attach_function



132
133
134
135
# File 'lib/hts/libhts/bgzf.rb', line 132

attach_function \
:bgzf_read_block,
[BGZF],
:int

#bgzf_seek(int64) ⇒ int64

Set the file to read from the location specified by pos.

Returns:

  • (int64)

    the return value of attach_function



84
85
86
87
# File 'lib/hts/libhts/bgzf.rb', line 84

attach_function \
:bgzf_seek,
[BGZF, :int64, :int],
:int64

#bgzf_set_cache_size(int) ⇒ void

This method returns an undefined value.

Set the cache size. Only effective when compiled with -DBGZF_CACHE.



108
109
110
111
# File 'lib/hts/libhts/bgzf.rb', line 108

attach_function \
:bgzf_set_cache_size,
[BGZF, :int],
:void

#bgzf_thread_pool(pointer) ⇒ int

Enable multi-threading (when compiled with -DBGZF_MT) via a shared thread pool.

Returns:

  • (int)

    the return value of attach_function



139
140
141
142
# File 'lib/hts/libhts/bgzf.rb', line 139

attach_function \
:bgzf_thread_pool,
[BGZF, :pointer, :int],
:int

#bgzf_useek(off_t) ⇒ int

Position BGZF at the uncompressed offset

Returns:

  • (int)

    the return value of attach_function



158
159
160
161
# File 'lib/hts/libhts/bgzf.rb', line 158

attach_function \
:bgzf_useek,
[BGZF, :off_t, :int],
:int

#bgzf_utell([BGZF]) ⇒ off_t

Position in uncompressed BGZF

Returns:

  • (off_t)

    the return value of attach_function



164
165
166
167
# File 'lib/hts/libhts/bgzf.rb', line 164

attach_function \
:bgzf_utell,
[BGZF],
:off_t

#bgzf_write(pointer) ⇒ ssize_t

Write length bytes from data to the file. If no I/O errors occur, the complete length bytes will be written (or queued for writing).

Returns:

  • (ssize_t)

    the return value of attach_function



38
39
40
41
# File 'lib/hts/libhts/bgzf.rb', line 38

attach_function \
:bgzf_write,
[BGZF, :pointer, :size_t],
:ssize_t

#cram_seek(pointer) ⇒ int

attach_function \

:cram_fd_get_header,
[CramFd],
SamHdr.by_ref

attach_function \

:cram_fd_set_header,
[CramFd, SamHdr.by_ref],
:void

attach_function \

:cram_fd_get_version,
[CramFd],
:int

attach_function \

:cram_fd_set_version,
[CramFd, :int],
:void

attach_function \

:cram_major_vers,
[CramFd],
:int

attach_function \

:cram_minor_vers,
[CramFd],
:int

attach_function \

:cram_fd_get_fp,
[CramFd],
HFile.by_ref

attach_function \

:cram_fd_set_fp,
[CramFd, HFile],
:void

attach_function \

:cram_container_get_length,
[CramContainer],
:int32

attach_function \

:cram_container_set_length,
[CramContainer, :int32],
:void

attach_function \

:cram_container_get_num_blocks,
[CramContainer],
:int32

attach_function \

:cram_container_set_num_blocks,
[CramContainer, :int32],
:void

attach_function \

:cram_container_get_landmarks,
[CramContainer, :int32],
:pointer

attach_function \

:cram_container_set_landmarks,
[CramContainer, :Int32, :pointer],
:void

attach_function \

:cram_container_is_empty,
[CramFd],
:int

attach_function \

:cram_block_get_content_id,
[CramBlock],
:int32

attach_function \

:cram_block_get_comp_size,
[CramBlock],
:int32

attach_function \

:cram_block_get_uncomp_size,
[CramBlock],
:int32

attach_function \

:cram_block_get_crc32,
[CramBlock],
:int32

attach_function \

:cram_block_get_data,
[CramBlock],
:pointer

attach_function \

:cram_block_get_content_type,
[CramBlock],
CramContentType                # ?

attach_function \

:cram_block_set_content_id,
[CramBlock, :int32],
:void

attach_function \

:cram_block_set_comp_size,
[CramBlock, :int32],
:void

attach_function \

:cram_block_set_uncomp_size,
[CramBlock, :int32],
:void

attach_function \

:cram_block_set_crc32,
[CramBlock, :int32],
:void

attach_function \

:cram_block_set_data,
[CramBlock, :pointer],
:void

attach_function \

:cram_block_append,
[CramBlock, :pointer, :int],
:int

attach_function \

:cram_block_update_size,
[CramBlock],
:void

attach_function \

:cram_block_get_offset,
[CramBlock],
:size_t

attach_function \

:cram_block_set_offset,
[CramBlock, :size_t],
:void

attach_function \

:cram_block_size,
[CramBlock],
:uint32

attach_function \

:cram_transcode_rg,
[CramFd, CramFd, CramContainer, :int, :pointer, :pointer],
:int

attach_function \

:cram_copy_slice,
[CramFd, CramFd, :int32],
:int

attach_function \

:cram_new_block,
[CramContentType, :int],
CramBlock

attach_function \

:cram_read_block,
[CramFd],
CramBlock

attach_function \

:cram_write_block,
[CramFd, CramBlock],
:int

attach_function \

:cram_free_block,
[CramBlock],
:void

attach_function \

:cram_uncompress_block,
[CramBlock],
:int

attach_function \

:cram_compress_block,
[CramFd, CramBlock, CramMetrics, :int, :int],
:int

attach_function \

:cram_compress_block2,
[CramFd, CramSlice, CramBlock, CramMetrics, :int, :int],
:int

attach_function \

:cram_new_container,
[:int, :int],
CramContainer

attach_function \

:cram_free_container,
[CramContainer],
:void

attach_function \

:cram_read_container,
[CramFd],
CramContainer

attach_function \

:cram_write_container,
[CramFd, CramContainer],
:int

attach_function \

:cram_store_container,
[CramFd, CramContainer, :string, :pointer],
:int

attach_function \

:cram_container_size,
[CramContainer],
:int

attach_function \

:cram_open,
[:string, :string],
CramFd

attach_function \

:cram_dopen,
[:pointer, :string, :string],
CramFd

attach_function \

:cram_close,
[CramFd],
:int

Returns:

  • (int)

    the return value of attach_function



252
253
254
# File 'lib/hts/libhts/cram.rb', line 252

attach_function \
:cram_seek,
%i[pointer off_t int], :int

#fai_build(string) ⇒ int

Build index for a FASTA or FASTQ or bgzip-compressed FASTA or FASTQ file.

Returns:

  • (int)

    the return value of attach_function



12
13
14
15
# File 'lib/hts/libhts/faidx.rb', line 12

attach_function \
:fai_build,
[:string],
:int

#fai_build3(string) ⇒ int

Build index for a FASTA or FASTQ or bgzip-compressed FASTA or FASTQ file.

Returns:

  • (int)

    the return value of attach_function



6
7
8
9
# File 'lib/hts/libhts/faidx.rb', line 6

attach_function \
:fai_build3,
%i[string string string],
:int

#fai_destroy([Faidx]) ⇒ void

This method returns an undefined value.

Destroy a faidx_t struct



18
19
20
21
# File 'lib/hts/libhts/faidx.rb', line 18

attach_function \
:fai_destroy,
[Faidx],
:void

#fai_fetch(string) ⇒ string

Fetch the sequence in a region

Returns:

  • (string)

    the return value of attach_function



48
49
50
51
# File 'lib/hts/libhts/faidx.rb', line 48

attach_function \
:fai_fetch,
[Faidx, :string, :pointer],
:string

#fai_fetch64(string) ⇒ string

Fetch the sequence in a region

Returns:

  • (string)

    the return value of attach_function



54
55
56
57
# File 'lib/hts/libhts/faidx.rb', line 54

attach_function \
:fai_fetch64,
[Faidx, :string, :pointer],
:string

#fai_fetchqual(string) ⇒ string

Fetch the quality string for a region for FASTQ files

Returns:

  • (string)

    the return value of attach_function



60
61
62
63
# File 'lib/hts/libhts/faidx.rb', line 60

attach_function \
:fai_fetchqual,
[Faidx, :string, :pointer],
:string

#fai_fetchqual64(string) ⇒ string

Returns the return value of attach_function.

Returns:

  • (string)

    the return value of attach_function



65
66
67
68
# File 'lib/hts/libhts/faidx.rb', line 65

attach_function \
:fai_fetchqual64,
[Faidx, :string, :pointer],
:string

#fai_load(string) ⇒ by_ref

Load index from “fn.fai”.

Returns:

  • (by_ref)

    the return value of attach_function



30
31
32
33
# File 'lib/hts/libhts/faidx.rb', line 30

attach_function \
:fai_load,
[:string],
Faidx.by_ref

#fai_load3(string) ⇒ by_ref

Load FASTA indexes.

Returns:

  • (by_ref)

    the return value of attach_function



24
25
26
27
# File 'lib/hts/libhts/faidx.rb', line 24

attach_function \
:fai_load3,
%i[string string string int],
Faidx.by_ref

#fai_load3_format(string) ⇒ by_ref

Load FASTA or FASTQ indexes.

Returns:

  • (by_ref)

    the return value of attach_function



36
37
38
39
# File 'lib/hts/libhts/faidx.rb', line 36

attach_function \
:fai_load3_format,
[:string, :string, :string, :int, FaiFormatOptions],
Faidx.by_ref

#fai_load_format(string) ⇒ by_ref

Load index from “fn.fai”.

Returns:

  • (by_ref)

    the return value of attach_function



42
43
44
45
# File 'lib/hts/libhts/faidx.rb', line 42

attach_function \
:fai_load_format,
[:string, FaiFormatOptions],
Faidx.by_ref

#fai_parse_region(string) ⇒ string

Parses a region string.

Returns:

  • (string)

    the return value of attach_function



125
126
127
# File 'lib/hts/libhts/faidx.rb', line 125

attach_function \
:fai_parse_region,
[Faidx, :string, :pointer, :pointer, :pointer, :int], :string

#fai_path(string) ⇒ string

Determines the path to the reference index file

Returns:

  • (string)

    the return value of attach_function



136
137
138
139
# File 'lib/hts/libhts/faidx.rb', line 136

attach_function \
:fai_path,
[:string],
:string

#fai_set_cache_size(int) ⇒ void

This method returns an undefined value.

Sets the cache size of the underlying BGZF compressed file



130
131
132
133
# File 'lib/hts/libhts/faidx.rb', line 130

attach_function \
:fai_set_cache_size,
[Faidx, :int],
:void

#faidx_fetch_nseq([Faidx]) ⇒ int

Fetch the number of sequences

Returns:

  • (int)

    the return value of attach_function



71
72
73
74
# File 'lib/hts/libhts/faidx.rb', line 71

attach_function \
:faidx_fetch_nseq,
[Faidx],
:int

#faidx_fetch_qual(string) ⇒ string

Fetch the quality string in a region for FASTQ files

Returns:

  • (string)

    the return value of attach_function



89
90
91
92
# File 'lib/hts/libhts/faidx.rb', line 89

attach_function \
:faidx_fetch_qual,
[Faidx, :string, :int, :int, :pointer],
:string

#faidx_fetch_qual64(string) ⇒ string

Fetch the quality string in a region for FASTQ files

Returns:

  • (string)

    the return value of attach_function



95
96
97
98
# File 'lib/hts/libhts/faidx.rb', line 95

attach_function \
:faidx_fetch_qual64,
[Faidx, :string, :int64, :int64, :pointer],
:string

#faidx_fetch_seq(string) ⇒ string

Fetch the sequence in a region

Returns:

  • (string)

    the return value of attach_function



77
78
79
80
# File 'lib/hts/libhts/faidx.rb', line 77

attach_function \
:faidx_fetch_seq,
[Faidx, :string, :int, :int, :pointer],
:string

#faidx_fetch_seq64(string) ⇒ string

Fetch the sequence in a region

Returns:

  • (string)

    the return value of attach_function



83
84
85
86
# File 'lib/hts/libhts/faidx.rb', line 83

attach_function \
:faidx_fetch_seq64,
[Faidx, :string, :int64, :int64, :pointer],
:string

#faidx_has_seq(string) ⇒ int

Query if sequence is present

Returns:

  • (int)

    the return value of attach_function



101
102
103
104
# File 'lib/hts/libhts/faidx.rb', line 101

attach_function \
:faidx_has_seq,
[Faidx, :string],
:int

#faidx_iseq(int) ⇒ string

Return name of i-th sequence

Returns:

  • (string)

    the return value of attach_function



113
114
115
116
# File 'lib/hts/libhts/faidx.rb', line 113

attach_function \
:faidx_iseq,
[Faidx, :int],
:string

#faidx_nseq([Faidx]) ⇒ int

Return number of sequences in fai index

Returns:

  • (int)

    the return value of attach_function



107
108
109
110
# File 'lib/hts/libhts/faidx.rb', line 107

attach_function \
:faidx_nseq,
[Faidx],
:int

#faidx_seq_len(string) ⇒ int

Return sequence length, -1 if not present

Returns:

  • (int)

    the return value of attach_function



119
120
121
122
# File 'lib/hts/libhts/faidx.rb', line 119

attach_function \
:faidx_seq_len,
[Faidx, :string],
:int

#haddextension(string) ⇒ string

Append an extension or replace an existing extension

Returns:

  • (string)

    the return value of attach_function



24
25
26
27
# File 'lib/hts/libhts/hfile.rb', line 24

attach_function \
:haddextension,
[KString, :string, :int, :string],
:string

#hclose([HFILE]) ⇒ int

Flush (for output streams) and close the stream

Returns:

  • (int)

    the return value of attach_function



30
31
32
33
# File 'lib/hts/libhts/hfile.rb', line 30

attach_function \
:hclose,
[HFILE],
:int

#hclose_abruptly([HFILE]) ⇒ void

This method returns an undefined value.

Close the stream, without flushing or propagating errors



36
37
38
39
# File 'lib/hts/libhts/hfile.rb', line 36

attach_function \
:hclose_abruptly,
[HFILE],
:void

#hdopen(int) ⇒ by_ref

Associate a stream with an existing open file descriptor

Returns:

  • (by_ref)

    the return value of attach_function



12
13
14
15
# File 'lib/hts/libhts/hfile.rb', line 12

attach_function \
:hdopen,
%i[int string],
HFILE.by_ref

#hfile_mem_get_buffer(pointer) ⇒ string

For hfile_mem: get the internal buffer and it’s size from a hfile

Returns:

  • (string)

    the return value of attach_function



80
81
82
83
# File 'lib/hts/libhts/hfile.rb', line 80

attach_function \
:hfile_mem_get_buffer,
[HFILE, :pointer],
:string

#hfile_mem_steal_buffer(pointer) ⇒ string

For hfile_mem: get the internal buffer and it’s size from a hfile.

Returns:

  • (string)

    the return value of attach_function



86
87
88
89
# File 'lib/hts/libhts/hfile.rb', line 86

attach_function \
:hfile_mem_steal_buffer,
[HFILE, :pointer],
:string

#hflush([HFILE]) ⇒ int

For writing streams, flush buffered output to the underlying stream

Returns:

  • (int)

    the return value of attach_function



74
75
76
77
# File 'lib/hts/libhts/hfile.rb', line 74

attach_function \
:hflush,
[HFILE],
:int

#hgetdelim(string) ⇒ ssize_t

Read from the stream until the delimiter, up to a maximum length

Returns:

  • (ssize_t)

    the return value of attach_function



56
57
58
59
# File 'lib/hts/libhts/hfile.rb', line 56

attach_function \
:hgetdelim,
[:string, :size_t, :int, HFILE],
:ssize_t

#hgets(string) ⇒ string

Read a line from the stream, up to a maximum length

Returns:

  • (string)

    the return value of attach_function



62
63
64
65
# File 'lib/hts/libhts/hfile.rb', line 62

attach_function \
:hgets,
[:string, :int, HFILE],
:string

#hisremote(string) ⇒ int

Report whether the file name or URL denotes remote storage

Returns:

  • (int)

    the return value of attach_function



18
19
20
21
# File 'lib/hts/libhts/hfile.rb', line 18

attach_function \
:hisremote,
[:string],
:int

#hopen(string) ⇒ by_ref

Open the named file or URL as a stream

Returns:

  • (by_ref)

    the return value of attach_function



6
7
8
9
# File 'lib/hts/libhts/hfile.rb', line 6

attach_function \
:hopen,
%i[string string varargs],
HFILE.by_ref

#hpeek(pointer) ⇒ ssize_t

Peek at characters to be read without removing them from buffers

Returns:

  • (ssize_t)

    the return value of attach_function



68
69
70
71
# File 'lib/hts/libhts/hfile.rb', line 68

attach_function \
:hpeek,
[HFILE, :pointer, :size_t],
:ssize_t

#hrec_add_idx(int) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



240
241
242
243
# File 'lib/hts/libhts/vcf_funcs.rb', line 240

attach_function \
:hrec_add_idx,
[BcfHrec, :int],
:int

#hseek(off_t) ⇒ off_t

Reposition the read/write stream offset

Returns:

  • (off_t)

    the return value of attach_function



42
43
44
45
# File 'lib/hts/libhts/hfile.rb', line 42

attach_function \
:hseek,
[HFILE, :off_t, :int],
:off_t

#hts_check_EOF([HtsFile]) ⇒ int

Determine whether a given htsFile contains a valid EOF block

Returns:

  • (int)

    the return value of attach_function



164
165
166
167
# File 'lib/hts/libhts/hts.rb', line 164

attach_function \
:hts_check_EOF,
[HtsFile],
:int

#hts_close([HtsFile]) ⇒ int

Close a file handle, flushing buffered data for output streams

Returns:

  • (int)

    the return value of attach_function



99
100
101
102
# File 'lib/hts/libhts/hts.rb', line 99

attach_function \
:hts_close,
[HtsFile],
:int

#hts_detect_format([HFILE, HtsFormat]) ⇒ int

Determine format by peeking at the start of a file

Returns:

  • (int)

    the return value of attach_function



62
63
64
65
# File 'lib/hts/libhts/hts.rb', line 62

attach_function \
:hts_detect_format,
[HFILE, HtsFormat],
:int

#hts_flush([HtsFile]) ⇒ int Also known as: bcf_flush, vcf_flush

For output streams, flush any buffered data

Returns:

  • (int)

    the return value of attach_function



93
94
95
96
# File 'lib/hts/libhts/hts.rb', line 93

attach_function \
:hts_flush,
[HtsFile],
:int

#hts_format_description([HtsFormat]) ⇒ string

Get a human-readable description of the file format

Returns:

  • (string)

    the return value of attach_function



68
69
70
71
# File 'lib/hts/libhts/hts.rb', line 68

attach_function \
:hts_format_description,
[HtsFormat],
:string

#hts_format_file_extension([HtsFormat]) ⇒ string

Returns a string containing the file format extension.

Returns:

  • (string)

    the return value of attach_function



111
112
113
114
# File 'lib/hts/libhts/hts.rb', line 111

attach_function \
:hts_format_file_extension,
[HtsFormat],
:string

#hts_free(pointer) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



20
21
22
23
# File 'lib/hts/libhts/hts.rb', line 20

attach_function \
:hts_free,
[:pointer],
:void

#hts_get_bgzfp([HtsFile]) ⇒ by_ref

Internal helper function used by tbx_itr_next()

Returns:

  • (by_ref)

    the return value of attach_function



11
12
13
14
# File 'lib/hts/libhts/tbx.rb', line 11

attach_function \
:hts_get_bgzfp,
[HtsFile],
BGZF.by_ref

#hts_get_format([HtsFile]) ⇒ by_ref

Returns the file’s format information

Returns:

  • (by_ref)

    the return value of attach_function



105
106
107
108
# File 'lib/hts/libhts/hts.rb', line 105

attach_function \
:hts_get_format,
[HtsFile],
HtsFormat.by_ref

#hts_get_log_level([]) ⇒ HtsLogLevel

hts_log.h

Returns:

  • (HtsLogLevel)

    the return value of attach_function



10
11
12
13
# File 'lib/hts/libhts/hts.rb', line 10

attach_function \
:hts_get_log_level,
[],
HtsLogLevel

#hts_getline(int) ⇒ int

Read a line (and its n or rn terminator) from a file

Returns:

  • (int)

    the return value of attach_function



123
124
125
126
# File 'lib/hts/libhts/hts.rb', line 123

attach_function \
:hts_getline,
[HtsFile, :int, KString],
:int

#hts_hopen(string) ⇒ by_ref

Open an existing stream as a SAM/BAM/CRAM/VCF/BCF/etc file

Returns:

  • (by_ref)

    the return value of attach_function



87
88
89
90
# File 'lib/hts/libhts/hts.rb', line 87

attach_function \
:hts_hopen,
[HFILE, :string, :string],
HtsFile.by_ref

#hts_idx_destroy([HtsIdx]) ⇒ void

This method returns an undefined value.

Free a BAI/CSI/TBI type index



184
185
186
187
# File 'lib/hts/libhts/hts.rb', line 184

attach_function \
:hts_idx_destroy,
[HtsIdx],
:void

#hts_idx_finish(uint64) ⇒ int

Finish building an index

Returns:

  • (int)

    the return value of attach_function



196
197
198
199
# File 'lib/hts/libhts/hts.rb', line 196

attach_function \
:hts_idx_finish,
[HtsIdx, :uint64],
:int

#hts_idx_fmt([HtsIdx]) ⇒ int

Returns index format

Returns:

  • (int)

    the return value of attach_function



202
203
204
205
# File 'lib/hts/libhts/hts.rb', line 202

attach_function \
:hts_idx_fmt,
[HtsIdx],
:int

#hts_idx_get_meta(pointer) ⇒ uint8

Get extra index meta-data

Returns:

  • (uint8)

    the return value of attach_function



244
245
246
247
# File 'lib/hts/libhts/hts.rb', line 244

attach_function \
:hts_idx_get_meta,
[HtsIdx, :pointer],
:uint8

#hts_idx_get_n_no_coor([HtsIdx]) ⇒ uint64

Return the number of unplaced reads from an index

Returns:

  • (uint64)

    the return value of attach_function



262
263
264
265
# File 'lib/hts/libhts/hts.rb', line 262

attach_function \
:hts_idx_get_n_no_coor,
[HtsIdx],
:uint64

#hts_idx_get_stat(int) ⇒ int

Get number of mapped and unmapped reads from an index

Returns:

  • (int)

    the return value of attach_function



256
257
258
259
# File 'lib/hts/libhts/hts.rb', line 256

attach_function \
:hts_idx_get_stat,
[HtsIdx, :int, :pointer, :pointer],
:int

#hts_idx_init(int) ⇒ pointer

Create a BAI/CSI/TBI type index structure

Returns:

  • (pointer)

    the return value of attach_function



178
179
180
181
# File 'lib/hts/libhts/hts.rb', line 178

attach_function \
:hts_idx_init,
%i[int int uint64 int int],
:pointer

#hts_idx_load(string) ⇒ by_ref

Load an index file

Returns:

  • (by_ref)

    the return value of attach_function



226
227
228
229
# File 'lib/hts/libhts/hts.rb', line 226

attach_function \
:hts_idx_load,
%i[string int],
HtsIdx.by_ref

#hts_idx_load2(string) ⇒ by_ref

Load a specific index file

Returns:

  • (by_ref)

    the return value of attach_function



232
233
234
235
# File 'lib/hts/libhts/hts.rb', line 232

attach_function \
:hts_idx_load2,
%i[string string],
HtsIdx.by_ref

#hts_idx_load3(string) ⇒ by_ref

Load a specific index file

Returns:

  • (by_ref)

    the return value of attach_function



238
239
240
241
# File 'lib/hts/libhts/hts.rb', line 238

attach_function \
:hts_idx_load3,
%i[string string int int],
HtsIdx.by_ref

#hts_idx_push(int) ⇒ int

Push an index entry

Returns:

  • (int)

    the return value of attach_function



190
191
192
193
# File 'lib/hts/libhts/hts.rb', line 190

attach_function \
:hts_idx_push,
[HtsIdx, :int, :int64, :int64, :uint64, :int],
:int

#hts_idx_save(string) ⇒ int

Save an index to a file

Returns:

  • (int)

    the return value of attach_function



214
215
216
217
# File 'lib/hts/libhts/hts.rb', line 214

attach_function \
:hts_idx_save,
[HtsIdx, :string, :int],
:int

#hts_idx_save_as(string) ⇒ int

Save an index to a specific file

Returns:

  • (int)

    the return value of attach_function



220
221
222
223
# File 'lib/hts/libhts/hts.rb', line 220

attach_function \
:hts_idx_save_as,
[HtsIdx, :string, :string, :int],
:int

#hts_idx_seqnames(pointer) ⇒ pointer

Returns the return value of attach_function.

Returns:

  • (pointer)

    the return value of attach_function



314
315
316
317
# File 'lib/hts/libhts/hts.rb', line 314

attach_function \
:hts_idx_seqnames,
[HtsIdx, :pointer, :pointer, :pointer],
:pointer

#hts_idx_set_meta(uint32) ⇒ int

Set extra index meta-data

Returns:

  • (int)

    the return value of attach_function



250
251
252
253
# File 'lib/hts/libhts/hts.rb', line 250

attach_function \
:hts_idx_set_meta,
[HtsIdx, :uint32, :pointer, :int],
:int

#hts_idx_tbi_name(int) ⇒ int

Add name to TBI index meta-data

Returns:

  • (int)

    the return value of attach_function



208
209
210
211
# File 'lib/hts/libhts/hts.rb', line 208

attach_function \
:hts_idx_tbi_name,
[HtsIdx, :int, :string],
:int

#hts_itr_destroy([HtsItr]) ⇒ void

This method returns an undefined value.

Free an iterator



297
298
299
300
# File 'lib/hts/libhts/hts.rb', line 297

attach_function \
:hts_itr_destroy,
[HtsItr],
:void

#hts_itr_next(pointer) ⇒ int

Return the next record from an iterator

Returns:

  • (int)

    the return value of attach_function



309
310
311
312
# File 'lib/hts/libhts/hts.rb', line 309

attach_function \
:hts_itr_next,
[BGZF, HtsItr, :pointer, :pointer],
:int

#hts_itr_query(int) ⇒ by_ref

Create a single-region iterator

Returns:

  • (by_ref)

    the return value of attach_function



291
292
293
294
# File 'lib/hts/libhts/hts.rb', line 291

attach_function \
:hts_itr_query,
[HtsIdx, :int, :hts_pos_t, :hts_pos_t, :pointer],
HtsItr.by_ref

#hts_itr_querys(string) ⇒ by_ref

Create a single-region iterator from a text region specification

Returns:

  • (by_ref)

    the return value of attach_function



303
304
305
306
# File 'lib/hts/libhts/hts.rb', line 303

attach_function \
:hts_itr_querys,
[HtsIdx, :string, :pointer, :pointer, :pointer, :pointer],
HtsItr.by_ref

#hts_lib_shutdown([]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



15
16
17
18
# File 'lib/hts/libhts/hts.rb', line 15

attach_function \
:hts_lib_shutdown,
[],
:void

#hts_open(string) ⇒ by_ref

Open a sequence data (SAM/BAM/CRAM) or variant data (VCF/BCF) or possibly-compressed textual line-orientated file

Returns:

  • (by_ref)

    the return value of attach_function



75
76
77
78
# File 'lib/hts/libhts/hts.rb', line 75

attach_function \
:hts_open,
%i[string string],
HtsFile.by_ref

#hts_open_format(string) ⇒ by_ref

Open a SAM/BAM/CRAM/VCF/BCF/etc file

Returns:

  • (by_ref)

    the return value of attach_function



81
82
83
84
# File 'lib/hts/libhts/hts.rb', line 81

attach_function \
:hts_open_format,
[:string, :string, HtsFormat],
HtsFile.by_ref

#hts_opt_add(pointer) ⇒ int

Parses arg and appends it to the option list.

Returns:

  • (int)

    the return value of attach_function



26
27
28
29
# File 'lib/hts/libhts/hts.rb', line 26

attach_function \
:hts_opt_add,
%i[pointer string],
:int

#hts_opt_apply([HtsFile, HtsOpt]) ⇒ int

Applies an hts_opt option list to a given htsFile.

Returns:

  • (int)

    the return value of attach_function



32
33
34
35
# File 'lib/hts/libhts/hts.rb', line 32

attach_function \
:hts_opt_apply,
[HtsFile, HtsOpt],
:int

#hts_opt_free([HtsOpt]) ⇒ void

This method returns an undefined value.

Frees an hts_opt list.



38
39
40
41
# File 'lib/hts/libhts/hts.rb', line 38

attach_function \
:hts_opt_free,
[HtsOpt],
:void

#hts_parse_decimal(string) ⇒ long_long

Returns the return value of attach_function.

Returns:

  • (long_long)

    the return value of attach_function



267
268
269
270
# File 'lib/hts/libhts/hts.rb', line 267

attach_function \
:hts_parse_decimal,
%i[string pointer int],
:long_long

#hts_parse_format(string) ⇒ int

Accepts a string file format (sam, bam, cram, vcf, bam)

Returns:

  • (int)

    the return value of attach_function



44
45
46
47
# File 'lib/hts/libhts/hts.rb', line 44

attach_function \
:hts_parse_format,
[HtsFormat, :string],
:int

#hts_parse_opt_list(string) ⇒ int

Tokenise options as (key(=value)?,)*(key(=value)?)?

Returns:

  • (int)

    the return value of attach_function



50
51
52
53
# File 'lib/hts/libhts/hts.rb', line 50

attach_function \
:hts_parse_opt_list,
[HtsFormat, :string],
:int

#hts_parse_reg(string) ⇒ string

Parse a “CHR:START-END”-style region string

Returns:

  • (string)

    the return value of attach_function



279
280
281
282
# File 'lib/hts/libhts/hts.rb', line 279

attach_function \
:hts_parse_reg,
%i[string pointer pointer],
:string

#hts_parse_reg64(string) ⇒ string

Parse a “CHR:START-END”-style region string

Returns:

  • (string)

    the return value of attach_function



273
274
275
276
# File 'lib/hts/libhts/hts.rb', line 273

attach_function \
:hts_parse_reg64,
%i[string pointer pointer],
:string

#hts_parse_region(string) ⇒ string

Parse a “CHR:START-END”-style region string

Returns:

  • (string)

    the return value of attach_function



285
286
287
288
# File 'lib/hts/libhts/hts.rb', line 285

attach_function \
:hts_parse_region,
%i[string pointer pointer pointer pointer pointer int],
:string

#hts_readlines(string) ⇒ pointer

Returns the return value of attach_function.

Returns:

  • (pointer)

    the return value of attach_function



128
129
130
131
# File 'lib/hts/libhts/hts.rb', line 128

attach_function \
:hts_readlines,
%i[string pointer],
:pointer

#hts_readlist(string) ⇒ pointer

Parse comma-separated list or read list from a file

Returns:

  • (pointer)

    the return value of attach_function



134
135
136
137
# File 'lib/hts/libhts/hts.rb', line 134

attach_function \
:hts_readlist,
%i[string int pointer],
:pointer

#hts_set_cache_size(int) ⇒ void

This method returns an undefined value.

Adds a cache of decompressed blocks, potentially speeding up seeks.



152
153
154
155
# File 'lib/hts/libhts/hts.rb', line 152

attach_function \
:hts_set_cache_size,
[HtsFile, :int],
:void

#hts_set_fai_filename(string) ⇒ int

Set .fai filename for a file opened for reading

Returns:

  • (int)

    the return value of attach_function



158
159
160
161
# File 'lib/hts/libhts/hts.rb', line 158

attach_function \
:hts_set_fai_filename,
[HtsFile, :string],
:int

#hts_set_opt(varargs) ⇒ int

Sets a specified CRAM option on the open file handle.

Returns:

  • (int)

    the return value of attach_function



117
118
119
120
# File 'lib/hts/libhts/hts.rb', line 117

attach_function \
:hts_set_opt,
[HtsFile, HtsFmtOption, :varargs],
:int

#hts_set_thread_pool([HtsFile, HtsTpool]) ⇒ int

Create extra threads to aid compress/decompression for this file

Returns:

  • (int)

    the return value of attach_function



146
147
148
149
# File 'lib/hts/libhts/hts.rb', line 146

attach_function \
:hts_set_thread_pool,
[HtsFile, HtsTpool],
:int

#hts_set_threads(int) ⇒ int

Create extra threads to aid compress/decompression for this file

Returns:

  • (int)

    the return value of attach_function



140
141
142
143
# File 'lib/hts/libhts/hts.rb', line 140

attach_function \
:hts_set_threads,
[HtsFile, :int],
:int

#hts_tpool_delete_result(int) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



74
75
76
77
# File 'lib/hts/libhts/thread_pool.rb', line 74

attach_function \
:hts_tpool_delete_result,
[HtsTpoolResult, :int],
:void

#hts_tpool_destroy([HtsTpool]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



54
55
56
57
# File 'lib/hts/libhts/thread_pool.rb', line 54

attach_function \
:hts_tpool_destroy,
[HtsTpool],
:void

#hts_tpool_dispatch(pointer) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



19
20
21
22
# File 'lib/hts/libhts/thread_pool.rb', line 19

attach_function \
:hts_tpool_dispatch,
[HtsTpool, HtsTpoolProcess, :pointer, :pointer],
:int

#hts_tpool_dispatch2(pointer) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



24
25
26
27
# File 'lib/hts/libhts/thread_pool.rb', line 24

attach_function \
:hts_tpool_dispatch2,
[HtsTpool, HtsTpoolProcess, :pointer, :pointer, :int],
:int

#hts_tpool_dispatch3(pointer) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



29
30
31
32
# File 'lib/hts/libhts/thread_pool.rb', line 29

attach_function \
:hts_tpool_dispatch3,
[HtsTpool, HtsTpoolProcess, :pointer, :pointer, :pointer, :pointer, :int],
:int

#hts_tpool_init(int) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



5
6
7
8
# File 'lib/hts/libhts/thread_pool.rb', line 5

attach_function \
:hts_tpool_init,
[:int],
HtsTpool.by_ref

#hts_tpool_kill([HtsTpool]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



59
60
61
62
# File 'lib/hts/libhts/thread_pool.rb', line 59

attach_function \
:hts_tpool_kill,
[HtsTpool],
:void

#hts_tpool_next_result([HtsTpoolProcess]) ⇒ HtsTpoolResult

Returns the return value of attach_function.

Returns:



64
65
66
67
# File 'lib/hts/libhts/thread_pool.rb', line 64

attach_function \
:hts_tpool_next_result,
[HtsTpoolProcess],
HtsTpoolResult

#hts_tpool_next_result_wait([HtsTpoolProcess]) ⇒ HtsTpoolResult

Returns the return value of attach_function.

Returns:



69
70
71
72
# File 'lib/hts/libhts/thread_pool.rb', line 69

attach_function \
:hts_tpool_next_result_wait,
[HtsTpoolProcess],
HtsTpoolResult

#hts_tpool_process_attach([HtsTpool, HtsTpoolProcess]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



119
120
121
122
# File 'lib/hts/libhts/thread_pool.rb', line 119

attach_function \
:hts_tpool_process_attach,
[HtsTpool, HtsTpoolProcess],
:void

#hts_tpool_process_destroy([HtsTpoolProcess]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



89
90
91
92
# File 'lib/hts/libhts/thread_pool.rb', line 89

attach_function \
:hts_tpool_process_destroy,
[HtsTpoolProcess],
:void

#hts_tpool_process_detach([HtsTpool, HtsTpoolProcess]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



124
125
126
127
# File 'lib/hts/libhts/thread_pool.rb', line 124

attach_function \
:hts_tpool_process_detach,
[HtsTpool, HtsTpoolProcess],
:void

#hts_tpool_process_empty([HtsTpoolProcess]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



94
95
96
97
# File 'lib/hts/libhts/thread_pool.rb', line 94

attach_function \
:hts_tpool_process_empty,
[HtsTpoolProcess],
:int

#hts_tpool_process_flush([HtsTpoolProcess]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



39
40
41
42
# File 'lib/hts/libhts/thread_pool.rb', line 39

attach_function \
:hts_tpool_process_flush,
[HtsTpoolProcess],
:int

#hts_tpool_process_init(int) ⇒ HtsTpoolProcess

Returns the return value of attach_function.

Returns:



84
85
86
87
# File 'lib/hts/libhts/thread_pool.rb', line 84

attach_function \
:hts_tpool_process_init,
[HtsTpool, :int, :int],
HtsTpoolProcess

#hts_tpool_process_is_shutdown([HtsTpoolProcess]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



114
115
116
117
# File 'lib/hts/libhts/thread_pool.rb', line 114

attach_function \
:hts_tpool_process_is_shutdown,
[HtsTpoolProcess],
:int

#hts_tpool_process_len([HtsTpoolProcess]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



99
100
101
102
# File 'lib/hts/libhts/thread_pool.rb', line 99

attach_function \
:hts_tpool_process_len,
[HtsTpoolProcess],
:int

#hts_tpool_process_qsize([HtsTpoolProcess]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



49
50
51
52
# File 'lib/hts/libhts/thread_pool.rb', line 49

attach_function \
:hts_tpool_process_qsize,
[HtsTpoolProcess],
:int

#hts_tpool_process_ref_decr([HtsTpoolProcess]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



134
135
136
137
# File 'lib/hts/libhts/thread_pool.rb', line 134

attach_function \
:hts_tpool_process_ref_decr,
[HtsTpoolProcess],
:void

#hts_tpool_process_ref_incr([HtsTpoolProcess]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



129
130
131
132
# File 'lib/hts/libhts/thread_pool.rb', line 129

attach_function \
:hts_tpool_process_ref_incr,
[HtsTpoolProcess],
:void

#hts_tpool_process_reset(int) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



44
45
46
47
# File 'lib/hts/libhts/thread_pool.rb', line 44

attach_function \
:hts_tpool_process_reset,
[HtsTpoolProcess, :int],
:int

#hts_tpool_process_shutdown([HtsTpoolProcess]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



109
110
111
112
# File 'lib/hts/libhts/thread_pool.rb', line 109

attach_function \
:hts_tpool_process_shutdown,
[HtsTpoolProcess],
:void

#hts_tpool_process_sz([HtsTpoolProcess]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



104
105
106
107
# File 'lib/hts/libhts/thread_pool.rb', line 104

attach_function \
:hts_tpool_process_sz,
[HtsTpoolProcess],
:int

#hts_tpool_result_data([HtsTpoolResult]) ⇒ pointer

Returns the return value of attach_function.

Returns:

  • (pointer)

    the return value of attach_function



79
80
81
82
# File 'lib/hts/libhts/thread_pool.rb', line 79

attach_function \
:hts_tpool_result_data,
[HtsTpoolResult],
:pointer

#hts_tpool_size([HtsTpool]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



10
11
12
13
# File 'lib/hts/libhts/thread_pool.rb', line 10

attach_function \
:hts_tpool_size,
[HtsTpool],
:int

#hts_tpool_wake_dispatch([HtsTpoolProcess]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



34
35
36
37
# File 'lib/hts/libhts/thread_pool.rb', line 34

attach_function \
:hts_tpool_wake_dispatch,
[HtsTpoolProcess],
:void

#hts_version([]) ⇒ string

Get the htslib version number

Returns:

  • (string)

    the return value of attach_function



56
57
58
59
# File 'lib/hts/libhts/hts.rb', line 56

attach_function \
:hts_version,
[],
:string

#kf_betai(double) ⇒ double

Returns the return value of attach_function.

Returns:

  • (double)

    the return value of attach_function



28
29
30
31
# File 'lib/hts/libhts/kfunc.rb', line 28

attach_function \
:kf_betai,
%i[double double double],
:double

#kf_erfc(double) ⇒ double

complementary error function

Returns:

  • (double)

    the return value of attach_function



12
13
14
15
# File 'lib/hts/libhts/kfunc.rb', line 12

attach_function \
:kf_erfc,
[:double],
:double

#kf_gammap(double) ⇒ double

The following computes regularized incomplete gamma functions.

Returns:

  • (double)

    the return value of attach_function



18
19
20
21
# File 'lib/hts/libhts/kfunc.rb', line 18

attach_function \
:kf_gammap,
%i[double double],
:double

#kf_gammaq(double) ⇒ double

Returns the return value of attach_function.

Returns:

  • (double)

    the return value of attach_function



23
24
25
26
# File 'lib/hts/libhts/kfunc.rb', line 23

attach_function \
:kf_gammaq,
%i[double double],
:double

#kf_lgamma(double) ⇒ double

Log gamma function

Returns:

  • (double)

    the return value of attach_function



6
7
8
9
# File 'lib/hts/libhts/kfunc.rb', line 6

attach_function \
:kf_lgamma,
[:double],
:double

#kt_fisher_exact(int) ⇒ double

Returns the return value of attach_function.

Returns:

  • (double)

    the return value of attach_function



33
34
35
36
# File 'lib/hts/libhts/kfunc.rb', line 33

attach_function \
:kt_fisher_exact,
%i[int int int int pointer pointer pointer],
:double

#sam_cap_mapq(string) ⇒ int

bam_mplp_constructor bam_mplp_destructor

Returns:

  • (int)

    the return value of attach_function



586
587
588
589
# File 'lib/hts/libhts/sam_funcs.rb', line 586

attach_function \
:sam_cap_mapq,
[Bam1, :string, :hts_pos_t, :int],
:int

#sam_format1([SamHdr, Bam1, KString]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



387
388
389
390
# File 'lib/hts/libhts/sam_funcs.rb', line 387

attach_function \
:sam_format1,
[SamHdr, Bam1, KString],
:int

#sam_hdr_add_line(string) ⇒ int

Adds a single line to an existing header.

Returns:

  • (int)

    the return value of attach_function



78
79
80
81
# File 'lib/hts/libhts/sam_funcs.rb', line 78

attach_function \
:sam_hdr_add_line,
[SamHdr, :string, :varargs],
:int

#sam_hdr_add_lines(string) ⇒ int

Add formatted lines to an existing header.

Returns:

  • (int)

    the return value of attach_function



72
73
74
75
# File 'lib/hts/libhts/sam_funcs.rb', line 72

attach_function \
:sam_hdr_add_lines,
[SamHdr, :string, :size_t],
:int

#sam_hdr_add_pg(string) ⇒ int

Add an @PG line.

Returns:

  • (int)

    the return value of attach_function



186
187
188
189
# File 'lib/hts/libhts/sam_funcs.rb', line 186

attach_function \
:sam_hdr_add_pg,
[SamHdr, :string, :varargs],
:int

#sam_hdr_change_HD(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



377
378
379
380
# File 'lib/hts/libhts/sam_funcs.rb', line 377

attach_function \
:sam_hdr_change_HD,
[SamHdr, :string, :string],
:int

#sam_hdr_count_lines(string) ⇒ int

Count the number of lines for a given header type

Returns:

  • (int)

    the return value of attach_function



126
127
128
129
# File 'lib/hts/libhts/sam_funcs.rb', line 126

attach_function \
:sam_hdr_count_lines,
[SamHdr, :string],
:int

#sam_hdr_destroy([SamHdr]) ⇒ void

This method returns an undefined value.

Frees the resources associated with a header.



24
25
26
27
# File 'lib/hts/libhts/sam_funcs.rb', line 24

attach_function \
:sam_hdr_destroy,
[SamHdr],
:void

#sam_hdr_dup([SamHdr]) ⇒ by_ref

Duplicate a header structure.

Returns:

  • (by_ref)

    the return value of attach_function



30
31
32
33
# File 'lib/hts/libhts/sam_funcs.rb', line 30

attach_function \
:sam_hdr_dup,
[SamHdr],
SamHdr.by_ref

#sam_hdr_find_line_id(string) ⇒ int

Returns a complete line of formatted text for a given type and ID.

Returns:

  • (int)

    the return value of attach_function



84
85
86
87
# File 'lib/hts/libhts/sam_funcs.rb', line 84

attach_function \
:sam_hdr_find_line_id,
[SamHdr, :string, :string, :string, KString],
:int

#sam_hdr_find_line_pos(string) ⇒ int

Returns a complete line of formatted text for a given type and index.

Returns:

  • (int)

    the return value of attach_function



90
91
92
93
# File 'lib/hts/libhts/sam_funcs.rb', line 90

attach_function \
:sam_hdr_find_line_pos,
[SamHdr, :string, :int, KString],
:int

#sam_hdr_find_tag_id(string) ⇒ int

Return the value associated with a key for a header line identified by ID_key:ID_val

Returns:

  • (int)

    the return value of attach_function



144
145
146
147
# File 'lib/hts/libhts/sam_funcs.rb', line 144

attach_function \
:sam_hdr_find_tag_id,
[SamHdr, :string, :string, :string, :string, KString],
:int

#sam_hdr_find_tag_pos(string) ⇒ int

Return the value associated with a key for a header line identified by position

Returns:

  • (int)

    the return value of attach_function



150
151
152
153
# File 'lib/hts/libhts/sam_funcs.rb', line 150

attach_function \
:sam_hdr_find_tag_pos,
[SamHdr, :string, :int, :string, KString],
:int

#sam_hdr_incr_ref([SamHdr]) ⇒ void

This method returns an undefined value.

Increments the reference count on a header



198
199
200
201
# File 'lib/hts/libhts/sam_funcs.rb', line 198

attach_function \
:sam_hdr_incr_ref,
[SamHdr],
:void

#sam_hdr_init([]) ⇒ by_ref

Generates a new unpopulated header structure.

Returns:

  • (by_ref)

    the return value of attach_function



6
7
8
9
# File 'lib/hts/libhts/sam_funcs.rb', line 6

attach_function \
:sam_hdr_init,
[],
SamHdr.by_ref

#sam_hdr_length([SamHdr]) ⇒ size_t

Returns the current length of the header text.

Returns:

  • (size_t)

    the return value of attach_function



54
55
56
57
# File 'lib/hts/libhts/sam_funcs.rb', line 54

attach_function \
:sam_hdr_length,
[SamHdr],
:size_t

#sam_hdr_line_index(string) ⇒ int

Index of the line for the types that have dedicated look-up tables (SQ, RG, PG)

Returns:

  • (int)

    the return value of attach_function



132
133
134
135
# File 'lib/hts/libhts/sam_funcs.rb', line 132

attach_function \
:sam_hdr_line_index,
[SamHdr, :string, :string],
:int

#sam_hdr_line_name(string) ⇒ string

Id key of the line for the types that have dedicated look-up tables (SQ, RG, PG)

Returns:

  • (string)

    the return value of attach_function



138
139
140
141
# File 'lib/hts/libhts/sam_funcs.rb', line 138

attach_function \
:sam_hdr_line_name,
[SamHdr, :string, :int],
:string

#sam_hdr_name2tid(string) ⇒ int

Get the target id for a given reference sequence name

Returns:

  • (int)

    the return value of attach_function



162
163
164
165
# File 'lib/hts/libhts/sam_funcs.rb', line 162

attach_function \
:sam_hdr_name2tid,
[SamHdr, :string],
:int

#sam_hdr_nref([SamHdr]) ⇒ int

Returns the number of references in the header.

Returns:

  • (int)

    the return value of attach_function



66
67
68
69
# File 'lib/hts/libhts/sam_funcs.rb', line 66

attach_function \
:sam_hdr_nref,
[SamHdr],
:int

#sam_hdr_parse(size_t) ⇒ by_ref

Create a header from existing text.

Returns:

  • (by_ref)

    the return value of attach_function



36
37
38
39
# File 'lib/hts/libhts/sam_funcs.rb', line 36

attach_function \
:sam_hdr_parse,
%i[size_t string],
SamHdr.by_ref

#sam_hdr_pg_id(string) ⇒ string

Generate a unique @PG ID: value

Returns:

  • (string)

    the return value of attach_function



180
181
182
183
# File 'lib/hts/libhts/sam_funcs.rb', line 180

attach_function \
:sam_hdr_pg_id,
[SamHdr, :string],
:string

#sam_hdr_read([SamFile]) ⇒ by_ref

Read a header from a SAM, BAM or CRAM file.

Returns:

  • (by_ref)

    the return value of attach_function



42
43
44
45
# File 'lib/hts/libhts/sam_funcs.rb', line 42

attach_function \
:sam_hdr_read,
[SamFile],
SamHdr.by_ref

#sam_hdr_remove_except(string) ⇒ int

Remove all lines of a given type from a header, except the one matching an ID

Returns:

  • (int)

    the return value of attach_function



114
115
116
117
# File 'lib/hts/libhts/sam_funcs.rb', line 114

attach_function \
:sam_hdr_remove_except,
[SamHdr, :string, :string, :string],
:int

#sam_hdr_remove_line_id(string) ⇒ int

Remove a line with given type / id from a header

Returns:

  • (int)

    the return value of attach_function



96
97
98
99
# File 'lib/hts/libhts/sam_funcs.rb', line 96

attach_function \
:sam_hdr_remove_line_id,
[SamHdr, :string, :string, :string],
:int

#sam_hdr_remove_line_pos(string) ⇒ int

Remove nth line of a given type from a header

Returns:

  • (int)

    the return value of attach_function



102
103
104
105
# File 'lib/hts/libhts/sam_funcs.rb', line 102

attach_function \
:sam_hdr_remove_line_pos,
[SamHdr, :string, :int],
:int

#sam_hdr_remove_lines(string) ⇒ int

Remove header lines of a given type, except those in a given ID set

Returns:

  • (int)

    the return value of attach_function



120
121
122
123
# File 'lib/hts/libhts/sam_funcs.rb', line 120

attach_function \
:sam_hdr_remove_lines,
[SamHdr, :string, :string, :pointer],
:int

#sam_hdr_remove_tag_id(string) ⇒ int

Remove the key from the line identified by type, ID_key and ID_value.

Returns:

  • (int)

    the return value of attach_function



156
157
158
159
# File 'lib/hts/libhts/sam_funcs.rb', line 156

attach_function \
:sam_hdr_remove_tag_id,
[SamHdr, :string, :string, :string, :string],
:int

#sam_hdr_str([SamHdr]) ⇒ string

Returns the text representation of the header.

Returns:

  • (string)

    the return value of attach_function



60
61
62
63
# File 'lib/hts/libhts/sam_funcs.rb', line 60

attach_function \
:sam_hdr_str,
[SamHdr],
:string

#sam_hdr_tid2len(int) ⇒ hts_pos_t

Get the reference sequence length from a target index

Returns:

  • (hts_pos_t)

    the return value of attach_function



174
175
176
177
# File 'lib/hts/libhts/sam_funcs.rb', line 174

attach_function \
:sam_hdr_tid2len,
[SamHdr, :int],
:hts_pos_t

#sam_hdr_tid2name(int) ⇒ string

Get the reference sequence name from a target index

Returns:

  • (string)

    the return value of attach_function



168
169
170
171
# File 'lib/hts/libhts/sam_funcs.rb', line 168

attach_function \
:sam_hdr_tid2name,
[SamHdr, :int],
:string

#sam_hdr_update_line(string) ⇒ int

Add or update tag key,value pairs in a header line.

Returns:

  • (int)

    the return value of attach_function



108
109
110
111
# File 'lib/hts/libhts/sam_funcs.rb', line 108

attach_function \
:sam_hdr_update_line,
[SamHdr, :string, :string, :string, :varargs],
:int

#sam_hdr_write([SamFile, SamHdr]) ⇒ int

Write a header to a SAM, BAM or CRAM file.

Returns:

  • (int)

    the return value of attach_function



48
49
50
51
# File 'lib/hts/libhts/sam_funcs.rb', line 48

attach_function \
:sam_hdr_write,
[SamFile, SamHdr],
:int

#sam_idx_init(int) ⇒ int

Initialise fp->idx for the current format type for SAM, BAM and CRAM types .

Returns:

  • (int)

    the return value of attach_function



274
275
276
277
# File 'lib/hts/libhts/sam_funcs.rb', line 274

attach_function \
:sam_idx_init,
[HtsFile, SamHdr, :int, :string],
:int

#sam_idx_save([HtsFile]) ⇒ int

Writes the index initialised with sam_idx_init to disk.

Returns:

  • (int)

    the return value of attach_function



280
281
282
283
# File 'lib/hts/libhts/sam_funcs.rb', line 280

attach_function \
:sam_idx_save,
[HtsFile],
:int

#sam_index_build(string) ⇒ int

Generate and save an index file

Returns:

  • (int)

    the return value of attach_function



304
305
306
307
# File 'lib/hts/libhts/sam_funcs.rb', line 304

attach_function \
:sam_index_build,
%i[string int],
:int

#sam_index_build2(string) ⇒ int

Generate and save an index to a specific file

Returns:

  • (int)

    the return value of attach_function



310
311
312
313
# File 'lib/hts/libhts/sam_funcs.rb', line 310

attach_function \
:sam_index_build2,
%i[string string int],
:int

#sam_index_build3(string) ⇒ int

Generate and save an index to a specific file

Returns:

  • (int)

    the return value of attach_function



316
317
318
319
# File 'lib/hts/libhts/sam_funcs.rb', line 316

attach_function \
:sam_index_build3,
%i[string string int int],
:int

#sam_index_load(string) ⇒ by_ref

Load a BAM (.csi or .bai) or CRAM (.crai) index file

Returns:

  • (by_ref)

    the return value of attach_function



286
287
288
289
# File 'lib/hts/libhts/sam_funcs.rb', line 286

attach_function \
:sam_index_load,
[HtsFile, :string],
HtsIdx.by_ref

#sam_index_load2(string) ⇒ by_ref

Load a specific BAM (.csi or .bai) or CRAM (.crai) index file

Returns:

  • (by_ref)

    the return value of attach_function



292
293
294
295
# File 'lib/hts/libhts/sam_funcs.rb', line 292

attach_function \
:sam_index_load2,
[HtsFile, :string, :string],
HtsIdx.by_ref

#sam_index_load3(string) ⇒ by_ref

Load or stream a BAM (.csi or .bai) or CRAM (.crai) index file

Returns:

  • (by_ref)

    the return value of attach_function



298
299
300
301
# File 'lib/hts/libhts/sam_funcs.rb', line 298

attach_function \
:sam_index_load3,
[HtsFile, :string, :string, :int],
HtsIdx.by_ref

#sam_itr_queryi(int) ⇒ by_ref

Create a BAM/CRAM iterator

Returns:

  • (by_ref)

    the return value of attach_function



322
323
324
325
# File 'lib/hts/libhts/sam_funcs.rb', line 322

attach_function \
:sam_itr_queryi,
[HtsIdx, :int, :hts_pos_t, :hts_pos_t],
HtsItr.by_ref

#sam_itr_querys(string) ⇒ by_ref

Create a SAM/BAM/CRAM iterator

Returns:

  • (by_ref)

    the return value of attach_function



328
329
330
331
# File 'lib/hts/libhts/sam_funcs.rb', line 328

attach_function \
:sam_itr_querys,
[HtsIdx, SamHdr, :string],
HtsItr.by_ref

#sam_itr_regarray(pointer) ⇒ by_ref

Create a multi-region iterator

Returns:

  • (by_ref)

    the return value of attach_function



340
341
342
343
# File 'lib/hts/libhts/sam_funcs.rb', line 340

attach_function \
:sam_itr_regarray,
[HtsIdx, SamHdr, :pointer, :uint],
HtsItr.by_ref

#sam_itr_regions(pointer) ⇒ by_ref

Create a multi-region iterator

Returns:

  • (by_ref)

    the return value of attach_function



334
335
336
337
# File 'lib/hts/libhts/sam_funcs.rb', line 334

attach_function \
:sam_itr_regions,
[HtsIdx, SamHdr, :pointer, :uint],
HtsItr.by_ref

#sam_open_mode(string) ⇒ int

macros (or alias) sam_open sam_open_format sam_close

Returns:

  • (int)

    the return value of attach_function



366
367
368
369
# File 'lib/hts/libhts/sam_funcs.rb', line 366

attach_function \
:sam_open_mode,
%i[string string string],
:int

#sam_open_mode_opts(string) ⇒ string

A version of sam_open_mode that can handle ,key=value options.

Returns:

  • (string)

    the return value of attach_function



372
373
374
375
# File 'lib/hts/libhts/sam_funcs.rb', line 372

attach_function \
:sam_open_mode_opts,
%i[string string string],
:string

#sam_parse1([KString, SamHdr, Bam1]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



382
383
384
385
# File 'lib/hts/libhts/sam_funcs.rb', line 382

attach_function \
:sam_parse1,
[KString, SamHdr, Bam1],
:int

#sam_parse_region(string) ⇒ string

Returns the return value of attach_function.

Returns:

  • (string)

    the return value of attach_function



354
355
356
357
# File 'lib/hts/libhts/sam_funcs.rb', line 354

attach_function \
:sam_parse_region,
[SamHdr, :string, :pointer, :pointer, :pointer, :int],
:string

#sam_prob_realn(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



591
592
593
594
# File 'lib/hts/libhts/sam_funcs.rb', line 591

attach_function \
:sam_prob_realn,
[Bam1, :string, :hts_pos_t, :int],
:int

#sam_read1([HtsFile, SamHdr, Bam1]) ⇒ int

Read a record from a file

Returns:

  • (int)

    the return value of attach_function



393
394
395
396
# File 'lib/hts/libhts/sam_funcs.rb', line 393

attach_function \
:sam_read1,
[HtsFile, SamHdr, Bam1],
:int

#sam_write1([HtsFile, SamHdr, Bam1]) ⇒ int

Write a record to a file

Returns:

  • (int)

    the return value of attach_function



399
400
401
402
# File 'lib/hts/libhts/sam_funcs.rb', line 399

attach_function \
:sam_write1,
[HtsFile, SamHdr, Bam1],
:int

#stringify_argv(int) ⇒ string

A function to help with construction of CL tags in @PG records.

Returns:

  • (string)

    the return value of attach_function



192
193
194
195
# File 'lib/hts/libhts/sam_funcs.rb', line 192

attach_function \
:stringify_argv,
%i[int pointer],
:string

#tbx_destroy([Tbx]) ⇒ void

This method returns an undefined value.

Returns the return value of attach_function.



65
66
67
68
# File 'lib/hts/libhts/tbx.rb', line 65

attach_function \
:tbx_destroy,
[Tbx],
:void

#tbx_index(int) ⇒ by_ref

Build an index of the lines in a BGZF-compressed file

Returns:

  • (by_ref)

    the return value of attach_function



22
23
24
25
# File 'lib/hts/libhts/tbx.rb', line 22

attach_function \
:tbx_index,
[BGZF, :int, TbxConf],
Tbx.by_ref

#tbx_index_build(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



27
28
29
30
# File 'lib/hts/libhts/tbx.rb', line 27

attach_function \
:tbx_index_build,
[:string, :int, TbxConf],
:int

#tbx_index_build2(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



32
33
34
35
# File 'lib/hts/libhts/tbx.rb', line 32

attach_function \
:tbx_index_build2,
[:string, :string, :int, TbxConf],
:int

#tbx_index_build3(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



37
38
39
40
# File 'lib/hts/libhts/tbx.rb', line 37

attach_function \
:tbx_index_build3,
[:string, :string, :int, :int, TbxConf],
:int

#tbx_index_load(string) ⇒ by_ref

Load or stream a .tbi or .csi index

Returns:

  • (by_ref)

    the return value of attach_function



43
44
45
46
# File 'lib/hts/libhts/tbx.rb', line 43

attach_function \
:tbx_index_load,
[:string],
Tbx.by_ref

#tbx_index_load2(string) ⇒ by_ref

Load or stream a .tbi or .csi index

Returns:

  • (by_ref)

    the return value of attach_function



49
50
51
52
# File 'lib/hts/libhts/tbx.rb', line 49

attach_function \
:tbx_index_load2,
%i[string string],
Tbx.by_ref

#tbx_index_load3(string) ⇒ by_ref

Load or stream a .tbi or .csi index

Returns:

  • (by_ref)

    the return value of attach_function



55
56
57
58
# File 'lib/hts/libhts/tbx.rb', line 55

attach_function \
:tbx_index_load3,
%i[string string int],
Tbx.by_ref

#tbx_name2id(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



5
6
7
8
# File 'lib/hts/libhts/tbx.rb', line 5

attach_function \
:tbx_name2id,
[Tbx, :string],
:int

#tbx_readrec(pointer) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



16
17
18
19
# File 'lib/hts/libhts/tbx.rb', line 16

attach_function \
:tbx_readrec,
[BGZF, :pointer, :pointer, :pointer, :pointer, :pointer],
:int

#tbx_seqnames(int) ⇒ pointer

Returns the return value of attach_function.

Returns:

  • (pointer)

    the return value of attach_function



60
61
62
63
# File 'lib/hts/libhts/tbx.rb', line 60

attach_function \
:tbx_seqnames,
[Tbx, :int],
:pointer

#vcf_format([BcfHdr, Bcf1, KString]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



65
66
67
68
# File 'lib/hts/libhts/vcf_funcs.rb', line 65

attach_function \
:vcf_format,
[BcfHdr, Bcf1, KString],
:int

#vcf_hdr_read([HtsFile]) ⇒ by_ref

Returns the return value of attach_function.

Returns:

  • (by_ref)

    the return value of attach_function



95
96
97
98
# File 'lib/hts/libhts/vcf_funcs.rb', line 95

attach_function \
:vcf_hdr_read,
[HtsFile],
BcfHdr.by_ref

#vcf_hdr_write([HtsFile, BcfHdr]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



100
101
102
103
# File 'lib/hts/libhts/vcf_funcs.rb', line 100

attach_function \
:vcf_hdr_write,
[HtsFile, BcfHdr],
:int

#vcf_open_mode(string) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



60
61
62
63
# File 'lib/hts/libhts/vcf_funcs.rb', line 60

attach_function \
:vcf_open_mode,
%i[string string string],
:int

#vcf_parse([KString, BcfHdr, Bcf1]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



55
56
57
58
# File 'lib/hts/libhts/vcf_funcs.rb', line 55

attach_function \
:vcf_parse,
[KString, BcfHdr, Bcf1],
:int

#vcf_read([HtsFile, BcfHdr, Bcf1]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



105
106
107
108
# File 'lib/hts/libhts/vcf_funcs.rb', line 105

attach_function \
:vcf_read,
[HtsFile, BcfHdr, Bcf1],
:int

#vcf_write([HtsFile, BcfHdr, Bcf1]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



110
111
112
113
# File 'lib/hts/libhts/vcf_funcs.rb', line 110

attach_function \
:vcf_write,
[HtsFile, BcfHdr, Bcf1],
:int

#vcf_write_line([HtsFile, KString]) ⇒ int

Returns the return value of attach_function.

Returns:

  • (int)

    the return value of attach_function



120
121
122
123
# File 'lib/hts/libhts/vcf_funcs.rb', line 120

attach_function \
:vcf_write_line,
[HtsFile, KString],
:int