Rosetta  2021.16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
protocols::antibody::AntibodyDatabaseManager Class Reference

Class responsible for loading information from the AntibodyDatabase. More...

#include <AntibodyDatabaseManager.hh>

Inheritance diagram for protocols::antibody::AntibodyDatabaseManager:
Inheritance graph
[legend]

Public Member Functions

 AntibodyDatabaseManager (AntibodyInfoCOP ab_info, bool force_north_paper_db=false)
 
 ~AntibodyDatabaseManager () override
 
 AntibodyDatabaseManager (AntibodyDatabaseManager const &src)
 
AntibodyDatabaseManagerOP clone () const
 
void set_outlier_use (bool use_outliers)
 Set to parse outliers for both sequence and structural data. Default False. More...
 
CDRDBPoseSet load_cdr_poses (AntibodyCDRSetOptions const &options, core::pose::Pose const &pose, core::Size overhang=3)
 Load CDRs from options of all cdrs.. More...
 
core::pose::PoseOP load_cdr_pose (CDRDBPose &db_pose)
 Load a single pose into the db_pose using the given struct_id. If failure, it is nullptr. More...
 
utility::vector1< boolload_cdr_design_data (design::AntibodyCDRSeqDesignOptions const &options, core::pose::Pose const &pose, std::map< core::Size, AAProbabilities > &prob_set, core::Size const cutoff)
 Load CDRs from single cdr options. More...
 
utility::vector1< boolload_cdr_design_data_for_cdrs (utility::vector1< bool > const &cdrs, core::pose::Pose const &pose, std::map< core::Size, AAProbabilities > &prob_set, core::Size const cutoff)
 
CDRDBSequenceSet load_cdr_sequences (utility::vector1< bool > const &cdrs, core::pose::Pose const &pose, bool match_on_length=false)
 Load a set of CDR sequences from the database. More...
 
utility::vector1< CDRDBSequenceload_cdr_sequences_for_cdr_length (CDRNameEnum const cdr, core::Size const length)
 
utility::vector1< CDRDBSequenceload_cdr_sequences_for_cdr_cluster (CDRNameEnum const cdr, clusters::CDRClusterEnum const cluster)
 
void ignore_light_chain (bool const ignore_light_chain)
 

Private Member Functions

utility::vector1< CDRDBSequenceload_cdr_sequences_for_cdr (CDRNameEnum const cdr, core::Size const length, clusters::CDRClusterEnum const cluster, bool load_on_length)
 
void create_database_session (std::string const database_path)
 Create the actual sessionOP. More...
 
void check_for_graft_instruction_inconsistencies (AntibodyCDRSetOptions const &options)
 Checks to make sure the instructions make sense before trying to create the statement for the db.. More...
 
template<typename T >
bool has_vec_inconsistency (utility::vector1< T > const &include, utility::vector1< T > const &leave_out) const
 Checks for inconsistency in include_only and leave_out string vectors from GraftInstructions. More...
 
void bind_vec_constraint (utility::vector1< std::string > const &vec, cppdb::statement &select_statement, core::Size &col) const
 Bind the values in the vector to the select statement. More...
 
utility::vector1< std::string > get_cluster_string_vec (utility::vector1< clusters::CDRClusterEnum > const &clusters)
 
utility::vector1< core::Sizeget_cluster_totals (bool use_outliers) const
 Does the work. Not pretty. More...
 
utility::vector1< core::Sizeget_cluster_totals () const
 Main function called - deals with outliers vs H3_outliers. More...
 
std::string get_ands (std::string name, core::Size n) const
 
void load_structure_loading_info ()
 Loads a text file with structures to SKIP from the database or are OK to load. More...
 

Private Attributes

std::string db_path_
 
utility::sql_database::sessionOP db_session_
 
AntibodyInfoCOP ab_info_
 
bool use_outliers_
 
bool use_h3_graft_outliers_
 
bool use_only_H3_kinked_
 
bool high_mem_mode_ = false
 
core::Size cdr_cache_limit_ = 300
 
bool ignore_light_chain_ = false
 
utility::vector1< std::string > loadable_structure_tags_
 
utility::vector1< std::string > skip_structure_tags_
 

Detailed Description

Class responsible for loading information from the AntibodyDatabase.

Constructor & Destructor Documentation

protocols::antibody::AntibodyDatabaseManager::AntibodyDatabaseManager ( AntibodyInfoCOP  ab_info,
bool  force_north_paper_db = false 
)
protocols::antibody::AntibodyDatabaseManager::~AntibodyDatabaseManager ( )
overridedefault
protocols::antibody::AntibodyDatabaseManager::AntibodyDatabaseManager ( AntibodyDatabaseManager const &  src)

References ab_info_, and db_session_.

Member Function Documentation

void protocols::antibody::AntibodyDatabaseManager::bind_vec_constraint ( utility::vector1< std::string > const &  vec,
cppdb::statement &  select_statement,
core::Size col 
) const
private

Bind the values in the vector to the select statement.

Referenced by load_cdr_poses().

void protocols::antibody::AntibodyDatabaseManager::check_for_graft_instruction_inconsistencies ( AntibodyCDRSetOptions const &  options)
private

Checks to make sure the instructions make sense before trying to create the statement for the db..

References protocols::antibody::CDRNameEnum_total, and has_vec_inconsistency().

Referenced by load_cdr_poses().

AntibodyDatabaseManagerOP protocols::antibody::AntibodyDatabaseManager::clone ( ) const
void protocols::antibody::AntibodyDatabaseManager::create_database_session ( std::string const  database_path)
private

