Rosetta  2020.46
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Types | Private Attributes | List of all members
core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded Class Reference

#include <MHCEpitopePredictorPreLoaded.hh>

Inheritance diagram for core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded:
Inheritance graph
[legend]

Public Member Functions

 MHCEpitopePredictorPreLoaded ()
 
void load_database (std::string const &filename)
 Initializes from an sqlite database. More...
 
void load_csv (std::string const &filename)
 Initializes from a csv file with header, such that the first column is the peptide and the second column the score; other columns ignored. More...
 
 ~MHCEpitopePredictorPreLoaded () override
 
bool operator== (MHCEpitopePredictor const &) override
 Is it the same predictor, not just as initialized (e.g., from file), but considering any subsequent modifications? More...
 
std::string report () const override
 Get a summary of the data stored in this object. More...
 
core::Real score (std::string const &pep) override
 The MHC epitope score, predicting "immunogenicity" of the peptide (lower is lower risk, with 0 being none) More...
 
void set_unseen_score (core::Size us)
 Sets the score for a peptide not in the map. More...
 
core::Size get_unseen_score () const
 Accessor for the unseen_score_. More...
 
std::map< std::string, core::Realget_scores_map () const
 Accessor for the peptide->score map object. More...
 
- Public Member Functions inherited from core::scoring::mhc_epitope_energy::MHCEpitopePredictor
 MHCEpitopePredictor ()
 
 ~MHCEpitopePredictor () override
 
core::Size get_peptide_length () const
 The length required by this predictor for peptides. More...
 
core::Size get_overhang_length () const
 

Static Public Member Functions

static void check_file_size (std::string const &filename, core::Size const warn_threshold)
 Check for the size of a file and print a warning if appropriate. More...
 

Private Types

enum  FileType { NOT_LOADED, LOAD_DATABASE, LOAD_CSV }
 The type of file, so can reconstruct when needed (serialization) More...
 

Private Attributes

std::map< std::string, core::Realscores_
 peptide->score More...
 
std::string filename_ =""
 The filename from which the map was loaded. More...
 
FileType filetype_ = NOT_LOADED
 
core::Size unseen_score_ = 100
 The score for a peptide not in the map. More...
 

Additional Inherited Members

- Protected Member Functions inherited from core::scoring::mhc_epitope_energy::MHCEpitopePredictor
void set_peptide_length (core::Size peptide_length)
 Setter for peptide_length, for derived classes to set upon initialization. More...
 
void set_overhang_length (core::Size overhang_length)
 Setter for peptide_length, for derived classes to set upon initialization. More...
 

Member Enumeration Documentation

The type of file, so can reconstruct when needed (serialization)

Enumerator
NOT_LOADED 
LOAD_DATABASE 
LOAD_CSV 

Constructor & Destructor Documentation

core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded::MHCEpitopePredictorPreLoaded ( )
inline
core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded::~MHCEpitopePredictorPreLoaded ( )
inlineoverride

Member Function Documentation

void core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded::check_file_size ( std::string const &  filename,
core::Size const  warn_threshold 
)
static

Check for the size of a file and print a warning if appropriate.

References core::scoring::mhc_epitope_energy::TR().

Referenced by core::scoring::ScoringManager::create_mhc_csv_contents(), and core::scoring::ScoringManager::create_mhc_map_from_db().

std::map< std::string, core::Real > core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded::get_scores_map ( ) const
inline

Accessor for the peptide->score map object.

References scores_.

core::Size core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded::get_unseen_score ( ) const
inline

Accessor for the unseen_score_.

References unseen_score_.

void core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded::load_csv ( std::string const &  filename)

Initializes from a csv file with header, such that the first column is the peptide and the second column the score; other columns ignored.

References protocols::abinitio::filename(), and protocols::hybridization::score.

void core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded::load_database ( std::string const &  filename)

Initializes from an sqlite database.

References protocols::abinitio::filename().

bool core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded::operator== ( MHCEpitopePredictor const &  )
overridevirtual

Is it the same predictor, not just as initialized (e.g., from file), but considering any subsequent modifications?

Takes any other epitope predictor so needs to make sure same type.

Implements core::scoring::mhc_epitope_energy::MHCEpitopePredictor.

References filename_, and unseen_score_.

std::string core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded::report ( ) const
overridevirtual

Get a summary of the data stored in this object.

Reimplemented from core::scoring::mhc_epitope_energy::MHCEpitopePredictor.

core::Real core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded::score ( std::string const &  )
overridevirtual

The MHC epitope score, predicting "immunogenicity" of the peptide (lower is lower risk, with 0 being none)

The peptide must be of the length specified for this predictor (get_peptide_length()))

Reimplemented from core::scoring::mhc_epitope_energy::MHCEpitopePredictor.

References core::scoring::mhc_epitope_energy::TR().

void core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded::set_unseen_score ( core::Size  us)
inline

Sets the score for a peptide not in the map.

References unseen_score_.

Member Data Documentation

std::string core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded::filename_ =""
private

The filename from which the map was loaded.

Referenced by operator==().

FileType core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded::filetype_ = NOT_LOADED
private
std::map< std::string, core::Real > core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded::scores_
private

peptide->score

Referenced by get_scores_map().

core::Size core::scoring::mhc_epitope_energy::MHCEpitopePredictorPreLoaded::unseen_score_ = 100
private

The score for a peptide not in the map.

Referenced by get_unseen_score(), operator==(), and set_unseen_score().


The documentation for this class was generated from the following files: