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/tbx_funcs.rb,
lib/hts/libhts/vcf_funcs.rb,
lib/hts/libhts/thread_pool.rb
Overview
Module for working with C HTSlib.
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, HtsReglist, HtsTpool, KSeq, KString, SamHdr, Tbx, TbxConf
Constant Summary collapse
- 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)
- CramContentType =
enum( :ct_error, -1, :file_header, 0, :compression_header, 1, :mapped_slice, 2, :unmapped_slice, 3, # cram v1.0 only :external, 4, :core, 5 )
- 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
- BAM_USER_OWNS_STRUCT =
1
- BAM_USER_OWNS_DATA =
2
- 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)
- BCF_MAX_BT_INT8 =
INT8_MAX */
0x7f
- BCF_MAX_BT_INT16 =
INT16_MAX */
0x7fff
- BCF_MAX_BT_INT32 =
INT32_MAX */
0x7fffffff
- BCF_MIN_BT_INT8 =
INT8_MIN + 8 */
-120 # INT8_MIN + 8 */
- BCF_MIN_BT_INT16 =
INT16_MIN + 8 */
-32_760 # INT16_MIN + 8 */
- BCF_MIN_BT_INT32 =
INT32_MIN + 8 */
-2_147_483_640 # INT32_MIN + 8 */
- HtsTpoolProcess =
FIXME: struct
:pointer
- HtsTpoolResult =
:pointer
- @@bcf_hdr_name2id =
proc do |hdr, id| LibHTS.bcf_hdr_name2id(hdr, id) end
Class Method Summary collapse
- .attach_function ⇒ Object
- .bam_cigar_gen(l, o) ⇒ Object
- .bam_cigar_op(c) ⇒ Object
- .bam_cigar_opchr(c) ⇒ Object
- .bam_cigar_oplen(c) ⇒ Object
- .bam_cigar_type(o) ⇒ Object
- .bam_get_aux(b) ⇒ Object
- .bam_get_cigar(b) ⇒ Object
- .bam_get_l_aux(b) ⇒ Object
- .bam_get_qname(b) ⇒ Object
- .bam_get_qual(b) ⇒ Object
- .bam_get_seq(b) ⇒ Object
- .bam_index_load(fn) ⇒ Object
- .bam_is_mrev(b) ⇒ Object
- .bam_is_rev(b) ⇒ Object
- .bam_seqi(s, i) ⇒ Object
- .bam_set_seqi(s, i, b) ⇒ Object
- .bcf_alleles2gt(a, b) ⇒ Object
- .bcf_get_format_char(hdr, line, tag, dst, ndst) ⇒ Object
- .bcf_get_format_float(hdr, line, tag, dst, ndst) ⇒ Object
- .bcf_get_format_int32(hdr, line, tag, dst, ndst) ⇒ Object
- .bcf_get_genotypes(hdr, line, dst, ndst) ⇒ Object
- .bcf_get_info_flag(hdr, line, tag, dst, ndst) ⇒ Object
- .bcf_get_info_float(hdr, line, tag, dst, ndst) ⇒ Object
- .bcf_get_info_int32(hdr, line, tag, dst, ndst) ⇒ Object
- .bcf_get_info_string(hdr, line, tag, dst, ndst) ⇒ Object
- .bcf_gt_allele(val) ⇒ Object
- .bcf_gt_is_missing(val) ⇒ Object
- .bcf_gt_is_phased(idx) ⇒ Object
- .bcf_gt_missing ⇒ Object
- .bcf_gt_phased(idx) ⇒ Object
- .bcf_gt_unphased(idx) ⇒ Object
- .bcf_hdr_id2coltype(hdr, type, int_id) ⇒ Object
- .bcf_hdr_id2length(hdr, type, int_id) ⇒ Object
- .bcf_hdr_id2name(hdr, rid) ⇒ Object
- .bcf_hdr_id2number(hdr, type, int_id) ⇒ Object
- .bcf_hdr_id2type(hdr, type, int_id) ⇒ Object
- .bcf_hdr_int2id(hdr, type, int_id) ⇒ Object
- .bcf_hdr_name2id(hdr, id) ⇒ Object
- .bcf_hdr_nsamples(hdr) ⇒ Object
- .bcf_index_load(fn) ⇒ Object
- .bcf_index_seqnames(idx, hdr, nptr) ⇒ Object
-
.bcf_int16_missing ⇒ Object
INT16_MIN.
-
.bcf_int16_vector_end ⇒ Object
INT8_MIN + 1.
-
.bcf_int32_missing ⇒ Object
INT32_MIN.
-
.bcf_int32_vector_end ⇒ Object
INT16_MIN + 1.
-
.bcf_int64_missing ⇒ Object
INT64_MIN.
-
.bcf_int64_vector_end ⇒ Object
INT32_MIN + 1.
-
.bcf_int8_missing ⇒ Object
INT8_MIN.
-
.bcf_int8_vector_end ⇒ Object
Typed value I/O.
- .bcf_itr_queryi(idx, tid, beg, _end) ⇒ Object
- .bcf_itr_querys(idx, hdr, s) ⇒ Object
- .bcf_str_missing ⇒ Object
-
.bcf_str_vector_end ⇒ Object
INT64_MIN + 1.
- .bcf_update_format_char(hdr, line, key, values, n) ⇒ Object
- .bcf_update_format_float(hdr, line, key, values, n) ⇒ Object
- .bcf_update_format_int32(hdr, line, key, values, n) ⇒ Object
- .bcf_update_genotypes(hdr, line, gts, n) ⇒ Object
- .bcf_update_info_flag(hdr, line, key, string, n) ⇒ Object
- .bcf_update_info_float(hdr, line, key, values, n) ⇒ Object
- .bcf_update_info_int32(hdr, line, key, values, n) ⇒ Object
- .bcf_update_info_string(hdr, line, key, string) ⇒ Object
-
.bgzf_tell(fp) ⇒ Object
Return a virtual file pointer to the current location in the file.
-
.htell(fp) ⇒ Object
Report the current stream offset.
- .sam_hdr_find_hd(h, ks) ⇒ Object
- .sam_hdr_find_tag_hd(h, key, ks) ⇒ Object
- .sam_hdr_remove_tag_hd(h, key) ⇒ Object
- .sam_hdr_update_hd(h, *args) ⇒ Object
-
.sam_itr_next(htsfp, itr, r) ⇒ Object
(also: bam_itr_next)
Get the next read from a SAM/BAM/CRAM iterator.
- .tbx_bgzf_itr_next(bgzfp, tbx, itr, r) ⇒ Object
- .tbx_itr_destroy(iter) ⇒ Object
- .tbx_itr_next(htsfp, tbx, itr, r) ⇒ Object
- .tbx_itr_queryi(tbx, tid, beg, end_) ⇒ Object
- .tbx_itr_querys(tbx, s) ⇒ Object
Instance Method Summary collapse
-
#bam_aux2A(pointer) ⇒ char
Get a character aux value.
-
#bam_aux2f(pointer) ⇒ double
Get an integer aux value.
-
#bam_aux2i(pointer) ⇒ int64
Get an integer aux value.
-
#bam_aux2Z(pointer) ⇒ string
Get a string aux value.
-
#bam_aux_append(string) ⇒ int
Append tag data to a bam record.
-
#bam_aux_del(pointer) ⇒ int
Delete tag data from a bam record.
-
#bam_aux_get(string) ⇒ pointer
Return a pointer to an aux record.
-
#bam_aux_update_array(string) ⇒ int
Update or add an array tag.
-
#bam_aux_update_float(string) ⇒ int
Update or add a floating-point tag.
-
#bam_aux_update_int(string) ⇒ int
Update or add an integer tag.
-
#bam_aux_update_str(string) ⇒ int
Update or add a string-type tag.
-
#bam_auxB2f(pointer) ⇒ double
Get a floating-point value from an array-type tag.
-
#bam_auxB2i(pointer) ⇒ int64
Get an integer value from an array-type tag.
-
#bam_auxB_len(pointer) ⇒ uint
Get the length of an array-type (‘B’) tag.
-
#bam_cigar2qlen(int) ⇒ int64
Calculate query length from CIGAR data.
-
#bam_cigar2rlen(int) ⇒ hts_pos_t
Calculate reference length from CIGAR data.
-
#bam_copy1([Bam1, Bam1]) ⇒ by_ref
Copy alignment record data.
-
#bam_destroy1([Bam1]) ⇒ void
Destroy a bam1_t structure.
-
#bam_dup1([Bam1]) ⇒ by_ref
Create a duplicate alignment record.
-
#bam_endpos([Bam1]) ⇒ hts_pos_t
Calculate the rightmost base position of an alignment on the reference genome.
-
#bam_flag2str(int) ⇒ string
The return value of attach_function.
-
#bam_hdr_read([BGZF]) ⇒ by_ref
Read the header from a BAM compressed file.
-
#bam_hdr_write([BGZF, SamHdr]) ⇒ int
Writes the header to a BAM file.
-
#bam_init1([]) ⇒ by_ref
Create a new bam1_t alignment structure.
-
#bam_mods_at_next_pos(pointer) ⇒ int
Returns modification status for the next base position in the query seq.
-
#bam_mods_at_qpos(int) ⇒ int
Returns modification status for a specific query position.
-
#bam_mods_query_type(pointer) ⇒ int
Returns data about a specific modification type for the alignment record.
-
#bam_mods_recorded(pointer) ⇒ int
Returns the list of base modification codes provided for this.
-
#bam_mplp64_auto(bam_mplp) ⇒ int
The return value of attach_function.
-
#bam_mplp_auto(bam_mplp) ⇒ int
The return value of attach_function.
-
#bam_mplp_constructor(bam_mplp) ⇒ void
The return value of attach_function.
-
#bam_mplp_destroy(bam_mplp) ⇒ void
The return value of attach_function.
-
#bam_mplp_destructor(bam_mplp) ⇒ void
The return value of attach_function.
-
#bam_mplp_init(int) ⇒ bam_mplp
The return value of attach_function.
-
#bam_mplp_init_overlaps(bam_mplp) ⇒ int
The return value of attach_function.
-
#bam_mplp_reset(bam_mplp) ⇒ void
The return value of attach_function.
-
#bam_mplp_set_maxcnt(bam_mplp) ⇒ void
The return value of attach_function.
-
#bam_next_basemod(pointer) ⇒ int
Finds the next location containing base modifications and returns them.
-
#bam_parse_basemod(pointer) ⇒ int
Parses the Mm and Ml tags out of a bam record.
-
#bam_parse_cigar(string) ⇒ ssize_t
Parse a CIGAR string into a bam1_t struct.
-
#bam_plp64_auto(bam_plp) ⇒ by_ref
The return value of attach_function.
-
#bam_plp64_next(bam_plp) ⇒ by_ref
The return value of attach_function.
-
#bam_plp_auto(bam_plp) ⇒ by_ref
The return value of attach_function.
-
#bam_plp_constructor(bam_plp) ⇒ void
sets a callback to initialise any per-pileup1_t fields.
-
#bam_plp_destroy(bam_plp) ⇒ void
The return value of attach_function.
-
#bam_plp_destructor(bam_plp) ⇒ void
The return value of attach_function.
-
#bam_plp_init(bam_plp_auto_f) ⇒ bam_plp
sets an iterator over multiple.
-
#bam_plp_insertion(pointer) ⇒ int
Get pileup padded insertion sequence.
-
#bam_plp_insertion_mod(pointer) ⇒ int
Get pileup padded insertion sequence, including base modifications.
-
#bam_plp_next(bam_plp) ⇒ by_ref
The return value of attach_function.
-
#bam_plp_push(bam_plp) ⇒ int
The return value of attach_function.
-
#bam_plp_reset(bam_plp) ⇒ void
The return value of attach_function.
-
#bam_plp_set_maxcnt(bam_plp) ⇒ void
The return value of attach_function.
-
#bam_read1([BGZF, Bam1]) ⇒ int
Read a BAM format alignment record.
-
#bam_set1(size_t) ⇒ int
Set all components of an alignment structure.
-
#bam_set_qname(string) ⇒ int
Set the name of the query.
-
#bam_str2flag(string) ⇒ int
The return value of attach_function.
-
#bam_write1([BGZF, Bam1]) ⇒ int
Write a BAM format alignment record.
-
#bcf_add_filter(int) ⇒ int
The return value of attach_function.
-
#bcf_add_id(string) ⇒ int
The return value of attach_function.
-
#bcf_clear([Bcf1]) ⇒ void
The return value of attach_function.
-
#bcf_copy([Bcf1, Bcf1]) ⇒ by_ref
The return value of attach_function.
-
#bcf_destroy([Bcf1]) ⇒ void
The return value of attach_function.
-
#bcf_dup([Bcf1]) ⇒ by_ref
The return value of attach_function.
-
#bcf_empty([Bcf1]) ⇒ void
The return value of attach_function.
-
#bcf_enc_vchar(int) ⇒ int
The return value of attach_function.
-
#bcf_enc_vfloat(int) ⇒ int
The return value of attach_function.
-
#bcf_enc_vint(int) ⇒ int
The return value of attach_function.
-
#bcf_float_missing([]) ⇒ uint32
The return value of attach_function.
-
#bcf_float_vector_end([]) ⇒ uint32
The return value of attach_function.
-
#bcf_fmt_array(int) ⇒ int
The return value of attach_function.
-
#bcf_fmt_sized_array(pointer) ⇒ uint8_t
The return value of attach_function.
-
#bcf_get_fmt(string) ⇒ by_ref
The return value of attach_function.
-
#bcf_get_fmt_id(int) ⇒ by_ref
The return value of attach_function.
-
#bcf_get_format_string(string) ⇒ int
The return value of attach_function.
-
#bcf_get_format_values(string) ⇒ int
The return value of attach_function.
-
#bcf_get_info(string) ⇒ by_ref
The return value of attach_function.
-
#bcf_get_info_id(int) ⇒ by_ref
The return value of attach_function.
-
#bcf_get_info_values(string) ⇒ int
The return value of attach_function.
-
#bcf_get_variant_type(int) ⇒ int
The return value of attach_function.
-
#bcf_get_variant_types([Bcf1]) ⇒ int
The return value of attach_function.
-
#bcf_has_filter(string) ⇒ int
The return value of attach_function.
-
#bcf_has_variant_type(int) ⇒ int
The return value of attach_function.
-
#bcf_has_variant_types(uint32) ⇒ int
The return value of attach_function.
-
#bcf_hdr_add_hrec([BcfHdr, BcfHrec]) ⇒ int
The return value of attach_function.
-
#bcf_hdr_add_sample(string) ⇒ int
The return value of attach_function.
-
#bcf_hdr_append(string) ⇒ int
DEPRECATED.
-
#bcf_hdr_destroy([BcfHdr]) ⇒ void
The return value of attach_function.
-
#bcf_hdr_dup([BcfHdr]) ⇒ by_ref
The return value of attach_function.
-
#bcf_hdr_format(int) ⇒ int
The return value of attach_function.
-
#bcf_hdr_get_hrec(int) ⇒ by_ref
The return value of attach_function.
-
#bcf_hdr_get_version([BcfHdr]) ⇒ string
The return value of attach_function.
-
#bcf_hdr_id2int(int) ⇒ int
The return value of attach_function.
-
#bcf_hdr_init(string) ⇒ by_ref
The return value of attach_function.
-
#bcf_hdr_merge([BcfHdr, BcfHdr]) ⇒ by_ref
DEPRECATED.
-
#bcf_hdr_parse(string) ⇒ int
The return value of attach_function.
-
#bcf_hdr_parse_line(string) ⇒ by_ref
The return value of attach_function.
-
#bcf_hdr_printf(string) ⇒ int
The return value of attach_function.
-
#bcf_hdr_read([HtsFile]) ⇒ by_ref
The return value of attach_function.
-
#bcf_hdr_remove(int) ⇒ void
The return value of attach_function.
-
#bcf_hdr_seqnames(pointer) ⇒ pointer
The return value of attach_function.
-
#bcf_hdr_set(string) ⇒ int
The return value of attach_function.
-
#bcf_hdr_set_samples(string) ⇒ int
The return value of attach_function.
-
#bcf_hdr_set_version(string) ⇒ int
The return value of attach_function.
-
#bcf_hdr_subset(int) ⇒ by_ref
The return value of attach_function.
-
#bcf_hdr_sync([BcfHdr]) ⇒ int
The return value of attach_function.
-
#bcf_hdr_write([HtsFile, BcfHdr]) ⇒ int
The return value of attach_function.
-
#bcf_hrec_add_key(string) ⇒ int
The return value of attach_function.
-
#bcf_hrec_destroy([BcfHrec]) ⇒ void
The return value of attach_function.
-
#bcf_hrec_dup([BcfHrec]) ⇒ by_ref
The return value of attach_function.
-
#bcf_hrec_find_key(string) ⇒ int
The return value of attach_function.
-
#bcf_hrec_format([BcfHrec, KString]) ⇒ int
The return value of attach_function.
-
#bcf_hrec_set_val(int) ⇒ int
The return value of attach_function.
-
#bcf_idx_init(int) ⇒ int
The return value of attach_function.
-
#bcf_idx_save([HtsFile]) ⇒ int
The return value of attach_function.
-
#bcf_index_build(string) ⇒ int
The return value of attach_function.
-
#bcf_index_build2(string) ⇒ int
The return value of attach_function.
-
#bcf_index_build3(string) ⇒ int
The return value of attach_function.
-
#bcf_index_load2(string) ⇒ by_ref
The return value of attach_function.
-
#bcf_index_load3(string) ⇒ by_ref
The return value of attach_function.
-
#bcf_init([]) ⇒ by_ref
The return value of attach_function.
-
#bcf_is_snp([Bcf1]) ⇒ int
The return value of attach_function.
-
#bcf_read([HtsFile, BcfHdr, Bcf1]) ⇒ int
The return value of attach_function.
-
#bcf_readrec(pointer) ⇒ int
The return value of attach_function.
-
#bcf_remove_filter(int) ⇒ int
The return value of attach_function.
-
#bcf_subset(int) ⇒ int
The return value of attach_function.
-
#bcf_subset_format([BcfHdr, Bcf1]) ⇒ int
The return value of attach_function.
-
#bcf_translate([BcfHdr, BcfHdr, Bcf1]) ⇒ int
The return value of attach_function.
-
#bcf_unpack(int) ⇒ int
The return value of attach_function.
-
#bcf_update_alleles(pointer) ⇒ int
The return value of attach_function.
-
#bcf_update_alleles_str(string) ⇒ int
The return value of attach_function.
-
#bcf_update_filter(pointer) ⇒ int
The return value of attach_function.
-
#bcf_update_format(string) ⇒ int
The return value of attach_function.
-
#bcf_update_format_string(string) ⇒ int
The return value of attach_function.
-
#bcf_update_id(string) ⇒ int
The return value of attach_function.
-
#bcf_update_info(string) ⇒ int
The return value of attach_function.
-
#bcf_variant_length(int) ⇒ int
The return value of attach_function.
-
#bcf_write([HtsFile, BcfHdr, Bcf1]) ⇒ int
The return value of attach_function.
-
#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.
-
#bgzf_check_EOF([BGZF]) ⇒ int
Check if the BGZF end-of-file (EOF) marker is present.
-
#bgzf_close([HFile]) ⇒ int
Close the BGZF and free all associated resources.
-
#bgzf_compress(pointer) ⇒ int
Compress a single BGZF block.
-
#bgzf_compression([BGZF]) ⇒ int
Return the file’s compression format.
-
#bgzf_dopen(int) ⇒ by_ref
Open an existing file descriptor for reading or writing.
-
#bgzf_flush([BGZF]) ⇒ int
Write the data in the buffer to the file.
-
#bgzf_flush_try(ssize_t) ⇒ int
Flush the file if the remaining buffer size is smaller than size.
-
#bgzf_getc([BGZF]) ⇒ int
Read one byte from a BGZF file.
-
#bgzf_getline(int) ⇒ int
Read one line from a BGZF file.
-
#bgzf_hopen(string) ⇒ by_ref
Open an existing hFILE stream for reading or writing.
-
#bgzf_index_build_init([BGZF]) ⇒ int
Tell BGZF to build index while compressing.
-
#bgzf_index_dump(string) ⇒ int
Save BGZF index.
-
#bgzf_index_dump_hfile(string) ⇒ int
Write a BGZF index to an hFILE.
-
#bgzf_index_load(string) ⇒ int
Load BGZF index.
-
#bgzf_index_load_hfile(string) ⇒ int
Load BGZF index from an hFILE.
-
#bgzf_is_bgzf(string) ⇒ int
Check if a file is in the BGZF format.
-
#bgzf_mt(int) ⇒ int
Enable multi-threading (only effective when the library was compiled with -DBGZF_MT).
-
#bgzf_open(string) ⇒ by_ref
Open the specified file for reading or writing.
-
#bgzf_peek([BGZF]) ⇒ int
Returns the next byte in the file without consuming it.
-
#bgzf_raw_read(pointer) ⇒ ssize_t
Read up to length bytes directly from the underlying stream without decompressing.
-
#bgzf_raw_write(pointer) ⇒ ssize_t
Write length bytes directly to the underlying stream without compressing.
-
#bgzf_read(pointer) ⇒ ssize_t
Read up to length bytes from the file storing into data.
-
#bgzf_read_block([BGZF]) ⇒ int
Read the next BGZF block.
-
#bgzf_seek(int64) ⇒ int64
Set the file to read from the location specified by pos.
-
#bgzf_set_cache_size(int) ⇒ void
Set the cache size.
-
#bgzf_thread_pool(pointer) ⇒ int
Enable multi-threading (when compiled with -DBGZF_MT) via a shared thread pool.
-
#bgzf_useek(off_t) ⇒ int
Position BGZF at the uncompressed offset.
-
#bgzf_utell([BGZF]) ⇒ off_t
Position in uncompressed BGZF.
-
#bgzf_write(pointer) ⇒ ssize_t
Write length bytes from data to the file.
-
#cram_block_append(cram_block) ⇒ int
The return value of attach_function.
-
#cram_block_get_comp_size(cram_block) ⇒ int32
The return value of attach_function.
-
#cram_block_get_content_id(cram_block) ⇒ int32
The return value of attach_function.
-
#cram_block_get_content_type(cram_block) ⇒ CramContentType
The return value of attach_function.
-
#cram_block_get_crc32(cram_block) ⇒ int32
The return value of attach_function.
-
#cram_block_get_data(cram_block) ⇒ pointer
The return value of attach_function.
-
#cram_block_get_offset(cram_block) ⇒ size_t
The return value of attach_function.
-
#cram_block_get_uncomp_size(cram_block) ⇒ int32
The return value of attach_function.
-
#cram_block_set_comp_size(cram_block) ⇒ void
The return value of attach_function.
-
#cram_block_set_content_id(cram_block) ⇒ void
The return value of attach_function.
-
#cram_block_set_crc32(cram_block) ⇒ void
The return value of attach_function.
-
#cram_block_set_data(cram_block) ⇒ void
The return value of attach_function.
-
#cram_block_set_offset(cram_block) ⇒ void
The return value of attach_function.
-
#cram_block_set_uncomp_size(cram_block) ⇒ void
The return value of attach_function.
-
#cram_block_size(cram_block) ⇒ uint32
The return value of attach_function.
-
#cram_block_update_size(cram_block) ⇒ void
The return value of attach_function.
-
#cram_check_EOF(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_close(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_compress_block(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_container_get_landmarks(cram_container) ⇒ pointer
The return value of attach_function.
-
#cram_container_get_length(cram_container) ⇒ int32
The return value of attach_function.
-
#cram_container_get_num_blocks(cram_container) ⇒ int32
The return value of attach_function.
-
#cram_container_is_empty(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_container_set_landmarks(cram_container) ⇒ void
The return value of attach_function.
-
#cram_container_set_length(cram_container) ⇒ void
The return value of attach_function.
-
#cram_container_set_num_blocks(cram_container) ⇒ void
The return value of attach_function.
-
#cram_container_size(cram_container) ⇒ int
The return value of attach_function.
-
#cram_copy_slice(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_decode_slice_header(pointer) ⇒ pointer
The return value of attach_function.
-
#cram_dopen(pointer) ⇒ cram_fd
The return value of attach_function.
-
#cram_eof(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_fd_get_fp(cram_fd) ⇒ by_ref
The return value of attach_function.
-
#cram_fd_get_header(cram_fd) ⇒ by_ref
The return value of attach_function.
-
#cram_fd_get_version(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_fd_set_fp(cram_fd) ⇒ void
The return value of attach_function.
-
#cram_fd_set_header(cram_fd) ⇒ void
The return value of attach_function.
-
#cram_fd_set_version(cram_fd) ⇒ void
The return value of attach_function.
-
#cram_flush(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_free_block(cram_block) ⇒ void
The return value of attach_function.
-
#cram_free_container(cram_container) ⇒ void
The return value of attach_function.
-
#cram_free_slice_header(pointer) ⇒ void
The return value of attach_function.
-
#cram_get_refs(by_ref) ⇒ pointer
The return value of attach_function.
-
#cram_major_vers(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_minor_vers(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_new_block(int) ⇒ cram_block
The return value of attach_function.
-
#cram_new_container(int) ⇒ cram_container
attach_function \ :cram_compress_block2, %i[cram_fd cram_slice cram_block cram_metrics int int], :int.
-
#cram_open(string) ⇒ cram_fd
The return value of attach_function.
-
#cram_read_block(cram_fd) ⇒ cram_block
The return value of attach_function.
-
#cram_read_container(cram_fd) ⇒ cram_container
The return value of attach_function.
-
#cram_seek(pointer) ⇒ int
The return value of attach_function.
-
#cram_set_header(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_set_option(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_set_voption(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_slice_hdr_get_coords(pointer) ⇒ void
The return value of attach_function.
-
#cram_slice_hdr_get_embed_ref_id(pointer) ⇒ int
The return value of attach_function.
-
#cram_slice_hdr_get_num_blocks(pointer) ⇒ int32
The return value of attach_function.
-
#cram_store_container(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_transcode_rg(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_uncompress_block(cram_block) ⇒ int
The return value of attach_function.
-
#cram_write_block(cram_fd) ⇒ int
The return value of attach_function.
-
#cram_write_container(cram_fd) ⇒ int
The return value of attach_function.
-
#errmod_cal(pointer) ⇒ int
The return value of attach_function.
-
#errmod_destroy(pointer) ⇒ void
The return value of attach_function.
-
#errmod_init(double) ⇒ pointer
Deprecated Convenience function to determine file type attach_function \ :hts_file_type, [:string], :int.
-
#fai_build(string) ⇒ int
Build index for a FASTA or FASTQ or bgzip-compressed FASTA or FASTQ file.
-
#fai_build3(string) ⇒ int
Build index for a FASTA or FASTQ or bgzip-compressed FASTA or FASTQ file.
-
#fai_destroy([Faidx]) ⇒ void
Destroy a faidx_t struct.
-
#fai_fetch(string) ⇒ string
Fetch the sequence in a region.
-
#fai_fetch64(string) ⇒ string
Fetch the sequence in a region.
-
#fai_fetchqual(string) ⇒ string
Fetch the quality string for a region for FASTQ files.
-
#fai_fetchqual64(string) ⇒ string
The return value of attach_function.
-
#fai_load(string) ⇒ by_ref
Load index from “fn.fai”.
-
#fai_load3(string) ⇒ by_ref
Load FASTA indexes.
-
#fai_load3_format(string) ⇒ by_ref
Load FASTA or FASTQ indexes.
-
#fai_load_format(string) ⇒ by_ref
Load index from “fn.fai”.
-
#fai_parse_region(string) ⇒ string
Parses a region string.
-
#fai_path(string) ⇒ string
Determines the path to the reference index file.
-
#fai_set_cache_size(int) ⇒ void
Sets the cache size of the underlying BGZF compressed file.
-
#faidx_fetch_nseq([Faidx]) ⇒ int
Fetch the number of sequences.
-
#faidx_fetch_qual(string) ⇒ string
Fetch the quality string in a region for FASTQ files.
-
#faidx_fetch_qual64(string) ⇒ string
Fetch the quality string in a region for FASTQ files.
-
#faidx_fetch_seq(string) ⇒ string
Fetch the sequence in a region.
-
#faidx_fetch_seq64(string) ⇒ string
Fetch the sequence in a region.
-
#faidx_has_seq(string) ⇒ int
Query if sequence is present.
-
#faidx_iseq(int) ⇒ string
Return name of i-th sequence.
-
#faidx_nseq([Faidx]) ⇒ int
Return number of sequences in fai index.
-
#faidx_seq_len(string) ⇒ int
Return sequence length, -1 if not present.
-
#haddextension(string) ⇒ string
Append an extension or replace an existing extension.
-
#hclose([HFile]) ⇒ int
Flush (for output streams) and close the stream.
-
#hclose_abruptly([HFile]) ⇒ void
Close the stream, without flushing or propagating errors.
-
#hdopen(int) ⇒ by_ref
Associate a stream with an existing open file descriptor.
-
#hfile_has_plugin(string) ⇒ int
Tests for the presence of a specific hFILE plugin.
-
#hfile_list_plugins(pointer) ⇒ int
Fills out plist[] with the list of known hFILE plugins.
-
#hfile_list_schemes(string) ⇒ int
Fills out sc_list[] with the list of known URL schemes.
-
#hfile_mem_get_buffer(pointer) ⇒ string
For hfile_mem: get the internal buffer and it’s size from a hfile.
-
#hfile_mem_steal_buffer(pointer) ⇒ string
For hfile_mem: get the internal buffer and it’s size from a hfile.
-
#hflush([HFile]) ⇒ int
For writing streams, flush buffered output to the underlying stream.
-
#hgetdelim(string) ⇒ ssize_t
Read from the stream until the delimiter, up to a maximum length.
-
#hgets(string) ⇒ string
Read a line from the stream, up to a maximum length.
-
#hisremote(string) ⇒ int
Report whether the file name or URL denotes remote storage.
-
#hopen(string) ⇒ by_ref
Open the named file or URL as a stream.
-
#hpeek(pointer) ⇒ ssize_t
Peek at characters to be read without removing them from buffers.
-
#hrec_add_idx(int) ⇒ int
The return value of attach_function.
-
#hseek(off_t) ⇒ off_t
Reposition the read/write stream offset.
-
#hts_base_mod_state_alloc([]) ⇒ pointer
Allocates an hts_base_mode_state.
-
#hts_base_mod_state_free(pointer) ⇒ void
Destroys an hts_base_mode_state.
-
#hts_check_EOF([HtsFile]) ⇒ int
Determine whether a given htsFile contains a valid EOF block.
-
#hts_close([HtsFile]) ⇒ int
Close a file handle, flushing buffered data for output streams.
-
#hts_detect_format([HFile, HtsFormat]) ⇒ int
Determine format by peeking at the start of a file.
-
#hts_detect_format2(string) ⇒ int
Determine format primarily by peeking at the start of a file.
-
#hts_feature_string([]) ⇒ string
Introspection on the features enabled in htslib, string form.
-
#hts_features([]) ⇒ uint
Introspection on the features enabled in htslib.
-
#hts_flush([HtsFile]) ⇒ int
(also: #bcf_flush, #vcf_flush)
For output streams, flush any buffered data.
-
#hts_format_description([HtsFormat]) ⇒ string
Get a human-readable description of the file format.
-
#hts_format_file_extension([HtsFormat]) ⇒ string
Returns a string containing the file format extension.
-
#hts_free(pointer) ⇒ void
The return value of attach_function.
-
#hts_get_bgzfp([HtsFile]) ⇒ by_ref
Internal helper function used by tbx_itr_next().
-
#hts_get_format([HtsFile]) ⇒ by_ref
Returns the file’s format information.
-
#hts_get_log_level([]) ⇒ HtsLogLevel
Gets the selected log level.
-
#hts_getline(int) ⇒ int
Read a line (and its n or rn terminator) from a file.
-
#hts_hopen(string) ⇒ by_ref
Open an existing stream as a SAM/BAM/CRAM/VCF/BCF/etc file.
-
#hts_idx_destroy([HtsIdx]) ⇒ void
Free a BAI/CSI/TBI type index.
-
#hts_idx_finish(uint64) ⇒ int
Finish building an index.
-
#hts_idx_fmt([HtsIdx]) ⇒ int
Returns index format.
-
#hts_idx_get_meta(pointer) ⇒ uint8
Get extra index meta-data.
-
#hts_idx_get_n_no_coor([HtsIdx]) ⇒ uint64
Return the number of unplaced reads from an index.
-
#hts_idx_get_stat(int) ⇒ int
Get number of mapped and unmapped reads from an index.
-
#hts_idx_init(int) ⇒ pointer
Create a BAI/CSI/TBI type index structure.
-
#hts_idx_load(string) ⇒ by_ref
Load an index file.
-
#hts_idx_load2(string) ⇒ by_ref
Load a specific index file.
-
#hts_idx_load3(string) ⇒ by_ref
Load a specific index file.
-
#hts_idx_nseq([HtsIdx]) ⇒ int
Return the number of targets from an index.
-
#hts_idx_push(int) ⇒ int
Push an index entry.
-
#hts_idx_save(string) ⇒ int
Save an index to a file.
-
#hts_idx_save_as(string) ⇒ int
Save an index to a specific file.
-
#hts_idx_seqnames(pointer) ⇒ pointer
Return a list of target names from an index.
-
#hts_idx_set_meta(uint32) ⇒ int
Set extra index meta-data.
-
#hts_idx_tbi_name(int) ⇒ int
Add name to TBI index meta-data.
-
#hts_itr_destroy([HtsItr]) ⇒ void
Free an iterator.
-
#hts_itr_multi_bam([HtsIdx, HtsItr]) ⇒ int
The return value of attach_function.
-
#hts_itr_multi_cram([HtsIdx, HtsItr]) ⇒ int
The return value of attach_function.
-
#hts_itr_multi_next(pointer) ⇒ int
Return the next record from an iterator.
-
#hts_itr_next(pointer) ⇒ int
Return the next record from an iterator.
-
#hts_itr_query(int) ⇒ by_ref
Create a single-region iterator.
-
#hts_itr_querys(string) ⇒ by_ref
Create a single-region iterator from a text region specification.
-
#hts_itr_regions(pointer) ⇒ by_ref
Create a multi-region iterator from a region list.
-
#hts_lib_shutdown([]) ⇒ void
The return value of attach_function.
-
#hts_md5_destroy(pointer) ⇒ void
Deallocates any memory allocated by hts_md5_init.
-
#hts_md5_final(pointer) ⇒ void
Computes the final 128-bit MD5 hash from the given context.
-
#hts_md5_hex(string) ⇒ void
Converts a 128-bit MD5 hash into a 33-byte nul-termninated by string.
-
#hts_md5_init([]) ⇒ pointer
Initialises an MD5 context.
-
#hts_md5_reset(pointer) ⇒ void
Resets an md5_context to the initial state, as returned by hts_md5_init().
-
#hts_md5_update(pointer) ⇒ void
Updates the context with the MD5 of the data.
-
#hts_open(string) ⇒ by_ref
Open a sequence data (SAM/BAM/CRAM) or variant data (VCF/BCF) or possibly-compressed textual line-orientated file.
-
#hts_open_format(string) ⇒ by_ref
Open a SAM/BAM/CRAM/VCF/BCF/etc file.
-
#hts_opt_add(pointer) ⇒ int
Parses arg and appends it to the option list.
-
#hts_opt_apply([HtsFile, HtsOpt]) ⇒ int
Applies an hts_opt option list to a given htsFile.
-
#hts_opt_free([HtsOpt]) ⇒ void
Frees an hts_opt list.
-
#hts_parse_decimal(string) ⇒ long_long
Parse a numeric string.
-
#hts_parse_format(string) ⇒ int
Accepts a string file format (sam, bam, cram, vcf, bam).
-
#hts_parse_opt_list(string) ⇒ int
Tokenise options as (key(=value)?,)*(key(=value)?)?.
-
#hts_parse_reg(string) ⇒ string
Parse a “CHR:START-END”-style region string.
-
#hts_parse_reg64(string) ⇒ string
Parse a “CHR:START-END”-style region string.
-
#hts_parse_region(string) ⇒ string
Parse a “CHR:START-END”-style region string.
-
#hts_readlines(string) ⇒ pointer
The return value of attach_function.
-
#hts_readlist(string) ⇒ pointer
Parse comma-separated list or read list from a file.
-
#hts_reglist_create(pointer) ⇒ by_ref
Create a region list from a char array.
-
#hts_reglist_free(int) ⇒ void
Free a region list.
-
#hts_set_cache_size(int) ⇒ void
Adds a cache of decompressed blocks, potentially speeding up seeks.
-
#hts_set_fai_filename(string) ⇒ int
Set .fai filename for a file opened for reading.
-
#hts_set_filter_expression(string) ⇒ int
Sets a filter expression.
-
#hts_set_log_level([HtsLogLevel]) ⇒ void
Sets the selected log level.
-
#hts_set_opt(varargs) ⇒ int
Sets a specified CRAM option on the open file handle.
-
#hts_set_thread_pool([HtsFile, HtsTpool]) ⇒ int
Create extra threads to aid compress/decompression for this file.
-
#hts_set_threads(int) ⇒ int
Create extra threads to aid compress/decompression for this file.
-
#hts_test_feature(uint) ⇒ string
The return value of attach_function.
-
#hts_tpool_delete_result(int) ⇒ void
The return value of attach_function.
-
#hts_tpool_destroy([HtsTpool]) ⇒ void
The return value of attach_function.
-
#hts_tpool_dispatch(pointer) ⇒ int
The return value of attach_function.
-
#hts_tpool_dispatch2(pointer) ⇒ int
The return value of attach_function.
-
#hts_tpool_dispatch3(pointer) ⇒ int
The return value of attach_function.
-
#hts_tpool_init(int) ⇒ by_ref
The return value of attach_function.
-
#hts_tpool_kill([HtsTpool]) ⇒ void
The return value of attach_function.
-
#hts_tpool_next_result([HtsTpoolProcess]) ⇒ HtsTpoolResult
The return value of attach_function.
-
#hts_tpool_next_result_wait([HtsTpoolProcess]) ⇒ HtsTpoolResult
The return value of attach_function.
-
#hts_tpool_process_attach([HtsTpool, HtsTpoolProcess]) ⇒ void
The return value of attach_function.
-
#hts_tpool_process_destroy([HtsTpoolProcess]) ⇒ void
The return value of attach_function.
-
#hts_tpool_process_detach([HtsTpool, HtsTpoolProcess]) ⇒ void
The return value of attach_function.
-
#hts_tpool_process_empty([HtsTpoolProcess]) ⇒ int
The return value of attach_function.
-
#hts_tpool_process_flush([HtsTpoolProcess]) ⇒ int
The return value of attach_function.
-
#hts_tpool_process_init(int) ⇒ HtsTpoolProcess
The return value of attach_function.
-
#hts_tpool_process_is_shutdown([HtsTpoolProcess]) ⇒ int
The return value of attach_function.
-
#hts_tpool_process_len([HtsTpoolProcess]) ⇒ int
The return value of attach_function.
-
#hts_tpool_process_qsize([HtsTpoolProcess]) ⇒ int
The return value of attach_function.
-
#hts_tpool_process_ref_decr([HtsTpoolProcess]) ⇒ void
The return value of attach_function.
-
#hts_tpool_process_ref_incr([HtsTpoolProcess]) ⇒ void
The return value of attach_function.
-
#hts_tpool_process_reset(int) ⇒ int
The return value of attach_function.
-
#hts_tpool_process_shutdown([HtsTpoolProcess]) ⇒ void
The return value of attach_function.
-
#hts_tpool_process_sz([HtsTpoolProcess]) ⇒ int
The return value of attach_function.
-
#hts_tpool_result_data([HtsTpoolResult]) ⇒ pointer
The return value of attach_function.
-
#hts_tpool_size([HtsTpool]) ⇒ int
The return value of attach_function.
-
#hts_tpool_wake_dispatch([HtsTpoolProcess]) ⇒ void
The return value of attach_function.
-
#hts_version([]) ⇒ string
Get the htslib version number.
-
#int32_put_blk(cram_block) ⇒ int
The return value of attach_function.
-
#kf_betai(double) ⇒ double
The return value of attach_function.
-
#kf_erfc(double) ⇒ double
complementary error function.
-
#kf_gammap(double) ⇒ double
The following computes regularized incomplete gamma functions.
-
#kf_gammaq(double) ⇒ double
The return value of attach_function.
-
#kf_lgamma(double) ⇒ double
Log gamma function.
-
#kt_fisher_exact(int) ⇒ double
The return value of attach_function.
-
#probaln_glocal(pointer) ⇒ int
Perform probabilistic banded glocal alignment.
-
#sam_cap_mapq(string) ⇒ int
The return value of attach_function.
-
#sam_format1([SamHdr, Bam1, KString]) ⇒ int
The return value of attach_function.
-
#sam_hdr_add_line(string) ⇒ int
Adds a single line to an existing header.
-
#sam_hdr_add_lines(string) ⇒ int
Add formatted lines to an existing header.
-
#sam_hdr_add_pg(string) ⇒ int
Add an @PG line.
-
#sam_hdr_change_HD(string) ⇒ int
The return value of attach_function.
-
#sam_hdr_count_lines(string) ⇒ int
Count the number of lines for a given header type.
-
#sam_hdr_destroy([SamHdr]) ⇒ void
Frees the resources associated with a header.
-
#sam_hdr_dup([SamHdr]) ⇒ by_ref
Duplicate a header structure.
-
#sam_hdr_find_line_id(string) ⇒ int
Returns a complete line of formatted text for a given type and ID.
-
#sam_hdr_find_line_pos(string) ⇒ int
Returns a complete line of formatted text for a given type and index.
-
#sam_hdr_find_tag_id(string) ⇒ int
Return the value associated with a key for a header line identified by ID_key:ID_val.
-
#sam_hdr_find_tag_pos(string) ⇒ int
Return the value associated with a key for a header line identified by position.
-
#sam_hdr_incr_ref([SamHdr]) ⇒ void
Increments the reference count on a header.
-
#sam_hdr_init([]) ⇒ by_ref
Generates a new unpopulated header structure.
-
#sam_hdr_length([SamHdr]) ⇒ size_t
Returns the current length of the header text.
-
#sam_hdr_line_index(string) ⇒ int
Index of the line for the types that have dedicated look-up tables (SQ, RG, PG).
-
#sam_hdr_line_name(string) ⇒ string
Id key of the line for the types that have dedicated look-up tables (SQ, RG, PG).
-
#sam_hdr_name2tid(string) ⇒ int
Get the target id for a given reference sequence name.
-
#sam_hdr_nref([SamHdr]) ⇒ int
Returns the number of references in the header.
-
#sam_hdr_parse(size_t) ⇒ by_ref
Create a header from existing text.
-
#sam_hdr_pg_id(string) ⇒ string
Generate a unique @PG ID: value.
-
#sam_hdr_read([SamFile]) ⇒ by_ref
Read a header from a SAM, BAM or CRAM file.
-
#sam_hdr_remove_except(string) ⇒ int
Remove all lines of a given type from a header, except the one matching an ID.
-
#sam_hdr_remove_line_id(string) ⇒ int
Remove a line with given type / id from a header.
-
#sam_hdr_remove_line_pos(string) ⇒ int
Remove nth line of a given type from a header.
-
#sam_hdr_remove_lines(string) ⇒ int
Remove header lines of a given type, except those in a given ID set.
-
#sam_hdr_remove_tag_id(string) ⇒ int
Remove the key from the line identified by type, ID_key and ID_value.
-
#sam_hdr_str([SamHdr]) ⇒ string
Returns the text representation of the header.
-
#sam_hdr_tid2len(int) ⇒ hts_pos_t
Get the reference sequence length from a target index.
-
#sam_hdr_tid2name(int) ⇒ string
Get the reference sequence name from a target index.
-
#sam_hdr_update_line(string) ⇒ int
Add or update tag key,value pairs in a header line.
-
#sam_hdr_write([SamFile, SamHdr]) ⇒ int
Write a header to a SAM, BAM or CRAM file.
-
#sam_idx_init(int) ⇒ int
Initialise fp->idx for the current format type for SAM, BAM and CRAM types .
-
#sam_idx_save([HtsFile]) ⇒ int
Writes the index initialised with sam_idx_init to disk.
-
#sam_index_build(string) ⇒ int
Generate and save an index file.
-
#sam_index_build2(string) ⇒ int
Generate and save an index to a specific file.
-
#sam_index_build3(string) ⇒ int
Generate and save an index to a specific file.
-
#sam_index_load(string) ⇒ by_ref
Load a BAM (.csi or .bai) or CRAM (.crai) index file.
-
#sam_index_load2(string) ⇒ by_ref
Load a specific BAM (.csi or .bai) or CRAM (.crai) index file.
-
#sam_index_load3(string) ⇒ by_ref
Load or stream a BAM (.csi or .bai) or CRAM (.crai) index file.
-
#sam_itr_queryi(int) ⇒ by_ref
Create a BAM/CRAM iterator.
-
#sam_itr_querys(string) ⇒ by_ref
Create a SAM/BAM/CRAM iterator.
-
#sam_itr_regarray(pointer) ⇒ by_ref
Create a multi-region iterator.
-
#sam_itr_regions(uint) ⇒ by_ref
Create a multi-region iterator.
-
#sam_open_mode(string) ⇒ int
macros (or alias) sam_open sam_open_format sam_close.
-
#sam_open_mode_opts(string) ⇒ string
A version of sam_open_mode that can handle ,key=value options.
-
#sam_parse1([KString, SamHdr, Bam1]) ⇒ int
The return value of attach_function.
-
#sam_parse_cigar(string) ⇒ ssize_t
Parse a CIGAR string into a uint32_t array.
-
#sam_parse_region(string) ⇒ string
The return value of attach_function.
-
#sam_passes_filter(pointer) ⇒ int
Checks whether a record passes an hts_filter.
-
#sam_prob_realn(string) ⇒ int
The return value of attach_function.
-
#sam_read1([HtsFile, SamHdr, Bam1]) ⇒ int
Read a record from a file.
-
#sam_write1([HtsFile, SamHdr, Bam1]) ⇒ int
Write a record to a file.
-
#stringify_argv(int) ⇒ string
A function to help with construction of CL tags in @PG records.
-
#tbx_destroy([Tbx]) ⇒ void
The return value of attach_function.
-
#tbx_index(int) ⇒ by_ref
Build an index of the lines in a BGZF-compressed file.
-
#tbx_index_build(string) ⇒ int
The return value of attach_function.
-
#tbx_index_build2(string) ⇒ int
The return value of attach_function.
-
#tbx_index_build3(string) ⇒ int
The return value of attach_function.
-
#tbx_index_load(string) ⇒ by_ref
Load or stream a .tbi or .csi index.
-
#tbx_index_load2(string) ⇒ by_ref
Load or stream a .tbi or .csi index.
-
#tbx_index_load3(string) ⇒ by_ref
Load or stream a .tbi or .csi index.
-
#tbx_name2id(string) ⇒ int
The return value of attach_function.
-
#tbx_readrec(pointer) ⇒ int
The return value of attach_function.
-
#tbx_seqnames(pointer) ⇒ pointer
The return value of attach_function.
-
#vcf_format([BcfHdr, Bcf1, KString]) ⇒ int
The return value of attach_function.
-
#vcf_hdr_read([HtsFile]) ⇒ by_ref
The return value of attach_function.
-
#vcf_hdr_write([HtsFile, BcfHdr]) ⇒ int
The return value of attach_function.
-
#vcf_open_mode(string) ⇒ int
The return value of attach_function.
-
#vcf_parse([KString, BcfHdr, Bcf1]) ⇒ int
The return value of attach_function.
-
#vcf_read([HtsFile, BcfHdr, Bcf1]) ⇒ int
The return value of attach_function.
-
#vcf_write([HtsFile, BcfHdr, Bcf1]) ⇒ int
The return value of attach_function.
-
#vcf_write_line([HtsFile, KString]) ⇒ int
The return value of attach_function.
Class Method Details
.attach_function ⇒ Object
20 21 22 23 24 |
# File 'lib/hts/libhts.rb', line 20 def self.attach_function(*) super rescue FFI::NotFoundError => e warn e. end |
.bam_cigar_gen(l, o) ⇒ Object
36 37 38 |
# File 'lib/hts/libhts/sam_funcs.rb', line 36 def bam_cigar_gen(l, o) (l << BAM_CIGAR_SHIFT) | o end |
.bam_cigar_op(c) ⇒ Object
24 25 26 |
# File 'lib/hts/libhts/sam_funcs.rb', line 24 def bam_cigar_op(c) c & BAM_CIGAR_MASK end |
.bam_cigar_opchr(c) ⇒ Object
32 33 34 |
# File 'lib/hts/libhts/sam_funcs.rb', line 32 def bam_cigar_opchr(c) "#{BAM_CIGAR_STR}??????"[bam_cigar_op(c)] end |
.bam_cigar_oplen(c) ⇒ Object
28 29 30 |
# File 'lib/hts/libhts/sam_funcs.rb', line 28 def bam_cigar_oplen(c) c >> BAM_CIGAR_SHIFT end |
.bam_cigar_type(o) ⇒ Object
40 41 42 |
# File 'lib/hts/libhts/sam_funcs.rb', line 40 def bam_cigar_type(o) (BAM_CIGAR_TYPE >> (o << 1)) & 3 end |
.bam_get_aux(b) ⇒ Object
85 86 87 |
# File 'lib/hts/libhts/sam_funcs.rb', line 85 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
73 74 75 |
# File 'lib/hts/libhts/sam_funcs.rb', line 73 def bam_get_cigar(b) b[:data] + b[:core][:l_qname] end |
.bam_get_l_aux(b) ⇒ Object
89 90 91 |
# File 'lib/hts/libhts/sam_funcs.rb', line 89 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
69 70 71 |
# File 'lib/hts/libhts/sam_funcs.rb', line 69 def bam_get_qname(b) b[:data] end |
.bam_get_qual(b) ⇒ Object
81 82 83 |
# File 'lib/hts/libhts/sam_funcs.rb', line 81 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
77 78 79 |
# File 'lib/hts/libhts/sam_funcs.rb', line 77 def bam_get_seq(b) b[:data] + (b[:core][:n_cigar] << 2) + b[:core][:l_qname] end |
.bam_index_load(fn) ⇒ Object
125 126 127 |
# File 'lib/hts/libhts/sam_funcs.rb', line 125 def bam_index_load(fn) hts_idx_load(fn, HTS_FMT_BAI) end |
.bam_is_mrev(b) ⇒ Object
65 66 67 |
# File 'lib/hts/libhts/sam_funcs.rb', line 65 def bam_is_mrev(b) b[:core][:flag] & BAM_FMREVERSE != 0 end |
.bam_is_rev(b) ⇒ Object
61 62 63 |
# File 'lib/hts/libhts/sam_funcs.rb', line 61 def bam_is_rev(b) b[:core][:flag] & BAM_FREVERSE != 0 end |
.bam_seqi(s, i) ⇒ Object
93 94 95 |
# File 'lib/hts/libhts/sam_funcs.rb', line 93 def bam_seqi(s, i) (s[i >> 1].read_uint8 >> ((~i & 1) << 2)) & 0xf end |
.bam_set_seqi(s, i, b) ⇒ Object
97 98 99 |
# File 'lib/hts/libhts/sam_funcs.rb', line 97 def bam_set_seqi(s, i, b) s[i >> 1] = (s[i >> 1] & (0xf0 >> ((~i & 1) << 2))) | ((b) << ((~i & 1) << 2)) end |
.bcf_alleles2gt(a, b) ⇒ Object
153 154 155 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 153 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
181 182 183 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 181 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
177 178 179 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 177 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
173 174 175 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 173 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
185 186 187 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 185 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
169 170 171 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 169 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
161 162 163 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 161 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
157 158 159 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 157 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
165 166 167 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 165 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
149 150 151 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 149 def bcf_gt_allele(val) ((val >> 1) - 1) end |
.bcf_gt_is_missing(val) ⇒ Object
141 142 143 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 141 def bcf_gt_is_missing(val) (val >> 1 ? 0 : 1) end |
.bcf_gt_is_phased(idx) ⇒ Object
145 146 147 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 145 def bcf_gt_is_phased(idx) (idx & 1) end |
.bcf_gt_missing ⇒ Object
137 138 139 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 137 def bcf_gt_missing 0 end |
.bcf_gt_phased(idx) ⇒ Object
129 130 131 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 129 def bcf_gt_phased(idx) ((idx + 1) << 1 | 1) end |
.bcf_gt_unphased(idx) ⇒ Object
133 134 135 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 133 def bcf_gt_unphased(idx) ((idx + 1) << 1) end |
.bcf_hdr_id2coltype(hdr, type, int_id) ⇒ Object
230 231 232 233 234 235 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 230 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
209 210 211 212 213 214 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 209 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
200 201 202 203 204 205 206 207 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 200 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
216 217 218 219 220 221 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 216 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
223 224 225 226 227 228 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 223 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
189 190 191 192 193 194 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 189 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
196 197 198 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 196 def bcf_hdr_name2id(hdr, id) bcf_hdr_id2int(hdr, BCF_DT_CTG, id) end |
.bcf_hdr_nsamples(hdr) ⇒ Object
90 91 92 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 90 def bcf_hdr_nsamples(hdr) hdr[:n][BCF_DT_SAMPLE] end |
.bcf_index_load(fn) ⇒ Object
255 256 257 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 255 def bcf_index_load(fn) hts_idx_load(fn, HTS_FMT_CSI) end |
.bcf_index_seqnames(idx, hdr, nptr) ⇒ Object
259 260 261 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 259 def bcf_index_seqnames(idx, hdr, nptr) hts_idx_seqnames(idx, nptr, @@bcf_hdr_id2name, hdr) end |
.bcf_int16_missing ⇒ Object
INT16_MIN
270 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 270 def bcf_int16_missing = (-32_767 - 1) # INT16_MIN |
.bcf_int16_vector_end ⇒ Object
INT8_MIN + 1
265 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 265 def bcf_int16_vector_end = -32_767 # INT16_MIN + 1 |
.bcf_int32_missing ⇒ Object
INT32_MIN
271 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 271 def bcf_int32_missing = (-2_147_483_647 - 1) # INT32_MIN |
.bcf_int32_vector_end ⇒ Object
INT16_MIN + 1
266 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 266 def bcf_int32_vector_end = -2_147_483_647 # INT32_MIN + 1 |
.bcf_int64_missing ⇒ Object
INT64_MIN
272 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 272 def bcf_int64_missing = (-9_223_372_036_854_775_807 - 1) # INT64_MIN |
.bcf_int64_vector_end ⇒ Object
INT32_MIN + 1
267 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 267 def bcf_int64_vector_end = -9_223_372_036_854_775_807 # INT64_MIN + 1 |
.bcf_int8_missing ⇒ Object
INT8_MIN
269 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 269 def bcf_int8_missing = -128 # INT8_MIN |
.bcf_int8_vector_end ⇒ Object
Typed value I/O
264 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 264 def bcf_int8_vector_end = -127 # INT8_MIN + 1 |
.bcf_itr_queryi(idx, tid, beg, _end) ⇒ Object
243 244 245 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 243 def bcf_itr_queryi(idx, tid, beg, _end) hts_itr_query(idx, tid, beg, _end, @@bcf_readrec) end |
.bcf_itr_querys(idx, hdr, s) ⇒ Object
251 252 253 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 251 def bcf_itr_querys(idx, hdr, s) hts_itr_querys(idx, s, @@bcf_hdr_name2id, hdr, @@hts_itr_query, @@bcf_readrec) end |
.bcf_str_missing ⇒ Object
273 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 273 def bcf_str_missing = 0x07 |
.bcf_str_vector_end ⇒ Object
INT64_MIN + 1
268 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 268 def bcf_str_vector_end = 0 |
.bcf_update_format_char(hdr, line, key, values, n) ⇒ Object
120 121 122 123 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 120 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
115 116 117 118 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 115 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
110 111 112 113 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 110 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
125 126 127 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 125 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
102 103 104 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 102 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
98 99 100 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 98 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
94 95 96 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 94 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
106 107 108 |
# File 'lib/hts/libhts/vcf_funcs.rb', line 106 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_hdr_find_hd(h, ks) ⇒ Object
101 102 103 |
# File 'lib/hts/libhts/sam_funcs.rb', line 101 def sam_hdr_find_hd(h, ks) sam_hdr_find_line_id(h, "HD", nil, nil, ks) end |
.sam_hdr_find_tag_hd(h, key, ks) ⇒ Object
105 106 107 |
# File 'lib/hts/libhts/sam_funcs.rb', line 105 def sam_hdr_find_tag_hd(h, key, ks) sam_hdr_find_tag_id(h, "HD", nil, nil, key, ks) end |
.sam_hdr_remove_tag_hd(h, key) ⇒ Object
113 114 115 |
# File 'lib/hts/libhts/sam_funcs.rb', line 113 def sam_hdr_remove_tag_hd(h, key) sam_hdr_remove_tag_id(h, "HD", nil, nil, key) end |
.sam_hdr_update_hd(h, *args) ⇒ Object
109 110 111 |
# File 'lib/hts/libhts/sam_funcs.rb', line 109 def sam_hdr_update_hd(h, *args) sam_hdr_update_line(h, "HD", nil, nil, *args, nil) end |
.sam_itr_next(htsfp, itr, r) ⇒ Object Also known as: bam_itr_next
Get the next read from a SAM/BAM/CRAM iterator
379 380 381 382 383 384 385 |
# File 'lib/hts/libhts/sam.rb', line 379 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 |
.tbx_bgzf_itr_next(bgzfp, tbx, itr, r) ⇒ Object
20 21 22 |
# File 'lib/hts/libhts/tbx_funcs.rb', line 20 def tbx_bgzf_itr_next(bgzfp, tbx, itr, r) hts_itr_next(bgzfp, itr, r, tbx) end |
.tbx_itr_destroy(iter) ⇒ Object
4 5 6 |
# File 'lib/hts/libhts/tbx_funcs.rb', line 4 def tbx_itr_destroy(iter) hts_itr_destroy(iter) end |
.tbx_itr_next(htsfp, tbx, itr, r) ⇒ Object
16 17 18 |
# File 'lib/hts/libhts/tbx_funcs.rb', line 16 def tbx_itr_next(htsfp, tbx, itr, r) hts_itr_next(hts_get_bgzfp(htsfp), itr, r, tbx) end |
.tbx_itr_queryi(tbx, tid, beg, end_) ⇒ Object
8 9 10 |
# File 'lib/hts/libhts/tbx_funcs.rb', line 8 def tbx_itr_queryi(tbx, tid, beg, end_) hts_itr_query(tbx[:idx], tid, beg, end_, tbx_readrec) end |
.tbx_itr_querys(tbx, s) ⇒ Object
12 13 14 |
# File 'lib/hts/libhts/tbx_funcs.rb', line 12 def tbx_itr_querys(tbx, s) hts_itr_querys(tbx[:idx], s, @@tbx_name2id, tbx, @@hts_itr_query, @@tbx_readrec) end |
Instance Method Details
#bam_aux2A(pointer) ⇒ char
Get a character aux value
462 463 464 465 |
# File 'lib/hts/libhts/sam.rb', line 462 attach_function \ :bam_aux2A, [:pointer], :char |
#bam_aux2f(pointer) ⇒ double
Get an integer aux value
456 457 458 459 |
# File 'lib/hts/libhts/sam.rb', line 456 attach_function \ :bam_aux2f, [:pointer], :double |
#bam_aux2i(pointer) ⇒ int64
Get an integer aux value
450 451 452 453 |
# File 'lib/hts/libhts/sam.rb', line 450 attach_function \ :bam_aux2i, [:pointer], :int64 |
#bam_aux2Z(pointer) ⇒ string
Get a string aux value
468 469 470 471 |
# File 'lib/hts/libhts/sam.rb', line 468 attach_function \ :bam_aux2Z, [:pointer], :string |
#bam_aux_append(string) ⇒ int
Append tag data to a bam record
492 493 494 495 |
# File 'lib/hts/libhts/sam.rb', line 492 attach_function \ :bam_aux_append, [Bam1, :string, :string, :int, :pointer], :int |
#bam_aux_del(pointer) ⇒ int
Delete tag data from a bam record
498 499 500 501 |
# File 'lib/hts/libhts/sam.rb', line 498 attach_function \ :bam_aux_del, [Bam1, :pointer], :int |
#bam_aux_get(string) ⇒ pointer
Return a pointer to an aux record
444 445 446 447 |
# File 'lib/hts/libhts/sam.rb', line 444 attach_function \ :bam_aux_get, [Bam1, :string], # FIXME :pointer |
#bam_aux_update_array(string) ⇒ int
Update or add an array tag
522 523 524 525 |
# File 'lib/hts/libhts/sam.rb', line 522 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
516 517 518 519 |
# File 'lib/hts/libhts/sam.rb', line 516 attach_function \ :bam_aux_update_float, [Bam1, :string, :float], :int |
#bam_aux_update_int(string) ⇒ int
Update or add an integer tag
510 511 512 513 |
# File 'lib/hts/libhts/sam.rb', line 510 attach_function \ :bam_aux_update_int, [Bam1, :string, :int64], :int |
#bam_aux_update_str(string) ⇒ int
Update or add a string-type tag
504 505 506 507 |
# File 'lib/hts/libhts/sam.rb', line 504 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
486 487 488 489 |
# File 'lib/hts/libhts/sam.rb', line 486 attach_function \ :bam_auxB2f, %i[pointer uint], :double |
#bam_auxB2i(pointer) ⇒ int64
Get an integer value from an array-type tag
480 481 482 483 |
# File 'lib/hts/libhts/sam.rb', line 480 attach_function \ :bam_auxB2i, %i[pointer uint], :int64 |
#bam_auxB_len(pointer) ⇒ uint
Get the length of an array-type (‘B’) tag
474 475 476 477 |
# File 'lib/hts/libhts/sam.rb', line 474 attach_function \ :bam_auxB_len, [:pointer], :uint |
#bam_cigar2qlen(int) ⇒ int64
Calculate query length from CIGAR data
261 262 263 264 |
# File 'lib/hts/libhts/sam.rb', line 261 attach_function \ :bam_cigar2qlen, %i[int pointer], :int64 |
#bam_cigar2rlen(int) ⇒ hts_pos_t
Calculate reference length from CIGAR data
267 268 269 270 |
# File 'lib/hts/libhts/sam.rb', line 267 attach_function \ :bam_cigar2rlen, %i[int pointer], :hts_pos_t |
#bam_copy1([Bam1, Bam1]) ⇒ by_ref
Copy alignment record data
228 229 230 231 |
# File 'lib/hts/libhts/sam.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.rb', line 210 attach_function \ :bam_destroy1, [Bam1], :void |
#bam_dup1([Bam1]) ⇒ by_ref
Create a duplicate alignment record
234 235 236 237 |
# File 'lib/hts/libhts/sam.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.
273 274 275 276 |
# File 'lib/hts/libhts/sam.rb', line 273 attach_function \ :bam_endpos, [Bam1], :hts_pos_t |
#bam_flag2str(int) ⇒ string
Returns the return value of attach_function.
283 284 285 286 |
# File 'lib/hts/libhts/sam.rb', line 283 attach_function \ :bam_flag2str, [:int], :string |
#bam_hdr_read([BGZF]) ⇒ by_ref
Read the header from a BAM compressed file.
12 13 14 15 |
# File 'lib/hts/libhts/sam.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.
18 19 20 21 |
# File 'lib/hts/libhts/sam.rb', line 18 attach_function \ :bam_hdr_write, [BGZF, SamHdr], :int |
#bam_init1([]) ⇒ by_ref
Create a new bam1_t alignment structure
204 205 206 207 |
# File 'lib/hts/libhts/sam.rb', line 204 attach_function \ :bam_init1, [], Bam1.by_ref |
#bam_mods_at_next_pos(pointer) ⇒ int
Returns modification status for the next base position in the query seq.
672 673 674 675 |
# File 'lib/hts/libhts/sam.rb', line 672 attach_function \ :bam_mods_at_next_pos, [Bam1, :pointer, :pointer, :int], :int |
#bam_mods_at_qpos(int) ⇒ int
Returns modification status for a specific query position.
684 685 686 687 |
# File 'lib/hts/libhts/sam.rb', line 684 attach_function \ :bam_mods_at_qpos, [Bam1, :int, :pointer, :pointer, :int], :int |
#bam_mods_query_type(pointer) ⇒ int
Returns data about a specific modification type for the alignment record.
690 691 692 693 |
# File 'lib/hts/libhts/sam.rb', line 690 attach_function \ :bam_mods_query_type, %i[pointer int pointer pointer string], :int |
#bam_mods_recorded(pointer) ⇒ int
Returns the list of base modification codes provided for this
696 697 698 699 |
# File 'lib/hts/libhts/sam.rb', line 696 attach_function \ :bam_mods_recorded, %i[pointer pointer], :int |
#bam_mplp64_auto(bam_mplp) ⇒ int
Returns the return value of attach_function.
623 624 625 626 |
# File 'lib/hts/libhts/sam.rb', line 623 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.
618 619 620 621 |
# File 'lib/hts/libhts/sam.rb', line 618 attach_function \ :bam_mplp_auto, %i[bam_mplp pointer pointer pointer pointer], # BamPileup1T :int |
#bam_mplp_constructor(bam_mplp) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
633 634 635 636 |
# File 'lib/hts/libhts/sam.rb', line 633 attach_function \ :bam_mplp_constructor, %i[bam_mplp bam_plp_callback_funcion], :void |
#bam_mplp_destroy(bam_mplp) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
608 609 610 611 |
# File 'lib/hts/libhts/sam.rb', line 608 attach_function \ :bam_mplp_destroy, [:bam_mplp], :void |
#bam_mplp_destructor(bam_mplp) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
638 639 640 641 |
# File 'lib/hts/libhts/sam.rb', line 638 attach_function \ :bam_mplp_destructor, %i[bam_mplp bam_plp_callback_funcion], :void |
#bam_mplp_init(int) ⇒ bam_mplp
Returns the return value of attach_function.
598 599 600 601 |
# File 'lib/hts/libhts/sam.rb', line 598 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.
603 604 605 606 |
# File 'lib/hts/libhts/sam.rb', line 603 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.
628 629 630 631 |
# File 'lib/hts/libhts/sam.rb', line 628 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.
613 614 615 616 |
# File 'lib/hts/libhts/sam.rb', line 613 attach_function \ :bam_mplp_set_maxcnt, %i[bam_mplp int], :void |
#bam_next_basemod(pointer) ⇒ int
Finds the next location containing base modifications and returns them
678 679 680 681 |
# File 'lib/hts/libhts/sam.rb', line 678 attach_function \ :bam_next_basemod, [Bam1, :pointer, :pointer, :int, :pointer], :int |
#bam_parse_basemod(pointer) ⇒ int
Parses the Mm and Ml tags out of a bam record.
666 667 668 669 |
# File 'lib/hts/libhts/sam.rb', line 666 attach_function \ :bam_parse_basemod, [Bam1, :pointer], :int |
#bam_parse_cigar(string) ⇒ ssize_t
Parse a CIGAR string into a bam1_t struct
301 302 303 304 |
# File 'lib/hts/libhts/sam.rb', line 301 attach_function \ :bam_parse_cigar, [:string, :pointer, Bam1], :ssize_t |
#bam_plp64_auto(bam_plp) ⇒ by_ref
Returns the return value of attach_function.
558 559 560 561 |
# File 'lib/hts/libhts/sam.rb', line 558 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.
553 554 555 556 |
# File 'lib/hts/libhts/sam.rb', line 553 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.
548 549 550 551 |
# File 'lib/hts/libhts/sam.rb', line 548 attach_function \ :bam_plp_auto, %i[bam_plp pointer pointer pointer], BamPileup1.by_ref |
#bam_plp_constructor(bam_plp) ⇒ void
This method returns an undefined value.
sets a callback to initialise any per-pileup1_t fields.
576 577 578 579 |
# File 'lib/hts/libhts/sam.rb', line 576 attach_function \ :bam_plp_constructor, %i[bam_plp bam_plp_callback_funcion], :void |
#bam_plp_destroy(bam_plp) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
533 534 535 536 |
# File 'lib/hts/libhts/sam.rb', line 533 attach_function \ :bam_plp_destroy, [:bam_plp], :void |
#bam_plp_destructor(bam_plp) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
581 582 583 584 |
# File 'lib/hts/libhts/sam.rb', line 581 attach_function \ :bam_plp_destructor, %i[bam_plp bam_plp_callback_funcion], :void |
#bam_plp_init(bam_plp_auto_f) ⇒ bam_plp
sets an iterator over multiple
528 529 530 531 |
# File 'lib/hts/libhts/sam.rb', line 528 attach_function \ :bam_plp_init, %i[bam_plp_auto_f pointer], :bam_plp |
#bam_plp_insertion(pointer) ⇒ int
Get pileup padded insertion sequence
587 588 589 590 |
# File 'lib/hts/libhts/sam.rb', line 587 attach_function \ :bam_plp_insertion, [BamPileup1, KString, :pointer], :int |
#bam_plp_insertion_mod(pointer) ⇒ int
Get pileup padded insertion sequence, including base modifications
593 594 595 596 |
# File 'lib/hts/libhts/sam.rb', line 593 attach_function \ :bam_plp_insertion_mod, [BamPileup1, :pointer, KString, :pointer], :int |
#bam_plp_next(bam_plp) ⇒ by_ref
Returns the return value of attach_function.
543 544 545 546 |
# File 'lib/hts/libhts/sam.rb', line 543 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.
538 539 540 541 |
# File 'lib/hts/libhts/sam.rb', line 538 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.
568 569 570 571 |
# File 'lib/hts/libhts/sam.rb', line 568 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.
563 564 565 566 |
# File 'lib/hts/libhts/sam.rb', line 563 attach_function \ :bam_plp_set_maxcnt, %i[bam_plp int], :void |
#bam_read1([BGZF, Bam1]) ⇒ int
Read a BAM format alignment record
216 217 218 219 |
# File 'lib/hts/libhts/sam.rb', line 216 attach_function \ :bam_read1, [BGZF, Bam1], :int |
#bam_set1(size_t) ⇒ int
Set all components of an alignment structure
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 |
# File 'lib/hts/libhts/sam.rb', line 240 attach_function \ :bam_set1, [Bam1, :size_t, :string, :uint16_t, :int32_t, :hts_pos_t, :uint8_t, :size_t, :string, :int32_t, :hts_pos_t, :hts_pos_t, :size_t, :string, :string, :size_t], :int |
#bam_set_qname(string) ⇒ int
Set the name of the query
289 290 291 292 |
# File 'lib/hts/libhts/sam.rb', line 289 attach_function \ :bam_set_qname, [Bam1, :string], :int |
#bam_str2flag(string) ⇒ int
Returns the return value of attach_function.
278 279 280 281 |
# File 'lib/hts/libhts/sam.rb', line 278 attach_function \ :bam_str2flag, [:string], :int |
#bam_write1([BGZF, Bam1]) ⇒ int
Write a BAM format alignment record
222 223 224 225 |
# File 'lib/hts/libhts/sam.rb', line 222 attach_function \ :bam_write1, [BGZF, Bam1], :int |
#bcf_add_filter(int) ⇒ int
Returns the return value of attach_function.
304 305 306 307 |
# File 'lib/hts/libhts/vcf.rb', line 304 attach_function \ :bcf_add_filter, [BcfHdr, Bcf1, :int], :int |
#bcf_add_id(string) ⇒ int
Returns the return value of attach_function.
334 335 336 337 |
# File 'lib/hts/libhts/vcf.rb', line 334 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.rb', line 30 attach_function \ :bcf_clear, [Bcf1], :void |
#bcf_copy([Bcf1, Bcf1]) ⇒ by_ref
Returns the return value of attach_function.
85 86 87 88 |
# File 'lib/hts/libhts/vcf.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.rb', line 20 attach_function \ :bcf_destroy, [Bcf1], :void |
#bcf_dup([Bcf1]) ⇒ by_ref
Returns the return value of attach_function.
80 81 82 83 |
# File 'lib/hts/libhts/vcf.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.rb', line 25 attach_function \ :bcf_empty, [Bcf1], :void |
#bcf_enc_vchar(int) ⇒ int
Returns the return value of attach_function.
404 405 406 407 |
# File 'lib/hts/libhts/vcf.rb', line 404 attach_function \ :bcf_enc_vchar, [KString, :int, :string], :int |
#bcf_enc_vfloat(int) ⇒ int
Returns the return value of attach_function.
414 415 416 417 |
# File 'lib/hts/libhts/vcf.rb', line 414 attach_function \ :bcf_enc_vfloat, [KString, :int, :pointer], :int |
#bcf_enc_vint(int) ⇒ int
Returns the return value of attach_function.
409 410 411 412 |
# File 'lib/hts/libhts/vcf.rb', line 409 attach_function \ :bcf_enc_vint, [KString, :int, :pointer, :int], :int |
#bcf_float_missing([]) ⇒ uint32
Returns the return value of attach_function.
459 460 461 462 |
# File 'lib/hts/libhts/vcf.rb', line 459 attach_function \ :bcf_float_missing, [], :uint32 |
#bcf_float_vector_end([]) ⇒ uint32
Returns the return value of attach_function.
454 455 456 457 |
# File 'lib/hts/libhts/vcf.rb', line 454 attach_function \ :bcf_float_vector_end, [], :uint32 |
#bcf_fmt_array(int) ⇒ int
Returns the return value of attach_function.
394 395 396 397 |
# File 'lib/hts/libhts/vcf.rb', line 394 attach_function \ :bcf_fmt_array, [KString, :int, :int, :pointer], :int |
#bcf_fmt_sized_array(pointer) ⇒ uint8_t
Returns the return value of attach_function.
399 400 401 402 |
# File 'lib/hts/libhts/vcf.rb', line 399 attach_function \ :bcf_fmt_sized_array, [KString, :pointer], :uint8_t |
#bcf_get_fmt(string) ⇒ by_ref
Returns the return value of attach_function.
354 355 356 357 |
# File 'lib/hts/libhts/vcf.rb', line 354 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.
364 365 366 367 |
# File 'lib/hts/libhts/vcf.rb', line 364 attach_function \ :bcf_get_fmt_id, [Bcf1, :int], BcfFmt.by_ref |
#bcf_get_format_string(string) ⇒ int
Returns the return value of attach_function.
379 380 381 382 |
# File 'lib/hts/libhts/vcf.rb', line 379 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.
384 385 386 387 |
# File 'lib/hts/libhts/vcf.rb', line 384 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.
359 360 361 362 |
# File 'lib/hts/libhts/vcf.rb', line 359 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.
369 370 371 372 |
# File 'lib/hts/libhts/vcf.rb', line 369 attach_function \ :bcf_get_info_id, [Bcf1, :int], BcfInfo.by_ref |
#bcf_get_info_values(string) ⇒ int
Returns the return value of attach_function.
374 375 376 377 |
# File 'lib/hts/libhts/vcf.rb', line 374 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.
274 275 276 277 |
# File 'lib/hts/libhts/vcf.rb', line 274 attach_function \ :bcf_get_variant_type, [Bcf1, :int], :int |
#bcf_get_variant_types([Bcf1]) ⇒ int
Returns the return value of attach_function.
269 270 271 272 |
# File 'lib/hts/libhts/vcf.rb', line 269 attach_function \ :bcf_get_variant_types, [Bcf1], :int |
#bcf_has_filter(string) ⇒ int
Returns the return value of attach_function.
314 315 316 317 |
# File 'lib/hts/libhts/vcf.rb', line 314 attach_function \ :bcf_has_filter, [BcfHdr, Bcf1, :string], :int |
#bcf_has_variant_type(int) ⇒ int
Returns the return value of attach_function.
284 285 286 287 |
# File 'lib/hts/libhts/vcf.rb', line 284 attach_function \ :bcf_has_variant_type, [Bcf1, :int, :uint32], :int |
#bcf_has_variant_types(uint32) ⇒ int
Returns the return value of attach_function.
279 280 281 282 |
# File 'lib/hts/libhts/vcf.rb', line 279 attach_function \ :bcf_has_variant_types, [Bcf1, :uint32, :int], :int |
#bcf_hdr_add_hrec([BcfHdr, BcfHrec]) ⇒ int
Returns the return value of attach_function.
219 220 221 222 |
# File 'lib/hts/libhts/vcf.rb', line 219 attach_function \ :bcf_hdr_add_hrec, [BcfHdr, BcfHrec], :int |
#bcf_hdr_add_sample(string) ⇒ int
Returns the return value of attach_function.
142 143 144 145 |
# File 'lib/hts/libhts/vcf.rb', line 142 attach_function \ :bcf_hdr_add_sample, [BcfHdr, :string], :int |
#bcf_hdr_append(string) ⇒ int
DEPRECATED
attach_function \
:bcf_hdr_fmt_text,
[BcfHdr, :int, :pointer],
:string
164 165 166 167 |
# File 'lib/hts/libhts/vcf.rb', line 164 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.rb', line 10 attach_function \ :bcf_hdr_destroy, [BcfHdr], :void |
#bcf_hdr_dup([BcfHdr]) ⇒ by_ref
Returns the return value of attach_function.
125 126 127 128 |
# File 'lib/hts/libhts/vcf.rb', line 125 attach_function \ :bcf_hdr_dup, [BcfHdr], BcfHdr.by_ref |
#bcf_hdr_format(int) ⇒ int
Returns the return value of attach_function.
152 153 154 155 |
# File 'lib/hts/libhts/vcf.rb', line 152 attach_function \ :bcf_hdr_format, [BcfHdr, :int, KString], :int |
#bcf_hdr_get_hrec(int) ⇒ by_ref
Returns the return value of attach_function.
224 225 226 227 |
# File 'lib/hts/libhts/vcf.rb', line 224 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.
174 175 176 177 |
# File 'lib/hts/libhts/vcf.rb', line 174 attach_function \ :bcf_hdr_get_version, [BcfHdr], :string |
#bcf_hdr_id2int(int) ⇒ int
Returns the return value of attach_function.
389 390 391 392 |
# File 'lib/hts/libhts/vcf.rb', line 389 attach_function \ :bcf_hdr_id2int, [BcfHdr, :int, :string], :int |
#bcf_hdr_init(string) ⇒ by_ref
Returns the return value of attach_function.
5 6 7 8 |
# File 'lib/hts/libhts/vcf.rb', line 5 attach_function \ :bcf_hdr_init, [:string], BcfHdr.by_ref |
#bcf_hdr_merge([BcfHdr, BcfHdr]) ⇒ by_ref
DEPRECATED
attach_function \
:bcf_hdr_combine,
[BcfHdr, BcfHdr],
:int
137 138 139 140 |
# File 'lib/hts/libhts/vcf.rb', line 137 attach_function \ :bcf_hdr_merge, [BcfHdr, BcfHdr], BcfHdr.by_ref |
#bcf_hdr_parse(string) ⇒ int
Returns the return value of attach_function.
199 200 201 202 |
# File 'lib/hts/libhts/vcf.rb', line 199 attach_function \ :bcf_hdr_parse, [BcfHdr, :string], :int |
#bcf_hdr_parse_line(string) ⇒ by_ref
Returns the return value of attach_function.
209 210 211 212 |
# File 'lib/hts/libhts/vcf.rb', line 209 attach_function \ :bcf_hdr_parse_line, [BcfHdr, :string, :pointer], BcfHrec.by_ref |
#bcf_hdr_printf(string) ⇒ int
Returns the return value of attach_function.
169 170 171 172 |
# File 'lib/hts/libhts/vcf.rb', line 169 attach_function \ :bcf_hdr_printf, [BcfHdr, :string, :varargs], :int |
#bcf_hdr_read([HtsFile]) ⇒ by_ref
Returns the return value of attach_function.
35 36 37 38 |
# File 'lib/hts/libhts/vcf.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.
184 185 186 187 |
# File 'lib/hts/libhts/vcf.rb', line 184 attach_function \ :bcf_hdr_remove, [BcfHdr, :int, :string], :void |
#bcf_hdr_seqnames(pointer) ⇒ pointer
Returns the return value of attach_function.
194 195 196 197 |
# File 'lib/hts/libhts/vcf.rb', line 194 attach_function \ :bcf_hdr_seqnames, [BcfHdr, :pointer], :pointer |
#bcf_hdr_set(string) ⇒ int
Returns the return value of attach_function.
147 148 149 150 |
# File 'lib/hts/libhts/vcf.rb', line 147 attach_function \ :bcf_hdr_set, [BcfHdr, :string], :int |
#bcf_hdr_set_samples(string) ⇒ int
Returns the return value of attach_function.
40 41 42 43 |
# File 'lib/hts/libhts/vcf.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.
179 180 181 182 |
# File 'lib/hts/libhts/vcf.rb', line 179 attach_function \ :bcf_hdr_set_version, [BcfHdr, :string], :int |
#bcf_hdr_subset(int) ⇒ by_ref
Returns the return value of attach_function.
189 190 191 192 |
# File 'lib/hts/libhts/vcf.rb', line 189 attach_function \ :bcf_hdr_subset, [BcfHdr, :int, :pointer, :pointer], BcfHdr.by_ref |
#bcf_hdr_sync([BcfHdr]) ⇒ int
Returns the return value of attach_function.
204 205 206 207 |
# File 'lib/hts/libhts/vcf.rb', line 204 attach_function \ :bcf_hdr_sync, [BcfHdr], :int |
#bcf_hdr_write([HtsFile, BcfHdr]) ⇒ int
Returns the return value of attach_function.
50 51 52 53 |
# File 'lib/hts/libhts/vcf.rb', line 50 attach_function \ :bcf_hdr_write, [HtsFile, BcfHdr], :int |
#bcf_hrec_add_key(string) ⇒ int
Returns the return value of attach_function.
234 235 236 237 |
# File 'lib/hts/libhts/vcf.rb', line 234 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.
254 255 256 257 |
# File 'lib/hts/libhts/vcf.rb', line 254 attach_function \ :bcf_hrec_destroy, [BcfHrec], :void |
#bcf_hrec_dup([BcfHrec]) ⇒ by_ref
Returns the return value of attach_function.
229 230 231 232 |
# File 'lib/hts/libhts/vcf.rb', line 229 attach_function \ :bcf_hrec_dup, [BcfHrec], BcfHrec.by_ref |
#bcf_hrec_find_key(string) ⇒ int
Returns the return value of attach_function.
244 245 246 247 |
# File 'lib/hts/libhts/vcf.rb', line 244 attach_function \ :bcf_hrec_find_key, [BcfHrec, :string], :int |
#bcf_hrec_format([BcfHrec, KString]) ⇒ int
Returns the return value of attach_function.
214 215 216 217 |
# File 'lib/hts/libhts/vcf.rb', line 214 attach_function \ :bcf_hrec_format, [BcfHrec, KString], :int |
#bcf_hrec_set_val(int) ⇒ int
Returns the return value of attach_function.
239 240 241 242 |
# File 'lib/hts/libhts/vcf.rb', line 239 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.
444 445 446 447 |
# File 'lib/hts/libhts/vcf.rb', line 444 attach_function \ :bcf_idx_init, [HtsFile, BcfHdr, :int, :string], :int |
#bcf_idx_save([HtsFile]) ⇒ int
Returns the return value of attach_function.
449 450 451 452 |
# File 'lib/hts/libhts/vcf.rb', line 449 attach_function \ :bcf_idx_save, [HtsFile], :int |
#bcf_index_build(string) ⇒ int
Returns the return value of attach_function.
429 430 431 432 |
# File 'lib/hts/libhts/vcf.rb', line 429 attach_function \ :bcf_index_build, %i[string int], :int |
#bcf_index_build2(string) ⇒ int
Returns the return value of attach_function.
434 435 436 437 |
# File 'lib/hts/libhts/vcf.rb', line 434 attach_function \ :bcf_index_build2, %i[string string int], :int |
#bcf_index_build3(string) ⇒ int
Returns the return value of attach_function.
439 440 441 442 |
# File 'lib/hts/libhts/vcf.rb', line 439 attach_function \ :bcf_index_build3, %i[string string int int], :int |
#bcf_index_load2(string) ⇒ by_ref
Returns the return value of attach_function.
419 420 421 422 |
# File 'lib/hts/libhts/vcf.rb', line 419 attach_function \ :bcf_index_load2, %i[string string], HtsIdx.by_ref |
#bcf_index_load3(string) ⇒ by_ref
Returns the return value of attach_function.
424 425 426 427 |
# File 'lib/hts/libhts/vcf.rb', line 424 attach_function \ :bcf_index_load3, %i[string string int], HtsIdx.by_ref |
#bcf_init([]) ⇒ by_ref
Returns the return value of attach_function.
15 16 17 18 |
# File 'lib/hts/libhts/vcf.rb', line 15 attach_function \ :bcf_init, [], Bcf1.by_ref |
#bcf_is_snp([Bcf1]) ⇒ int
Returns the return value of attach_function.
294 295 296 297 |
# File 'lib/hts/libhts/vcf.rb', line 294 attach_function \ :bcf_is_snp, [Bcf1], :int |
#bcf_read([HtsFile, BcfHdr, Bcf1]) ⇒ int
Returns the return value of attach_function.
70 71 72 73 |
# File 'lib/hts/libhts/vcf.rb', line 70 attach_function \ :bcf_read, [HtsFile, BcfHdr, Bcf1], :int |
#bcf_readrec(pointer) ⇒ int
Returns the return value of attach_function.
115 116 117 118 |
# File 'lib/hts/libhts/vcf.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.
309 310 311 312 |
# File 'lib/hts/libhts/vcf.rb', line 309 attach_function \ :bcf_remove_filter, [BcfHdr, Bcf1, :int, :int], :int |
#bcf_subset(int) ⇒ int
Returns the return value of attach_function.
259 260 261 262 |
# File 'lib/hts/libhts/vcf.rb', line 259 attach_function \ :bcf_subset, [BcfHdr, Bcf1, :int, :pointer], :int |
#bcf_subset_format([BcfHdr, Bcf1]) ⇒ int
Returns the return value of attach_function.
45 46 47 48 |
# File 'lib/hts/libhts/vcf.rb', line 45 attach_function \ :bcf_subset_format, [BcfHdr, Bcf1], :int |
#bcf_translate([BcfHdr, BcfHdr, Bcf1]) ⇒ int
Returns the return value of attach_function.
264 265 266 267 |
# File 'lib/hts/libhts/vcf.rb', line 264 attach_function \ :bcf_translate, [BcfHdr, BcfHdr, Bcf1], :int |
#bcf_unpack(int) ⇒ int
Returns the return value of attach_function.
75 76 77 78 |
# File 'lib/hts/libhts/vcf.rb', line 75 attach_function \ :bcf_unpack, [Bcf1, :int], :int |
#bcf_update_alleles(pointer) ⇒ int
Returns the return value of attach_function.
319 320 321 322 |
# File 'lib/hts/libhts/vcf.rb', line 319 attach_function \ :bcf_update_alleles, [BcfHdr, Bcf1, :pointer, :int], :int |
#bcf_update_alleles_str(string) ⇒ int
Returns the return value of attach_function.
324 325 326 327 |
# File 'lib/hts/libhts/vcf.rb', line 324 attach_function \ :bcf_update_alleles_str, [BcfHdr, Bcf1, :string], :int |
#bcf_update_filter(pointer) ⇒ int
Returns the return value of attach_function.
299 300 301 302 |
# File 'lib/hts/libhts/vcf.rb', line 299 attach_function \ :bcf_update_filter, [BcfHdr, Bcf1, :pointer, :int], :int |
#bcf_update_format(string) ⇒ int
Returns the return value of attach_function.
349 350 351 352 |
# File 'lib/hts/libhts/vcf.rb', line 349 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.
344 345 346 347 |
# File 'lib/hts/libhts/vcf.rb', line 344 attach_function \ :bcf_update_format_string, [BcfHdr, Bcf1, :string, :pointer, :int], :int |
#bcf_update_id(string) ⇒ int
Returns the return value of attach_function.
329 330 331 332 |
# File 'lib/hts/libhts/vcf.rb', line 329 attach_function \ :bcf_update_id, [BcfHdr, Bcf1, :string], :int |
#bcf_update_info(string) ⇒ int
Returns the return value of attach_function.
339 340 341 342 |
# File 'lib/hts/libhts/vcf.rb', line 339 attach_function \ :bcf_update_info, [BcfHdr, Bcf1, :string, :pointer, :int, :int], :int |
#bcf_variant_length(int) ⇒ int
Returns the return value of attach_function.
289 290 291 292 |
# File 'lib/hts/libhts/vcf.rb', line 289 attach_function \ :bcf_variant_length, [Bcf1, :int], :int |
#bcf_write([HtsFile, BcfHdr, Bcf1]) ⇒ int
Returns the return value of attach_function.
90 91 92 93 |
# File 'lib/hts/libhts/vcf.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.
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
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.
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.
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
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.
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.
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
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()
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()
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.
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.
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
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
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
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
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
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)
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.
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.
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.
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.
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.
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.
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.
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.
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
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
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).
38 39 40 41 |
# File 'lib/hts/libhts/bgzf.rb', line 38 attach_function \ :bgzf_write, [BGZF, :pointer, :size_t], :ssize_t |
#cram_block_append(cram_block) ⇒ int
Returns the return value of attach_function.
140 141 142 143 |
# File 'lib/hts/libhts/cram.rb', line 140 attach_function \ :cram_block_append, %i[cram_block pointer int], :int |
#cram_block_get_comp_size(cram_block) ⇒ int32
Returns the return value of attach_function.
90 91 92 93 |
# File 'lib/hts/libhts/cram.rb', line 90 attach_function \ :cram_block_get_comp_size, [:cram_block], :int32 |
#cram_block_get_content_id(cram_block) ⇒ int32
Returns the return value of attach_function.
85 86 87 88 |
# File 'lib/hts/libhts/cram.rb', line 85 attach_function \ :cram_block_get_content_id, [:cram_block], :int32 |
#cram_block_get_content_type(cram_block) ⇒ CramContentType
Returns the return value of attach_function.
110 111 112 113 |
# File 'lib/hts/libhts/cram.rb', line 110 attach_function \ :cram_block_get_content_type, [:cram_block], CramContentType |
#cram_block_get_crc32(cram_block) ⇒ int32
Returns the return value of attach_function.
100 101 102 103 |
# File 'lib/hts/libhts/cram.rb', line 100 attach_function \ :cram_block_get_crc32, [:cram_block], :int32 |
#cram_block_get_data(cram_block) ⇒ pointer
Returns the return value of attach_function.
105 106 107 108 |
# File 'lib/hts/libhts/cram.rb', line 105 attach_function \ :cram_block_get_data, [:cram_block], :pointer |
#cram_block_get_offset(cram_block) ⇒ size_t
Returns the return value of attach_function.
150 151 152 153 |
# File 'lib/hts/libhts/cram.rb', line 150 attach_function \ :cram_block_get_offset, [:cram_block], :size_t |
#cram_block_get_uncomp_size(cram_block) ⇒ int32
Returns the return value of attach_function.
95 96 97 98 |
# File 'lib/hts/libhts/cram.rb', line 95 attach_function \ :cram_block_get_uncomp_size, [:cram_block], :int32 |
#cram_block_set_comp_size(cram_block) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
120 121 122 123 |
# File 'lib/hts/libhts/cram.rb', line 120 attach_function \ :cram_block_set_comp_size, %i[cram_block int32], :void |
#cram_block_set_content_id(cram_block) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
115 116 117 118 |
# File 'lib/hts/libhts/cram.rb', line 115 attach_function \ :cram_block_set_content_id, %i[cram_block int32], :void |
#cram_block_set_crc32(cram_block) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
130 131 132 133 |
# File 'lib/hts/libhts/cram.rb', line 130 attach_function \ :cram_block_set_crc32, %i[cram_block int32], :void |
#cram_block_set_data(cram_block) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
135 136 137 138 |
# File 'lib/hts/libhts/cram.rb', line 135 attach_function \ :cram_block_set_data, %i[cram_block pointer], :void |
#cram_block_set_offset(cram_block) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
155 156 157 158 |
# File 'lib/hts/libhts/cram.rb', line 155 attach_function \ :cram_block_set_offset, %i[cram_block size_t], :void |
#cram_block_set_uncomp_size(cram_block) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
125 126 127 128 |
# File 'lib/hts/libhts/cram.rb', line 125 attach_function \ :cram_block_set_uncomp_size, %i[cram_block int32], :void |
#cram_block_size(cram_block) ⇒ uint32
Returns the return value of attach_function.
160 161 162 163 |
# File 'lib/hts/libhts/cram.rb', line 160 attach_function \ :cram_block_size, [:cram_block], :uint32 |
#cram_block_update_size(cram_block) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
145 146 147 148 |
# File 'lib/hts/libhts/cram.rb', line 145 attach_function \ :cram_block_update_size, [:cram_block], :void |
#cram_check_EOF(cram_fd) ⇒ int
Returns the return value of attach_function.
310 311 312 313 |
# File 'lib/hts/libhts/cram.rb', line 310 attach_function \ :cram_check_EOF, [:cram_fd], :int |
#cram_close(cram_fd) ⇒ int
Returns the return value of attach_function.
275 276 277 278 |
# File 'lib/hts/libhts/cram.rb', line 275 attach_function \ :cram_close, [:cram_fd], :int |
#cram_compress_block(cram_fd) ⇒ int
Returns the return value of attach_function.
225 226 227 228 |
# File 'lib/hts/libhts/cram.rb', line 225 attach_function \ :cram_compress_block, %i[cram_fd cram_block cram_metrics int int], :int |
#cram_container_get_landmarks(cram_container) ⇒ pointer
Returns the return value of attach_function.
70 71 72 73 |
# File 'lib/hts/libhts/cram.rb', line 70 attach_function \ :cram_container_get_landmarks, %i[cram_container int32], :pointer |
#cram_container_get_length(cram_container) ⇒ int32
Returns the return value of attach_function.
50 51 52 53 |
# File 'lib/hts/libhts/cram.rb', line 50 attach_function \ :cram_container_get_length, [:cram_container], :int32 |
#cram_container_get_num_blocks(cram_container) ⇒ int32
Returns the return value of attach_function.
60 61 62 63 |
# File 'lib/hts/libhts/cram.rb', line 60 attach_function \ :cram_container_get_num_blocks, [:cram_container], :int32 |
#cram_container_is_empty(cram_fd) ⇒ int
Returns the return value of attach_function.
80 81 82 83 |
# File 'lib/hts/libhts/cram.rb', line 80 attach_function \ :cram_container_is_empty, [:cram_fd], :int |
#cram_container_set_landmarks(cram_container) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
75 76 77 78 |
# File 'lib/hts/libhts/cram.rb', line 75 attach_function \ :cram_container_set_landmarks, %i[cram_container int32 pointer], :void |
#cram_container_set_length(cram_container) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
55 56 57 58 |
# File 'lib/hts/libhts/cram.rb', line 55 attach_function \ :cram_container_set_length, %i[cram_container int32], :void |
#cram_container_set_num_blocks(cram_container) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
65 66 67 68 |
# File 'lib/hts/libhts/cram.rb', line 65 attach_function \ :cram_container_set_num_blocks, %i[cram_container int32], :void |
#cram_container_size(cram_container) ⇒ int
Returns the return value of attach_function.
260 261 262 263 |
# File 'lib/hts/libhts/cram.rb', line 260 attach_function \ :cram_container_size, [:cram_container], :int |
#cram_copy_slice(cram_fd) ⇒ int
Returns the return value of attach_function.
170 171 172 173 |
# File 'lib/hts/libhts/cram.rb', line 170 attach_function \ :cram_copy_slice, %i[cram_fd cram_fd int32], :int |
#cram_decode_slice_header(pointer) ⇒ pointer
Returns the return value of attach_function.
190 191 192 193 |
# File 'lib/hts/libhts/cram.rb', line 190 attach_function \ :cram_decode_slice_header, %i[pointer pointer], :pointer |
#cram_dopen(pointer) ⇒ cram_fd
Returns the return value of attach_function.
270 271 272 273 |
# File 'lib/hts/libhts/cram.rb', line 270 attach_function \ :cram_dopen, %i[pointer string string], :cram_fd |
#cram_eof(cram_fd) ⇒ int
Returns the return value of attach_function.
290 291 292 293 |
# File 'lib/hts/libhts/cram.rb', line 290 attach_function \ :cram_eof, [:cram_fd], :int |
#cram_fd_get_fp(cram_fd) ⇒ by_ref
Returns the return value of attach_function.
40 41 42 43 |
# File 'lib/hts/libhts/cram.rb', line 40 attach_function \ :cram_fd_get_fp, [:cram_fd], HFile.by_ref |
#cram_fd_get_header(cram_fd) ⇒ by_ref
Returns the return value of attach_function.
10 11 12 13 |
# File 'lib/hts/libhts/cram.rb', line 10 attach_function \ :cram_fd_get_header, [:cram_fd], SamHdr.by_ref |
#cram_fd_get_version(cram_fd) ⇒ int
Returns the return value of attach_function.
20 21 22 23 |
# File 'lib/hts/libhts/cram.rb', line 20 attach_function \ :cram_fd_get_version, [:cram_fd], :int |
#cram_fd_set_fp(cram_fd) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
45 46 47 48 |
# File 'lib/hts/libhts/cram.rb', line 45 attach_function \ :cram_fd_set_fp, [:cram_fd, HFile], :void |
#cram_fd_set_header(cram_fd) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
15 16 17 18 |
# File 'lib/hts/libhts/cram.rb', line 15 attach_function \ :cram_fd_set_header, [:cram_fd, SamHdr.by_ref], :void |
#cram_fd_set_version(cram_fd) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
25 26 27 28 |
# File 'lib/hts/libhts/cram.rb', line 25 attach_function \ :cram_fd_set_version, %i[cram_fd int], :void |
#cram_flush(cram_fd) ⇒ int
Returns the return value of attach_function.
285 286 287 288 |
# File 'lib/hts/libhts/cram.rb', line 285 attach_function \ :cram_flush, [:cram_fd], :int |
#cram_free_block(cram_block) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
215 216 217 218 |
# File 'lib/hts/libhts/cram.rb', line 215 attach_function \ :cram_free_block, [:cram_block], :void |
#cram_free_container(cram_container) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
240 241 242 243 |
# File 'lib/hts/libhts/cram.rb', line 240 attach_function \ :cram_free_container, [:cram_container], :void |
#cram_free_slice_header(pointer) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
195 196 197 198 |
# File 'lib/hts/libhts/cram.rb', line 195 attach_function \ :cram_free_slice_header, [:pointer], :void |
#cram_get_refs(by_ref) ⇒ pointer
Returns the return value of attach_function.
320 321 322 323 |
# File 'lib/hts/libhts/cram.rb', line 320 attach_function \ :cram_get_refs, [HtsFile.by_ref], :pointer |
#cram_major_vers(cram_fd) ⇒ int
Returns the return value of attach_function.
30 31 32 33 |
# File 'lib/hts/libhts/cram.rb', line 30 attach_function \ :cram_major_vers, [:cram_fd], :int |
#cram_minor_vers(cram_fd) ⇒ int
Returns the return value of attach_function.
35 36 37 38 |
# File 'lib/hts/libhts/cram.rb', line 35 attach_function \ :cram_minor_vers, [:cram_fd], :int |
#cram_new_block(int) ⇒ cram_block
Returns the return value of attach_function.
200 201 202 203 |
# File 'lib/hts/libhts/cram.rb', line 200 attach_function \ :cram_new_block, [CramContentType, :int], :cram_block |
#cram_new_container(int) ⇒ cram_container
attach_function \
:cram_compress_block2,
%i[cram_fd cram_slice cram_block cram_metrics int int],
:int
235 236 237 238 |
# File 'lib/hts/libhts/cram.rb', line 235 attach_function \ :cram_new_container, %i[int int], :cram_container |
#cram_open(string) ⇒ cram_fd
Returns the return value of attach_function.
265 266 267 268 |
# File 'lib/hts/libhts/cram.rb', line 265 attach_function \ :cram_open, %i[string string], :cram_fd |
#cram_read_block(cram_fd) ⇒ cram_block
Returns the return value of attach_function.
205 206 207 208 |
# File 'lib/hts/libhts/cram.rb', line 205 attach_function \ :cram_read_block, [:cram_fd], :cram_block |
#cram_read_container(cram_fd) ⇒ cram_container
Returns the return value of attach_function.
245 246 247 248 |
# File 'lib/hts/libhts/cram.rb', line 245 attach_function \ :cram_read_container, [:cram_fd], :cram_container |
#cram_seek(pointer) ⇒ int
Returns the return value of attach_function.
280 281 282 283 |
# File 'lib/hts/libhts/cram.rb', line 280 attach_function \ :cram_seek, %i[pointer off_t int], :int |
#cram_set_header(cram_fd) ⇒ int
Returns the return value of attach_function.
305 306 307 308 |
# File 'lib/hts/libhts/cram.rb', line 305 attach_function \ :cram_set_header, [:cram_fd, SamHdr.by_ref], :int |
#cram_set_option(cram_fd) ⇒ int
Returns the return value of attach_function.
295 296 297 298 |
# File 'lib/hts/libhts/cram.rb', line 295 attach_function \ :cram_set_option, [:cram_fd, HtsFmtOption, :varargs], :int |
#cram_set_voption(cram_fd) ⇒ int
Returns the return value of attach_function.
300 301 302 303 |
# File 'lib/hts/libhts/cram.rb', line 300 attach_function \ :cram_set_voption, [:cram_fd, HtsFmtOption, :pointer], # va_list :int |
#cram_slice_hdr_get_coords(pointer) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
185 186 187 188 |
# File 'lib/hts/libhts/cram.rb', line 185 attach_function \ :cram_slice_hdr_get_coords, %i[pointer pointer pointer pointer], :void |
#cram_slice_hdr_get_embed_ref_id(pointer) ⇒ int
Returns the return value of attach_function.
180 181 182 183 |
# File 'lib/hts/libhts/cram.rb', line 180 attach_function \ :cram_slice_hdr_get_embed_ref_id, [:pointer], :int |
#cram_slice_hdr_get_num_blocks(pointer) ⇒ int32
Returns the return value of attach_function.
175 176 177 178 |
# File 'lib/hts/libhts/cram.rb', line 175 attach_function \ :cram_slice_hdr_get_num_blocks, [:pointer], :int32 |
#cram_store_container(cram_fd) ⇒ int
Returns the return value of attach_function.
255 256 257 258 |
# File 'lib/hts/libhts/cram.rb', line 255 attach_function \ :cram_store_container, %i[cram_fd cram_container string pointer], :int |
#cram_transcode_rg(cram_fd) ⇒ int
Returns the return value of attach_function.
165 166 167 168 |
# File 'lib/hts/libhts/cram.rb', line 165 attach_function \ :cram_transcode_rg, %i[cram_fd cram_fd cram_container int pointer pointer], :int |
#cram_uncompress_block(cram_block) ⇒ int
Returns the return value of attach_function.
220 221 222 223 |
# File 'lib/hts/libhts/cram.rb', line 220 attach_function \ :cram_uncompress_block, [:cram_block], :int |
#cram_write_block(cram_fd) ⇒ int
Returns the return value of attach_function.
210 211 212 213 |
# File 'lib/hts/libhts/cram.rb', line 210 attach_function \ :cram_write_block, %i[cram_fd cram_block], :int |
#cram_write_container(cram_fd) ⇒ int
Returns the return value of attach_function.
250 251 252 253 |
# File 'lib/hts/libhts/cram.rb', line 250 attach_function \ :cram_write_container, %i[cram_fd cram_container], :int |
#errmod_cal(pointer) ⇒ int
Returns the return value of attach_function.
424 425 426 427 |
# File 'lib/hts/libhts/hts.rb', line 424 attach_function \ :errmod_cal, %i[pointer int int pointer pointer], :int |
#errmod_destroy(pointer) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
419 420 421 422 |
# File 'lib/hts/libhts/hts.rb', line 419 attach_function \ :errmod_destroy, [:pointer], :void |
#errmod_init(double) ⇒ pointer
Deprecated Convenience function to determine file type attach_function \
:hts_file_type,
[:string],
:int
414 415 416 417 |
# File 'lib/hts/libhts/hts.rb', line 414 attach_function \ :errmod_init, [:double], :pointer |
#fai_build(string) ⇒ int
Build index for a FASTA or FASTQ or bgzip-compressed FASTA or FASTQ file.
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.
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
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
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
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.
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”.
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.
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.
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”.
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
12 13 14 15 |
# File 'lib/hts/libhts/hfile.rb', line 12 attach_function \ :hdopen, %i[int string], HFile.by_ref |
#hfile_has_plugin(string) ⇒ int
Tests for the presence of a specific hFILE plugin.
104 105 106 107 |
# File 'lib/hts/libhts/hfile.rb', line 104 attach_function \ :hfile_has_plugin, [:string], :int |
#hfile_list_plugins(pointer) ⇒ int
Fills out plist[] with the list of known hFILE plugins.
98 99 100 101 |
# File 'lib/hts/libhts/hfile.rb', line 98 attach_function \ :hfile_list_plugins, %i[pointer pointer], # mutable string :int |
#hfile_list_schemes(string) ⇒ int
Fills out sc_list[] with the list of known URL schemes.
92 93 94 95 |
# File 'lib/hts/libhts/hfile.rb', line 92 attach_function \ :hfile_list_schemes, %i[string pointer pointer], # mutable string :int |
#hfile_mem_get_buffer(pointer) ⇒ string
For hfile_mem: get the internal buffer and it’s size from a hfile
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.
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
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
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
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
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
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
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.
249 250 251 252 |
# File 'lib/hts/libhts/vcf.rb', line 249 attach_function \ :hrec_add_idx, [BcfHrec, :int], :int |
#hseek(off_t) ⇒ off_t
Reposition the read/write stream offset
42 43 44 45 |
# File 'lib/hts/libhts/hfile.rb', line 42 attach_function \ :hseek, [HFile, :off_t, :int], :off_t |
#hts_base_mod_state_alloc([]) ⇒ pointer
Allocates an hts_base_mode_state.
654 655 656 657 |
# File 'lib/hts/libhts/sam.rb', line 654 attach_function \ :hts_base_mod_state_alloc, [], :pointer |
#hts_base_mod_state_free(pointer) ⇒ void
This method returns an undefined value.
Destroys an hts_base_mode_state.
660 661 662 663 |
# File 'lib/hts/libhts/sam.rb', line 660 attach_function \ :hts_base_mod_state_free, [:pointer], # hts_base_mod_state :void |
#hts_check_EOF([HtsFile]) ⇒ int
Determine whether a given htsFile contains a valid EOF block
199 200 201 202 |
# File 'lib/hts/libhts/hts.rb', line 199 attach_function \ :hts_check_EOF, [HtsFile], :int |
#hts_close([HtsFile]) ⇒ int
Close a file handle, flushing buffered data for output streams
128 129 130 131 |
# File 'lib/hts/libhts/hts.rb', line 128 attach_function \ :hts_close, [HtsFile], :int |
#hts_detect_format([HFile, HtsFormat]) ⇒ int
Determine format by peeking at the start of a file
85 86 87 88 |
# File 'lib/hts/libhts/hts.rb', line 85 attach_function \ :hts_detect_format, [HFile, HtsFormat], :int |
#hts_detect_format2(string) ⇒ int
Determine format primarily by peeking at the start of a file
91 92 93 94 |
# File 'lib/hts/libhts/hts.rb', line 91 attach_function \ :hts_detect_format2, [HFile, :string, HtsFormat], :int |
#hts_feature_string([]) ⇒ string
Introspection on the features enabled in htslib, string form
79 80 81 82 |
# File 'lib/hts/libhts/hts.rb', line 79 attach_function \ :hts_feature_string, [], :string |
#hts_features([]) ⇒ uint
Introspection on the features enabled in htslib
68 69 70 71 |
# File 'lib/hts/libhts/hts.rb', line 68 attach_function \ :hts_features, [], :uint |
#hts_flush([HtsFile]) ⇒ int Also known as: bcf_flush, vcf_flush
For output streams, flush any buffered data
122 123 124 125 |
# File 'lib/hts/libhts/hts.rb', line 122 attach_function \ :hts_flush, [HtsFile], :int |
#hts_format_description([HtsFormat]) ⇒ string
Get a human-readable description of the file format
97 98 99 100 |
# File 'lib/hts/libhts/hts.rb', line 97 attach_function \ :hts_format_description, [HtsFormat], :string |
#hts_format_file_extension([HtsFormat]) ⇒ string
Returns a string containing the file format extension.
140 141 142 143 |
# File 'lib/hts/libhts/hts.rb', line 140 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.
26 27 28 29 |
# File 'lib/hts/libhts/hts.rb', line 26 attach_function \ :hts_free, [:pointer], :void |
#hts_get_bgzfp([HtsFile]) ⇒ by_ref
Internal helper function used by tbx_itr_next()
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
134 135 136 137 |
# File 'lib/hts/libhts/hts.rb', line 134 attach_function \ :hts_get_format, [HtsFile], HtsFormat.by_ref |
#hts_get_log_level([]) ⇒ HtsLogLevel
Gets the selected log level.
16 17 18 19 |
# File 'lib/hts/libhts/hts.rb', line 16 attach_function \ :hts_get_log_level, [], HtsLogLevel |
#hts_getline(int) ⇒ int
Read a line (and its n or rn terminator) from a file
152 153 154 155 |
# File 'lib/hts/libhts/hts.rb', line 152 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
116 117 118 119 |
# File 'lib/hts/libhts/hts.rb', line 116 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
219 220 221 222 |
# File 'lib/hts/libhts/hts.rb', line 219 attach_function \ :hts_idx_destroy, [HtsIdx], :void |
#hts_idx_finish(uint64) ⇒ int
Finish building an index
231 232 233 234 |
# File 'lib/hts/libhts/hts.rb', line 231 attach_function \ :hts_idx_finish, [HtsIdx, :uint64], :int |
#hts_idx_fmt([HtsIdx]) ⇒ int
Returns index format
237 238 239 240 |
# File 'lib/hts/libhts/hts.rb', line 237 attach_function \ :hts_idx_fmt, [HtsIdx], :int |
#hts_idx_get_meta(pointer) ⇒ uint8
Get extra index meta-data
279 280 281 282 |
# File 'lib/hts/libhts/hts.rb', line 279 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
297 298 299 300 |
# File 'lib/hts/libhts/hts.rb', line 297 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
291 292 293 294 |
# File 'lib/hts/libhts/hts.rb', line 291 attach_function \ :hts_idx_get_stat, [HtsIdx, :int, :pointer, :pointer], :int |
#hts_idx_init(int) ⇒ pointer
Create a BAI/CSI/TBI type index structure
213 214 215 216 |
# File 'lib/hts/libhts/hts.rb', line 213 attach_function \ :hts_idx_init, %i[int int uint64 int int], :pointer |
#hts_idx_load(string) ⇒ by_ref
Load an index file
261 262 263 264 |
# File 'lib/hts/libhts/hts.rb', line 261 attach_function \ :hts_idx_load, %i[string int], HtsIdx.by_ref |
#hts_idx_load2(string) ⇒ by_ref
Load a specific index file
267 268 269 270 |
# File 'lib/hts/libhts/hts.rb', line 267 attach_function \ :hts_idx_load2, %i[string string], HtsIdx.by_ref |
#hts_idx_load3(string) ⇒ by_ref
Load a specific index file
273 274 275 276 |
# File 'lib/hts/libhts/hts.rb', line 273 attach_function \ :hts_idx_load3, %i[string string int int], HtsIdx.by_ref |
#hts_idx_nseq([HtsIdx]) ⇒ int
Return the number of targets from an index
309 310 311 312 |
# File 'lib/hts/libhts/hts.rb', line 309 attach_function \ :hts_idx_nseq, [HtsIdx], :int |
#hts_idx_push(int) ⇒ int
Push an index entry
225 226 227 228 |
# File 'lib/hts/libhts/hts.rb', line 225 attach_function \ :hts_idx_push, [HtsIdx, :int, :int64, :int64, :uint64, :int], :int |
#hts_idx_save(string) ⇒ int
Save an index to a file
249 250 251 252 |
# File 'lib/hts/libhts/hts.rb', line 249 attach_function \ :hts_idx_save, [HtsIdx, :string, :int], :int |
#hts_idx_save_as(string) ⇒ int
Save an index to a specific file
255 256 257 258 |
# File 'lib/hts/libhts/hts.rb', line 255 attach_function \ :hts_idx_save_as, [HtsIdx, :string, :string, :int], :int |
#hts_idx_seqnames(pointer) ⇒ pointer
Return a list of target names from an index
303 304 305 306 |
# File 'lib/hts/libhts/hts.rb', line 303 attach_function \ :hts_idx_seqnames, [HtsIdx, :pointer, :pointer, :pointer], :pointer |
#hts_idx_set_meta(uint32) ⇒ int
Set extra index meta-data
285 286 287 288 |
# File 'lib/hts/libhts/hts.rb', line 285 attach_function \ :hts_idx_set_meta, [HtsIdx, :uint32, :pointer, :int], :int |
#hts_idx_tbi_name(int) ⇒ int
Add name to TBI index meta-data
243 244 245 246 |
# File 'lib/hts/libhts/hts.rb', line 243 attach_function \ :hts_idx_tbi_name, [HtsIdx, :int, :string], :int |
#hts_itr_destroy([HtsItr]) ⇒ void
This method returns an undefined value.
Free an iterator
347 348 349 350 |
# File 'lib/hts/libhts/hts.rb', line 347 attach_function \ :hts_itr_destroy, [HtsItr], :void |
#hts_itr_multi_bam([HtsIdx, HtsItr]) ⇒ int
Returns the return value of attach_function.
364 365 366 367 |
# File 'lib/hts/libhts/hts.rb', line 364 attach_function \ :hts_itr_multi_bam, [HtsIdx, HtsItr], :int |
#hts_itr_multi_cram([HtsIdx, HtsItr]) ⇒ int
Returns the return value of attach_function.
369 370 371 372 |
# File 'lib/hts/libhts/hts.rb', line 369 attach_function \ :hts_itr_multi_cram, [HtsIdx, HtsItr], :int |
#hts_itr_multi_next(pointer) ⇒ int
Return the next record from an iterator
390 391 392 393 |
# File 'lib/hts/libhts/hts.rb', line 390 attach_function \ :hts_itr_multi_next, [HtsFile, HtsItr, :pointer], :int |
#hts_itr_next(pointer) ⇒ int
Return the next record from an iterator
359 360 361 362 |
# File 'lib/hts/libhts/hts.rb', line 359 attach_function \ :hts_itr_next, [BGZF, HtsItr, :pointer, :pointer], :int |
#hts_itr_query(int) ⇒ by_ref
Create a single-region iterator
341 342 343 344 |
# File 'lib/hts/libhts/hts.rb', line 341 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
353 354 355 356 |
# File 'lib/hts/libhts/hts.rb', line 353 attach_function \ :hts_itr_querys, [HtsIdx, :string, :hts_name2id_f, :pointer, :pointer, :pointer], HtsItr.by_ref |
#hts_itr_regions(pointer) ⇒ by_ref
Create a multi-region iterator from a region list
375 376 377 378 379 380 381 382 383 384 385 386 387 |
# File 'lib/hts/libhts/hts.rb', line 375 attach_function \ :hts_itr_regions, [HtsIdx, :pointer, # hts_reglist_t * :int, :hts_name2id_f, :pointer, :pointer, # hts_itr_multi_query_func :pointer, # hts_readrec_func :pointer, # hts_seek_func :pointer # hts_tell_func ], HtsItr.by_ref |
#hts_lib_shutdown([]) ⇒ void
This method returns an undefined value.
Returns the return value of attach_function.
21 22 23 24 |
# File 'lib/hts/libhts/hts.rb', line 21 attach_function \ :hts_lib_shutdown, [], :void |
#hts_md5_destroy(pointer) ⇒ void
This method returns an undefined value.
Deallocates any memory allocated by hts_md5_init.
466 467 468 469 |
# File 'lib/hts/libhts/hts.rb', line 466 attach_function \ :hts_md5_destroy, [:pointer], :void |
#hts_md5_final(pointer) ⇒ void
This method returns an undefined value.
Computes the final 128-bit MD5 hash from the given context
448 449 450 451 |
# File 'lib/hts/libhts/hts.rb', line 448 attach_function \ :hts_md5_final, %i[pointer pointer], # unsinged char :void |
#hts_md5_hex(string) ⇒ void
This method returns an undefined value.
Converts a 128-bit MD5 hash into a 33-byte nul-termninated by string.
460 461 462 463 |
# File 'lib/hts/libhts/hts.rb', line 460 attach_function \ :hts_md5_hex, %i[string pointer], :void |
#hts_md5_init([]) ⇒ pointer
Initialises an MD5 context.
436 437 438 439 |
# File 'lib/hts/libhts/hts.rb', line 436 attach_function \ :hts_md5_init, [], :pointer |
#hts_md5_reset(pointer) ⇒ void
This method returns an undefined value.
Resets an md5_context to the initial state, as returned by hts_md5_init().
454 455 456 457 |
# File 'lib/hts/libhts/hts.rb', line 454 attach_function \ :hts_md5_reset, [:pointer], :void |
#hts_md5_update(pointer) ⇒ void
This method returns an undefined value.
Updates the context with the MD5 of the data.
442 443 444 445 |
# File 'lib/hts/libhts/hts.rb', line 442 attach_function \ :hts_md5_update, %i[pointer pointer ulong], :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
104 105 106 107 |
# File 'lib/hts/libhts/hts.rb', line 104 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
110 111 112 113 |
# File 'lib/hts/libhts/hts.rb', line 110 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.
32 33 34 35 |
# File 'lib/hts/libhts/hts.rb', line 32 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.
38 39 40 41 |
# File 'lib/hts/libhts/hts.rb', line 38 attach_function \ :hts_opt_apply, [HtsFile, HtsOpt], :int |
#hts_opt_free([HtsOpt]) ⇒ void
This method returns an undefined value.
Frees an hts_opt list.
44 45 46 47 |
# File 'lib/hts/libhts/hts.rb', line 44 attach_function \ :hts_opt_free, [HtsOpt], :void |
#hts_parse_decimal(string) ⇒ long_long
Parse a numeric string
315 316 317 318 |
# File 'lib/hts/libhts/hts.rb', line 315 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)
50 51 52 53 |
# File 'lib/hts/libhts/hts.rb', line 50 attach_function \ :hts_parse_format, [HtsFormat, :string], :int |
#hts_parse_opt_list(string) ⇒ int
Tokenise options as (key(=value)?,)*(key(=value)?)?
56 57 58 59 |
# File 'lib/hts/libhts/hts.rb', line 56 attach_function \ :hts_parse_opt_list, [HtsFormat, :string], :int |
#hts_parse_reg(string) ⇒ string
Parse a “CHR:START-END”-style region string
329 330 331 332 |
# File 'lib/hts/libhts/hts.rb', line 329 attach_function \ :hts_parse_reg, %i[string pointer pointer], :string |
#hts_parse_reg64(string) ⇒ string
Parse a “CHR:START-END”-style region string
323 324 325 326 |
# File 'lib/hts/libhts/hts.rb', line 323 attach_function \ :hts_parse_reg64, %i[string pointer pointer], :string |
#hts_parse_region(string) ⇒ string
Parse a “CHR:START-END”-style region string
335 336 337 338 |
# File 'lib/hts/libhts/hts.rb', line 335 attach_function \ :hts_parse_region, %i[string pointer pointer pointer hts_name2id_f pointer int], :string |
#hts_readlines(string) ⇒ pointer
Returns the return value of attach_function.
157 158 159 160 |
# File 'lib/hts/libhts/hts.rb', line 157 attach_function \ :hts_readlines, %i[string pointer], :pointer |
#hts_readlist(string) ⇒ pointer
Parse comma-separated list or read list from a file
163 164 165 166 |
# File 'lib/hts/libhts/hts.rb', line 163 attach_function \ :hts_readlist, %i[string int pointer], :pointer |
#hts_reglist_create(pointer) ⇒ by_ref
Create a region list from a char array
396 397 398 399 |
# File 'lib/hts/libhts/hts.rb', line 396 attach_function \ :hts_reglist_create, %i[pointer int pointer pointer hts_name2id_f], HtsReglist.by_ref |
#hts_reglist_free(int) ⇒ void
This method returns an undefined value.
Free a region list
402 403 404 405 |
# File 'lib/hts/libhts/hts.rb', line 402 attach_function \ :hts_reglist_free, [HtsReglist, :int], :void |
#hts_set_cache_size(int) ⇒ void
This method returns an undefined value.
Adds a cache of decompressed blocks, potentially speeding up seeks.
181 182 183 184 |
# File 'lib/hts/libhts/hts.rb', line 181 attach_function \ :hts_set_cache_size, [HtsFile, :int], :void |
#hts_set_fai_filename(string) ⇒ int
Set .fai filename for a file opened for reading
187 188 189 190 |
# File 'lib/hts/libhts/hts.rb', line 187 attach_function \ :hts_set_fai_filename, [HtsFile, :string], :int |
#hts_set_filter_expression(string) ⇒ int
Sets a filter expression
193 194 195 196 |
# File 'lib/hts/libhts/hts.rb', line 193 attach_function \ :hts_set_filter_expression, [HtsFile, :string], :int |
#hts_set_log_level([HtsLogLevel]) ⇒ void
This method returns an undefined value.
Sets the selected log level.
10 11 12 13 |
# File 'lib/hts/libhts/hts.rb', line 10 attach_function \ :hts_set_log_level, [HtsLogLevel], :void |
#hts_set_opt(varargs) ⇒ int
Sets a specified CRAM option on the open file handle.
146 147 148 149 |
# File 'lib/hts/libhts/hts.rb', line 146 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
175 176 177 178 |
# File 'lib/hts/libhts/hts.rb', line 175 attach_function \ :hts_set_thread_pool, [HtsFile, HtsTpool], :int |
#hts_set_threads(int) ⇒ int
Create extra threads to aid compress/decompression for this file
169 170 171 172 |
# File 'lib/hts/libhts/hts.rb', line 169 attach_function \ :hts_set_threads, [HtsFile, :int], :int |
#hts_test_feature(uint) ⇒ string
Returns the return value of attach_function.
73 74 75 76 |
# File 'lib/hts/libhts/hts.rb', line 73 attach_function \ :hts_test_feature, [:uint], :string |
#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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
62 63 64 65 |
# File 'lib/hts/libhts/hts.rb', line 62 attach_function \ :hts_version, [], :string |
#int32_put_blk(cram_block) ⇒ int
Returns the return value of attach_function.
315 316 317 318 |
# File 'lib/hts/libhts/cram.rb', line 315 attach_function \ :int32_put_blk, %i[cram_block int32_t], :int |
#kf_betai(double) ⇒ double
Returns 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
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.
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.
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
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.
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 |
#probaln_glocal(pointer) ⇒ int
Perform probabilistic banded glocal alignment
430 431 432 433 |
# File 'lib/hts/libhts/hts.rb', line 430 attach_function \ :probaln_glocal, %i[pointer int pointer int pointer pointer pointer pointer], :int |
#sam_cap_mapq(string) ⇒ int
Returns the return value of attach_function.
643 644 645 646 |
# File 'lib/hts/libhts/sam.rb', line 643 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.
420 421 422 423 |
# File 'lib/hts/libhts/sam.rb', line 420 attach_function \ :sam_format1, [SamHdr, Bam1, KString], :int |
#sam_hdr_add_line(string) ⇒ int
Adds a single line to an existing header.
78 79 80 81 |
# File 'lib/hts/libhts/sam.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.
72 73 74 75 |
# File 'lib/hts/libhts/sam.rb', line 72 attach_function \ :sam_hdr_add_lines, [SamHdr, :string, :size_t], :int |
#sam_hdr_add_pg(string) ⇒ int
Add an @PG line.
186 187 188 189 |
# File 'lib/hts/libhts/sam.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.
410 411 412 413 |
# File 'lib/hts/libhts/sam.rb', line 410 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
126 127 128 129 |
# File 'lib/hts/libhts/sam.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.rb', line 24 attach_function \ :sam_hdr_destroy, [SamHdr], :void |
#sam_hdr_dup([SamHdr]) ⇒ by_ref
Duplicate a header structure.
30 31 32 33 |
# File 'lib/hts/libhts/sam.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.
84 85 86 87 |
# File 'lib/hts/libhts/sam.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.
90 91 92 93 |
# File 'lib/hts/libhts/sam.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
144 145 146 147 |
# File 'lib/hts/libhts/sam.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
150 151 152 153 |
# File 'lib/hts/libhts/sam.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.rb', line 198 attach_function \ :sam_hdr_incr_ref, [SamHdr], :void |
#sam_hdr_init([]) ⇒ by_ref
Generates a new unpopulated header structure.
6 7 8 9 |
# File 'lib/hts/libhts/sam.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.
54 55 56 57 |
# File 'lib/hts/libhts/sam.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)
132 133 134 135 |
# File 'lib/hts/libhts/sam.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)
138 139 140 141 |
# File 'lib/hts/libhts/sam.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
162 163 164 165 |
# File 'lib/hts/libhts/sam.rb', line 162 attach_function \ :sam_hdr_name2tid, [SamHdr, :string], :int |
#sam_hdr_nref([SamHdr]) ⇒ int
Returns the number of references in the header.
66 67 68 69 |
# File 'lib/hts/libhts/sam.rb', line 66 attach_function \ :sam_hdr_nref, [SamHdr], :int |
#sam_hdr_parse(size_t) ⇒ by_ref
Create a header from existing text.
36 37 38 39 |
# File 'lib/hts/libhts/sam.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
180 181 182 183 |
# File 'lib/hts/libhts/sam.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.
42 43 44 45 |
# File 'lib/hts/libhts/sam.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
114 115 116 117 |
# File 'lib/hts/libhts/sam.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
96 97 98 99 |
# File 'lib/hts/libhts/sam.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
102 103 104 105 |
# File 'lib/hts/libhts/sam.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
120 121 122 123 |
# File 'lib/hts/libhts/sam.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.
156 157 158 159 |
# File 'lib/hts/libhts/sam.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.
60 61 62 63 |
# File 'lib/hts/libhts/sam.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
174 175 176 177 |
# File 'lib/hts/libhts/sam.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
168 169 170 171 |
# File 'lib/hts/libhts/sam.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.
108 109 110 111 |
# File 'lib/hts/libhts/sam.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.
48 49 50 51 |
# File 'lib/hts/libhts/sam.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 .
307 308 309 310 |
# File 'lib/hts/libhts/sam.rb', line 307 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.
313 314 315 316 |
# File 'lib/hts/libhts/sam.rb', line 313 attach_function \ :sam_idx_save, [HtsFile], :int |
#sam_index_build(string) ⇒ int
Generate and save an index file
337 338 339 340 |
# File 'lib/hts/libhts/sam.rb', line 337 attach_function \ :sam_index_build, %i[string int], :int |
#sam_index_build2(string) ⇒ int
Generate and save an index to a specific file
343 344 345 346 |
# File 'lib/hts/libhts/sam.rb', line 343 attach_function \ :sam_index_build2, %i[string string int], :int |
#sam_index_build3(string) ⇒ int
Generate and save an index to a specific file
349 350 351 352 |
# File 'lib/hts/libhts/sam.rb', line 349 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
319 320 321 322 |
# File 'lib/hts/libhts/sam.rb', line 319 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
325 326 327 328 |
# File 'lib/hts/libhts/sam.rb', line 325 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
331 332 333 334 |
# File 'lib/hts/libhts/sam.rb', line 331 attach_function \ :sam_index_load3, [HtsFile, :string, :string, :int], HtsIdx.by_ref |
#sam_itr_queryi(int) ⇒ by_ref
Create a BAM/CRAM iterator
355 356 357 358 |
# File 'lib/hts/libhts/sam.rb', line 355 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
361 362 363 364 |
# File 'lib/hts/libhts/sam.rb', line 361 attach_function \ :sam_itr_querys, [HtsIdx, SamHdr, :string], HtsItr.by_ref |
#sam_itr_regarray(pointer) ⇒ by_ref
Create a multi-region iterator
373 374 375 376 |
# File 'lib/hts/libhts/sam.rb', line 373 attach_function \ :sam_itr_regarray, [HtsIdx, SamHdr, :pointer, :uint], HtsItr.by_ref |
#sam_itr_regions(uint) ⇒ by_ref
Create a multi-region iterator
367 368 369 370 |
# File 'lib/hts/libhts/sam.rb', line 367 attach_function \ :sam_itr_regions, [HtsIdx, SamHdr, HtsReglist, :uint], HtsItr.by_ref |
#sam_open_mode(string) ⇒ int
macros (or alias) sam_open sam_open_format sam_close
399 400 401 402 |
# File 'lib/hts/libhts/sam.rb', line 399 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.
405 406 407 408 |
# File 'lib/hts/libhts/sam.rb', line 405 attach_function \ :sam_open_mode_opts, %i[string string string], :string |
#sam_parse1([KString, SamHdr, Bam1]) ⇒ int
Returns the return value of attach_function.
415 416 417 418 |
# File 'lib/hts/libhts/sam.rb', line 415 attach_function \ :sam_parse1, [KString, SamHdr, Bam1], :int |
#sam_parse_cigar(string) ⇒ ssize_t
Parse a CIGAR string into a uint32_t array
295 296 297 298 |
# File 'lib/hts/libhts/sam.rb', line 295 attach_function \ :sam_parse_cigar, %i[string pointer pointer pointer], :ssize_t |
#sam_parse_region(string) ⇒ string
Returns the return value of attach_function.
387 388 389 390 |
# File 'lib/hts/libhts/sam.rb', line 387 attach_function \ :sam_parse_region, [SamHdr, :string, :pointer, :pointer, :pointer, :int], :string |
#sam_passes_filter(pointer) ⇒ int
Checks whether a record passes an hts_filter.
438 439 440 441 |
# File 'lib/hts/libhts/sam.rb', line 438 attach_function \ :sam_passes_filter, [SamHdr, Bam1, :pointer], # hts_filter_t :int |
#sam_prob_realn(string) ⇒ int
Returns the return value of attach_function.
648 649 650 651 |
# File 'lib/hts/libhts/sam.rb', line 648 attach_function \ :sam_prob_realn, [Bam1, :string, :hts_pos_t, :int], :int |
#sam_read1([HtsFile, SamHdr, Bam1]) ⇒ int
Read a record from a file
426 427 428 429 |
# File 'lib/hts/libhts/sam.rb', line 426 attach_function \ :sam_read1, [HtsFile, SamHdr, Bam1], :int |
#sam_write1([HtsFile, SamHdr, Bam1]) ⇒ int
Write a record to a file
432 433 434 435 |
# File 'lib/hts/libhts/sam.rb', line 432 attach_function \ :sam_write1, [HtsFile, SamHdr, Bam1], :int |
#stringify_argv(int) ⇒ string
A function to help with construction of CL tags in @PG records.
192 193 194 195 |
# File 'lib/hts/libhts/sam.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
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.
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.
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.
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
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
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
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.
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.
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(pointer) ⇒ pointer
Returns the return value of attach_function.
60 61 62 63 |
# File 'lib/hts/libhts/tbx.rb', line 60 attach_function \ :tbx_seqnames, [Tbx, :pointer], :pointer |
#vcf_format([BcfHdr, Bcf1, KString]) ⇒ int
Returns the return value of attach_function.
65 66 67 68 |
# File 'lib/hts/libhts/vcf.rb', line 65 attach_function \ :vcf_format, [BcfHdr, Bcf1, KString], :int |
#vcf_hdr_read([HtsFile]) ⇒ by_ref
Returns the return value of attach_function.
95 96 97 98 |
# File 'lib/hts/libhts/vcf.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.
100 101 102 103 |
# File 'lib/hts/libhts/vcf.rb', line 100 attach_function \ :vcf_hdr_write, [HtsFile, BcfHdr], :int |
#vcf_open_mode(string) ⇒ int
Returns the return value of attach_function.
60 61 62 63 |
# File 'lib/hts/libhts/vcf.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.
55 56 57 58 |
# File 'lib/hts/libhts/vcf.rb', line 55 attach_function \ :vcf_parse, [KString, BcfHdr, Bcf1], :int |
#vcf_read([HtsFile, BcfHdr, Bcf1]) ⇒ int
Returns the return value of attach_function.
105 106 107 108 |
# File 'lib/hts/libhts/vcf.rb', line 105 attach_function \ :vcf_read, [HtsFile, BcfHdr, Bcf1], :int |