module Bio::MAF::KVHelpers
Binary record packing and unpacking. @api private
Constants
- CHROM_BIN_PREFIX_FMT
- KEY
- KEY_FMT
- KEY_SCAN_FMT
- VAL
- VAL_FMT
- VAL_IDX_OFFSET_FMT
- VAL_N_SEQ_FMT
- VAL_SPECIES_FMT
- VAL_TEXT_SIZE_FMT
Public Instance Methods
bin_start_prefix(chrom_id, bin)
click to toggle source
# File lib/bio/maf/index.rb, line 60 def bin_start_prefix(chrom_id, bin) [0xFF, chrom_id, bin].pack(CHROM_BIN_PREFIX_FMT) end
extract_index_offset(entry)
click to toggle source
# File lib/bio/maf/index.rb, line 48 def extract_index_offset(entry) entry[1].unpack(VAL_IDX_OFFSET_FMT) end
extract_n_sequences(entry)
click to toggle source
# File lib/bio/maf/index.rb, line 44 def extract_n_sequences(entry) entry[1].unpack(VAL_N_SEQ_FMT)[0] end
extract_species_vec(entry)
click to toggle source
# File lib/bio/maf/index.rb, line 40 def extract_species_vec(entry) entry[1].unpack(VAL_SPECIES_FMT)[0] end
extract_text_size(entry)
click to toggle source
# File lib/bio/maf/index.rb, line 52 def extract_text_size(entry) entry[1].unpack(VAL_TEXT_SIZE_FMT)[0] end
unpack_key(ks)
click to toggle source
# File lib/bio/maf/index.rb, line 56 def unpack_key(ks) ks.unpack(KEY_FMT) end