Create the actual sessionOP.

References db_path_, db_session_, and protocols::antibody::TR().

Referenced by AntibodyDatabaseManager().

std::string protocols::antibody::AntibodyDatabaseManager::get_ands ( std::string  name,
core::Size  n 
) const
private
vector1< std::string > protocols::antibody::AntibodyDatabaseManager::get_cluster_string_vec ( utility::vector1< clusters::CDRClusterEnum > const &  clusters)
private

References ab_info_.

Referenced by load_cdr_poses().

utility::vector1< core::Size > protocols::antibody::AntibodyDatabaseManager::get_cluster_totals ( bool  use_outliers) const
private
utility::vector1< core::Size > protocols::antibody::AntibodyDatabaseManager::get_cluster_totals ( ) const
private

Main function called - deals with outliers vs H3_outliers.

References ab_info_, protocols::antibody::clusters::CDRClusterEnum_stop, protocols::antibody::h3, use_h3_graft_outliers_, and use_outliers_.

Referenced by load_cdr_poses().

template<typename T >
bool protocols::antibody::AntibodyDatabaseManager::has_vec_inconsistency ( utility::vector1< T > const &  include,
utility::vector1< T > const &  leave_out 
) const
private

Checks for inconsistency in include_only and leave_out string vectors from GraftInstructions.

Referenced by check_for_graft_instruction_inconsistencies().

void protocols::antibody::AntibodyDatabaseManager::ignore_light_chain ( bool const  ignore_light_chain)
inline
vector1< bool > protocols::antibody::AntibodyDatabaseManager::load_cdr_design_data ( design::AntibodyCDRSeqDesignOptions const &  options,
core::pose::Pose const &  pose,
std::map< core::Size, AAProbabilities > &  prob_set,
core::Size const  cutoff 
)

Load CDRs from single cdr options.

Will attempt to use Pose Datacache for identification of CDR clusters first.Load probability data for CDR Design. Returns CDRs where data could not be loaded. Cutoff indicates number of total sequences needed to use the data.

Will attempt to use Pose Datacache for identification of CDR clusters first.

References protocols::antibody::CDRNameEnum_total, load_cdr_design_data_for_cdrs(), protocols::antibody::design::seq_design_profiles, and protocols::antibody::TR().

Referenced by protocols::antibody::design::get_cluster_profile_probability_data().

vector1< bool > protocols::antibody::AntibodyDatabaseManager::load_cdr_design_data_for_cdrs ( utility::vector1< bool > const &  cdrs,
core::pose::Pose const &  pose,
std::map< core::Size, AAProbabilities > &  prob_set,
core::Size const  cutoff 
)
core::pose::PoseOP protocols::antibody::AntibodyDatabaseManager::load_cdr_pose ( CDRDBPose db_pose)
CDRDBPoseSet protocols::antibody::AntibodyDatabaseManager::load_cdr_poses ( AntibodyCDRSetOptions const &  options,
core::pose::Pose const &  pose,
core::Size  overhang = 3 
)
CDRDBSequenceSet protocols::antibody::AntibodyDatabaseManager::load_cdr_sequences ( utility::vector1< bool > const &  cdrs,
core::pose::Pose const &  pose,
bool  match_on_length = false 
)
utility::vector1< CDRDBSequence > protocols::antibody::AntibodyDatabaseManager::load_cdr_sequences_for_cdr ( CDRNameEnum const  cdr,
core::Size const  length,
clusters::CDRClusterEnum const  cluster,
bool  load_on_length 
)
private
utility::vector1< CDRDBSequence > protocols::antibody::AntibodyDatabaseManager::load_cdr_sequences_for_cdr_cluster ( CDRNameEnum const  cdr,
clusters::CDRClusterEnum const  cluster 
)
utility::vector1< CDRDBSequence > protocols::antibody::AntibodyDatabaseManager::load_cdr_sequences_for_cdr_length ( CDRNameEnum const  cdr,
core::Size const  length 
)
void protocols::antibody::AntibodyDatabaseManager::load_structure_loading_info ( )
private

Loads a text file with structures to SKIP from the database or are OK to load.

References loadable_structure_tags_, protocols::hybridization::path, skip_structure_tags_, and protocols::antibody::TR().

Referenced by load_cdr_poses().

void protocols::antibody::AntibodyDatabaseManager::set_outlier_use ( bool  use_outliers)

Member Data Documentation

AntibodyInfoCOP protocols::antibody::AntibodyDatabaseManager::ab_info_
private
core::Size protocols::antibody::AntibodyDatabaseManager::cdr_cache_limit_ = 300
private
std::string protocols::antibody::AntibodyDatabaseManager::db_path_
private

Referenced by create_database_session().

utility::sql_database::sessionOP protocols::antibody::AntibodyDatabaseManager::db_session_
private
bool protocols::antibody::AntibodyDatabaseManager::high_mem_mode_ = false
private
bool protocols::antibody::AntibodyDatabaseManager::ignore_light_chain_ = false
private
utility::vector1< std::string > protocols::antibody::AntibodyDatabaseManager::loadable_structure_tags_
private
utility::vector1< std::string > protocols::antibody::AntibodyDatabaseManager::skip_structure_tags_
private
bool protocols::antibody::AntibodyDatabaseManager::use_h3_graft_outliers_
private
bool protocols::antibody::AntibodyDatabaseManager::use_only_H3_kinked_
private
bool protocols::antibody::AntibodyDatabaseManager::use_outliers_
private

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