fasta_lake.inference.base#
fasta_lake.inference.base
#
Data structures for the inference engine.
Defines the input/output contracts for all inference strategies.
Each strategy function takes an InferenceInput and returns
an InferenceResult.
InferenceInput
dataclass
#
Pre-computed data passed to every inference strategy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pep2prot
|
dict[str, set[str]]
|
Peptide → set of protein IDs. |
required |
prot2pep
|
dict[str, set[str]]
|
Protein ID → set of peptides. |
required |
proteins
|
dict[str, str]
|
Protein ID → sequence (from stage 2 FASTA). |
required |
peptide_scores
|
dict[str, float]
|
Peptide → best de novo confidence score. Used for score-weighted tie-breaking in inference strategies (higher score = stronger evidence). If empty, strategies fall back to count-based tie-breaking. |
dict()
|
Source code in fasta_lake/inference/base.py
InferenceResult
dataclass
#
Output from an inference strategy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
selected_proteins
|
set[str]
|
Set of selected protein IDs. |
set()
|
stats
|
dict
|
Strategy-specific statistics. |
dict()
|