Skip to main content

Module utils

Module utils 

Source
Expand description

Utility module: Common bioinformatics and string processing functions.

This module provides the AlignmentRecord abstraction and helper functions like reverse complementation and memory unit parsing.

Structs§

AlignmentRecord
Unified representation of one alignment record used by Scan1 and Scan2.

Constants§

MIN_BAM_SHARD_BYTES
Smallest compressed BAM shard size worth parallelizing.

Functions§

alignment_short_cs
Builds a minimap2-compatible short-form cs payload for one mapper alignment.
bam_shard_count
Chooses a safe BAM shard count for BGZF-parallel Scan1/Scan2 processing.
bsj1_path_for_output
Returns the merged Scan1 BSJ output path for one CLI prefix.
bsj2_path_for_output
Returns the basename used for Scan2 shard-local BSJ spill files.
bsj_is_summary_priority
Returns whether a BSJ row should participate in the Java-compatible summary.
bsj_path_for_output
Returns the final combined BSJ output path for one CLI prefix.
bsj_payload_start
Returns the first field index of the legacy BSJ payload.
clip_sequence_payload
Encodes only recoverable soft-clipped bases for segment-evidence sidecars.
fsj_path_for_output
Returns the basename used for FSJ shard-local spill files.
is_bsj_mate_label
Returns whether a field is the mate label used by the expanded BSJ protocol.
local_clip_evidence_lines
Adds pseudo-alignment rows for local clip evidence accepted with BSJ calls.
log_path_for_output
Returns the sidecar log path for one CLI prefix.
parse_cigar_ops_basic
Parses a SAM-like CIGAR into (length, op) pairs for sidecar formatting.
parse_mem_str
Parses memory strings like 2G, 512M, or 1024K into bytes.
part_path
Returns the temporary spill-file path for one shard-local intermediate.
perf_path_for_output
Returns the profiling report path for one CLI prefix.
result_path_for_output
Returns the final Summary output path for one CLI -o/--out prefix.
reverse_complement
Returns the reverse complement of a DNA sequence.
segments1_path_for_output
Returns the Scan1 segments-evidence sidecar path for one CLI prefix.
segments2_path_for_output
Returns the Scan2 segments-evidence sidecar path for one CLI prefix.
segments_non_bsj_path_for_output
Returns the Scan2 non-BSJ segments sidecar path for one CLI prefix.
trace_path_for_output
Returns the targeted read-trace path for one CLI prefix.