fasta_lake.multi_omics.exact#
fasta_lake.multi_omics.exact
#
Strict sequence and TPM inputs for optional post-selection molecular unions.
Protein identity follows FastaLake hash version 5.3; peptide I/L equivalence is deliberately absent from protein hashing. No cluster representative substitution.
sha256
#
Hash file bytes in 8 MiB blocks and return the SHA-256 hex digest.
Source code in fasta_lake/multi_omics/exact.py
read_fasta
#
Return accession -> (full header, normalized sequence, SHA-256).
Source code in fasta_lake/multi_omics/exact.py
numeric
#
Parse a nonnegative finite TPM while preserving explicit missing tokens.
Blank, NA, N/A, null and none return None. NaN is missing only when requested. A missing TSV field, negative value or nonfinite number raises ValueError.
Source code in fasta_lake/multi_omics/exact.py
read_tpm
#
Read plain or gzipped gene TPM rows without converting missing values to zero.
Require unique prodigal_protein IDs and metaG_tpm/metaT_tpm columns. Return a gene-keyed dictionary with parsed dna/rna and original raw strings; malformed rows, duplicate genes and invalid numeric values raise ValueError.
Source code in fasta_lake/multi_omics/exact.py
top_cutoff
#
Top percentage among positive GENES; zero disables, ties all included.
Source code in fasta_lake/multi_omics/exact.py
write_table
#
Write dictionary rows as a TSV, using deterministic gzip for a .gz path.
The supplied field order defines the columns. Existing destination files are overwritten; callers enforce new output directories where required.
Source code in fasta_lake/multi_omics/exact.py
load_source
#
Load one explicitly specimen-qualified quantification reference.
Checksums and all-gene agreement detect changed/mismatched inputs. The provenance record must establish how the original quantification reference was linked to these proteins; the caller's specimen assertion is not inferred from filenames. A hash alone cannot establish biological specimen identity.
Source code in fasta_lake/multi_omics/exact.py
build_union
#
build_union(baseline, source_manifest, specimen, output, *, dna_percent=1.0, dna_absolute=None, rna_absolute=None, rounding='floor', rna_percent=0, background=None, metabolites=False)
Keep every baseline sequence and append independently selected molecular proteins.