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
Sourcebuild_exact(gz_path : String, checkpoint_span : UInt64 = DEFAULT_CHECKPOINT_SPAN) : Index
Sourcebuild_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.
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)
Sourcenew(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.
read(path : String) : Index
SourceClass 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).
build_mphf_tables(records : Array(RawEntry), fingerprint_seed : UInt64) : Tuple(Mphf, Array(ExactSlot), Array(ExactOverflowEntry))
Sourcebuild_name_table(checkpoints : Array(CheckpointMeta), anchors : Array(SparseNameTableBuilder::Anchor)) : Array(NameEntry)
Sourcecheckpoint_for(checkpoints : Array(CheckpointMeta), out_offset : UInt64) : Int32
Sourcedefault_path(gz_path : String) : String
Sourceguard(name : String, seed : UInt64) : UInt8
Sourcelower_bound(size : Int32, &before_target : Int32 -> Bool) : Int32
Sourceorder_mode_label(mode : OrderMode) : String
SourceInstance methods
checkpoint(id : Int) : Zran::Checkpoint
Sourcecheckpoint_metas
Sourcecheckpoint_span
Sourcecheckpoint_span=(checkpoint_span : UInt64)
Sourcecheckpoint_window(id : Int) : Bytes
Sourceentries
Sourceexact?
Sourcefind_entries(query : String) : Array(Entry)
Sourcefind_exact_candidates(query : String) : Array(ExactCandidate)
Sourcefind_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.
fingerprint_algorithm
Sourcefingerprint_algorithm=(fingerprint_algorithm : HashAlgorithm)
Sourcefingerprint_seed
Sourcefingerprint_seed=(fingerprint_seed : UInt64)
Sourceformat_version
Sourceinput_names_sorted=(input_names_sorted : Bool)
Sourceinput_names_sorted?
Sourcemode
Sourcemode=(mode : IndexMode)
Sourcemphf
Sourcename_interval
Sourcename_interval=(name_interval : UInt32)
Sourcename_mode
Sourcename_mode=(name_mode : NameMode)
Sourcenames
Sourcenormalize_query(query : String) : String
Sourceorder_mode
Sourceorder_mode=(order_mode : OrderMode)
Sourceorder_mode_label
Sourceoverflows
Sourcerecord_count
Sourcerecord_count=(record_count : UInt64)
Sourceslots
Sourcesource_mtime
Sourcesource_mtime=(source_mtime : Int64)
Sourcesource_path
Sourcesource_path=(source_path : String)
Sourcesource_size
Sourcesource_size=(source_size : UInt64)
Sourcesparse?
Sourcestale_for?(gz_path : String) : Bool
Sourcewrite(path : String) : Nil
Source