class

Fqix::Index

Inherits Reference < Object

Constants

DEFAULT_CHECKPOINT_SPAN = (4_u64 * 1024_u64) * 1024_u64
DEFAULT_HASH_ALGORITHM = HashAlgorithm::Fnv1a64
DEFAULT_HASH_SEED = 0_u64
DEFAULT_MODE = IndexMode::Sparse
DEFAULT_NAME_INTERVAL = 1024_u32
DEFAULT_NAME_MODE = NameMode::FirstToken
DEFAULT_ORDER_MODE = OrderMode::Lexicographic
MAGIC = IndexFormat::MAGIC_V2
VERSION = IndexFormat::EXACT_VERSION

Constructors

build(gz_path : String, checkpoint_span : UInt64 = DEFAULT_CHECKPOINT_SPAN, mode : IndexMode = DEFAULT_MODE, name_interval : UInt32 = DEFAULT_NAME_INTERVAL, order_mode : OrderMode | Nil = nil) : Index
Source
build_exact(gz_path : String, checkpoint_span : UInt64 = DEFAULT_CHECKPOINT_SPAN) : Index
Source
build_sparse(gz_path : String, checkpoint_span : UInt64 = DEFAULT_CHECKPOINT_SPAN, name_interval : UInt32 = DEFAULT_NAME_INTERVAL, order_mode : OrderMode | Nil = nil) : Index

order_mode is the requested sparse read-name order; nil means auto — try each SparseNameTableBuilder::ORDER_CANDIDATES in precedence and persist the first one the FASTQ is monotonic under.

Source
new(source_path : String, source_size : UInt64, source_mtime : Int64, checkpoint_span : UInt64, mode : IndexMode, name_interval : UInt32, order_mode : OrderMode, fingerprint_algorithm : HashAlgorithm, fingerprint_seed : UInt64, name_mode : NameMode, record_count : UInt64, input_names_sorted : Bool, checkpoint_metas : Array(CheckpointMeta), names : Array(NameEntry), entries : Array(Entry), window_store : WindowStore, format_version : FormatVersion = VERSION, mphf : Mphf | Nil = nil, slots : Array(ExactSlot) = [] of ExactSlot, overflows : Array(ExactOverflowEntry) = [] of ExactOverflowEntry)
Source
new(source_path : String, source_size : UInt64, source_mtime : Int64, checkpoint_span : UInt64, fingerprint_algorithm : HashAlgorithm, fingerprint_seed : UInt64, name_mode : NameMode, record_count : UInt64, input_names_sorted : Bool, checkpoint_metas : Array(CheckpointMeta), entries : Array(Entry), window_store : WindowStore, format_version : FormatVersion = VERSION, mphf : Mphf | Nil = nil, slots : Array(ExactSlot) = [] of ExactSlot, overflows : Array(ExactOverflowEntry) = [] of ExactOverflowEntry)

Convenience constructor for tests and callers that directly build an exact v2.1 index object.

Source
read(path : String) : Index
Source

Class methods

build_entries(records : Array(RawEntry)) : Array(Entry)

v2.1 entry layout. Retained for reader-compatibility specs; this is not the production exact write path (build_exact uses build_mphf_tables).

Source
build_mphf_tables(records : Array(RawEntry), fingerprint_seed : UInt64) : Tuple(Mphf, Array(ExactSlot), Array(ExactOverflowEntry))
Source
build_name_table(checkpoints : Array(CheckpointMeta), anchors : Array(SparseNameTableBuilder::Anchor)) : Array(NameEntry)
Source
checkpoint_for(checkpoints : Array(CheckpointMeta), out_offset : UInt64) : Int32
Source
default_path(gz_path : String) : String
Source
guard(name : String, seed : UInt64) : UInt8
Source
lower_bound(size : Int32, &before_target : Int32 -> Bool) : Int32
Source
order_mode_label(mode : OrderMode) : String
Source

Instance methods

checkpoint(id : Int) : Zran::Checkpoint
Source
checkpoint_metas
Source
checkpoint_span
Source
checkpoint_span=(checkpoint_span : UInt64)
Source
checkpoint_window(id : Int) : Bytes
Source
entries
Source
exact?
Source
find_entries(query : String) : Array(Entry)
Source
find_exact_candidates(query : String) : Array(ExactCandidate)
Source
find_floor_name(query : String, normalized : Bool = false) : NameEntry | Nil

Returns the anchor to start scanning from for query: the last anchor ordering strictly before query. The first FASTQ record is always an anchor, so index 0 is a safe lower bound.

Source
fingerprint_algorithm
Source
fingerprint_algorithm=(fingerprint_algorithm : HashAlgorithm)
Source
fingerprint_seed
Source
fingerprint_seed=(fingerprint_seed : UInt64)
Source
format_version
Source
input_names_sorted=(input_names_sorted : Bool)
Source
input_names_sorted?
Source
mode
Source
mode=(mode : IndexMode)
Source
mphf
Source
name_interval
Source
name_interval=(name_interval : UInt32)
Source
name_mode
Source
name_mode=(name_mode : NameMode)
Source
names
Source
normalize_query(query : String) : String
Source
order_mode
Source
order_mode=(order_mode : OrderMode)
Source
order_mode_label
Source
overflows
Source
record_count
Source
record_count=(record_count : UInt64)
Source
slots
Source
source_mtime
Source
source_mtime=(source_mtime : Int64)
Source
source_path
Source
source_path=(source_path : String)
Source
source_size
Source
source_size=(source_size : UInt64)
Source
sparse?
Source
stale_for?(gz_path : String) : Bool
Source
write(path : String) : Nil
Source