pulsatrix 1.1.0
Loading...
Searching...
No Matches
proteingym.hpp
Go to the documentation of this file.
1
6#pragma once
7
8#include <string>
9#include <vector>
10
13
14namespace pulsatrix {
15
18 std::string id;
19 std::string filename;
20 std::string target_seq;
22 int64_t offset = 1;
23};
24
27[[nodiscard]] std::vector<ProteinGymAssay> ReadProteinGymReference(const std::string& path);
28
31 std::vector<std::string> mutants;
32 std::vector<double> scores;
33 std::vector<int> bins;
34};
35
37[[nodiscard]] DmsVariants ReadDmsVariants(const std::string& path);
38
41
44 std::string id;
45 int64_t length = 0;
48 std::vector<double> scores;
49 double seconds = 0;
50};
51
54[[nodiscard]] AssayResult EvaluateAssay(VariantScorer& scorer, const ProteinGymAssay& assay, const DmsVariants& variants,
56
57} // namespace pulsatrix
Scores variants with a masked language model and its tokenizer, the way ProteinGym scores ESM models....
Definition variant_scoring.hpp:77
ProteinGym's metrics for how well predicted variant scores track measured fitness (PLM-3),...
Definition acquisition_functions.hpp:16
AssayResult EvaluateAssay(VariantScorer &scorer, const ProteinGymAssay &assay, const DmsVariants &variants, VariantStrategy strategy=VariantStrategy::MaskedMarginals)
Scores every variant of assay and evaluates them against the measurements.
DmsVariants ReadDmsVariants(const std::string &path)
Reads an assay's CSV.
std::vector< ProteinGymAssay > ReadProteinGymReference(const std::string &path)
Every assay in a reference file.
VariantStrategy
How variants are scored.
Definition proteingym.hpp:40
One assay's result.
Definition proteingym.hpp:43
double seconds
Definition proteingym.hpp:49
std::string id
Definition proteingym.hpp:44
int64_t length
Definition proteingym.hpp:45
FitnessMetrics metrics
Definition proteingym.hpp:46
std::vector< double > scores
One score per variant, in the assay's order.
Definition proteingym.hpp:48
An assay's measured variants: mutant, DMS_score and DMS_score_bin columns.
Definition proteingym.hpp:30
std::vector< double > scores
Definition proteingym.hpp:32
std::vector< std::string > mutants
Definition proteingym.hpp:31
std::vector< int > bins
Definition proteingym.hpp:33
All five, as ProteinGym reports them.
Definition fitness_metrics.hpp:46
One assay's row of ProteinGym's reference file (DMS_substitutions.csv).
Definition proteingym.hpp:17
std::string id
DMS_id, for example BLAT_ECOLX_Stiffler_2015
Definition proteingym.hpp:18
std::string filename
DMS_filename
Definition proteingym.hpp:19
std::string target_seq
Definition proteingym.hpp:20
int64_t offset
The position of the sequence's first residue in the variant names (start_idx, else 1).
Definition proteingym.hpp:22
Zero-shot variant effects from a protein language model (PLM-3): how much the model prefers a mutant ...