mod table_io

module table_io

TSV table I/O for markers depth tables.

Functions

fn fast_parse_u16(bytes: &[u8]) -> u16

Fast integer parsing for non-negative integers (matching C++ fast_stoi). Saturates at u16::MAX instead of wrapping, to avoid silent corruption on high-depth tags (>65535 reads of one RAD marker in one individual).

Structs and Unions

struct TableHeader

Header information parsed from a markers depth table.

n_markers: u64

Total number of markers (from the comment line).

n_individuals: u16

Number of individuals (columns - 2: id and sequence).

columns: Vec<String>

All column names from the header line.

Implementations

impl TableHeader

Functions

fn from_file(path: &Path) -> io::Result<Self>

Parse the header from a markers depth table file. The file starts with an optional comment line #Number of markers : N followed by a tab-separated header line id\tsequence\tind1\t...\tindN.