Expand description
Opening an input and reading it as batches of raw FASTA records.
Pipeline: the stored bytes are read once (files, FIFOs, <(…) and standard input alike) and
teed to a SHA-256 thread; the format is recognised from the first bytes (gzip/BGZF, bzip2,
Zstandard or plain text; unsupported formats, xz among them (D116), get an explicit error with
a hint); the decompressed
text has one UTF-8 byte-order mark and the blank lines before the first record removed
(UTF-16/32 is refused with an iconv hint); and seq_io splits it into records, which are
copied byte for byte into batches for the parallel normaliser. Every structural error stops
the run with the source and as much of the record, line and byte as applies.
Structs§
- Batch
Limits - Limits of the batches after the first.
- Batch
Reader - Splits the text into batches of records.
- Checksum
Job - The SHA-256 of the stored bytes, computed on its own thread.
- Opened
- An opened input, ready to be read as batches.
- RawBatch
- A batch of consecutive records sharing one buffer.
- RawRecord
- A record copied verbatim from the input:
>headerline and sequence lines.
Enums§
- Source
- Where an input comes from.
Constants§
- COMPRESSION_
EXTENSIONS - Extensions of the compressions DiMA reads (file dialogs offer them).
- FASTA_
EXTENSIONS - Extensions of FASTA alignments.
Functions§
- is_
descriptor_ alias truefor a path that names an open descriptor rather than a file:/dev/stdin,/dev/stdout,/dev/stderr,/dev/fd/N(process substitution,<(...)) and/proc/<pid>/fd/N. Its file name is a descriptor number chosen by the shell, so it names nothing (D45: such inputs are named like standard input).- open
- Opens
sourcefor reading. - query_
name_ from_ source - The query name implied by an input’s file name (D45): the file name without known
compression and FASTA extensions, or
Nonefor standard input or an empty stem. - sha256_
file - Reads a whole regular file’s checksum without parsing it (used by tests and by the GUI’s change detection).