Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
core::io::external::PsiPredInterface Class Reference

#include <PsiPredInterface.hh>

Inheritance diagram for core::io::external::PsiPredInterface:
Inheritance graph
[legend]

Public Member Functions

 PsiPredInterface (std::string const &cmd, std::string const &scratch_dir="")
 default constructor More...
 
 PsiPredInterface (PsiPredInterface const &rval)
 copy constructor More...
 
PsiPredResult run_psipred (core::pose::Pose const &pose, std::string const &blueprint_ss)
 Runs psipred, as specified by "cmd" on the fasta file "fasta_filename", and returns the psipred filename if cached psipred output has already been saved for the AA sequence of pose, the cached output will be returned. More...
 
utility::vector1
< utility::vector1
< utility::vector1< core::Real > > > 
run_psipred_prob (core::pose::Pose const &pose)
 
PsiPredInterfaceoperator= (const PsiPredInterface &)=delete
 in its current form PsiPredResultMap is not assignable but compiler tries to generate assigment operator anyway More...
 

Private Member Functions

std::string convert_to_fasta (std::string const &pname, std::string const &seq) const
 converts a pose into a fasta string More...
 
std::string create_fasta_file (std::string const &pname, std::string const &seq) const
 dumps fasta sequence for the pose into a file and returns the filename or exits rosetta if not successful More...
 
void cleanup_after_psipred (std::string const &psipred_filename, std::string const &fasta_filename) const
 deletes files created by psipred and convert_to_fasta More...
 
void set_scratch_dir (std::string const &scratch_dir)
 Set the scratch directory. Notably adding a / if the path does not end with one. More...
 
PsiPredResult parse_psipred_output (std::string const &psipred_str, std::string const &blueprint_ss, std::string const &psipred_horiz_filename) const
 Parses the psipred output and returns the predicted secondary structure and likelihoods of the blueprint secondary structure being present on the pose at each position. More...
 
utility::vector1
< utility::vector1< Real > > 
parse_psipred_output_probabilities (std::string const &psipred_str) const
 Parses the psipred output and returns the probabilities. More...
 
std::pair< std::string,
utility::vector1< core::Size > > 
parse_psipred_horiz_output (std::string const &psipred_horiz_filename) const
 Parses the psipred pass2 horiz file and returns predicted secondary structure and confidence for each position. More...
 

Private Attributes

PsiPredResultMap psipred_output_
 This class will cache and store Psipred output for each amino acid sequence string. They are stored in this map, which is indexed by sequence string. More...
 
std::string cmd_
 The PsiPred command. More...
 
std::string scratch_dir_
 A scratch directory to store files in. Always ends with /. More...
 

Constructor & Destructor Documentation

core::io::external::PsiPredInterface::PsiPredInterface ( std::string const &  cmd,
std::string const &  scratch_dir = "" 
)

default constructor

References set_scratch_dir().

core::io::external::PsiPredInterface::PsiPredInterface ( PsiPredInterface const &  rval)

copy constructor

References scratch_dir_, and set_scratch_dir().

Member Function Documentation

void core::io::external::PsiPredInterface::cleanup_after_psipred ( std::string const &  psipred_filename,
std::string const &  fasta_filename 
) const
private

deletes files created by psipred and convert_to_fasta

References core::io::TR().

Referenced by run_psipred(), and run_psipred_prob().

std::string core::io::external::PsiPredInterface::convert_to_fasta ( std::string const &  pname,
std::string const &  seq 
) const
private

converts a pose into a fasta string

given a pose, generates a fasta string

converts a sequence into a fasta string, given the name

Referenced by create_fasta_file().

std::string core::io::external::PsiPredInterface::create_fasta_file ( std::string const &  pname,
std::string const &  seq 
) const
private

dumps fasta sequence for the pose into a file and returns the filename or exits rosetta if not successful

creates a fasta file returns filename if successful exits rosetta if not successful

An optional output_folder may be passed where the fasta file will be written. The string is expected to end with / and will not be returned as part of the filename

References convert_to_fasta(), and core::io::TR().

Referenced by run_psipred(), and run_psipred_prob().

PsiPredInterface& core::io::external::PsiPredInterface::operator= ( const PsiPredInterface )
delete

in its current form PsiPredResultMap is not assignable but compiler tries to generate assigment operator anyway

std::pair< std::string, utility::vector1< core::Size > > core::io::external::PsiPredInterface::parse_psipred_horiz_output ( std::string const &  psipred_horiz_filename) const
private

Parses the psipred pass2 horiz file and returns predicted secondary structure and confidence for each position.

References protocols::hybridization::t, and core::io::TR().

Referenced by parse_psipred_output().

PsiPredResult core::io::external::PsiPredInterface::parse_psipred_output ( std::string const &  psipred_str,
std::string const &  blueprint_ss,
std::string const &  psipred_horiz_filename 
) const
private

Parses the psipred output and returns the predicted secondary structure and likelihoods of the blueprint secondary structure being present on the pose at each position.

References protocols::loops::loop_closure::ccd::helix, parse_psipred_horiz_output(), core::io::external::PsiPredResult::psipred_prob, core::scoring::sheet, and core::io::TR().

Referenced by run_psipred().

utility::vector1< utility::vector1< Real > > core::io::external::PsiPredInterface::parse_psipred_output_probabilities ( std::string const &  psipred_str) const
private

Parses the psipred output and returns the probabilities.

References protocols::loops::loop_closure::ccd::helix, and core::scoring::sheet.

Referenced by run_psipred_prob().

PsiPredResult core::io::external::PsiPredInterface::run_psipred ( core::pose::Pose const &  pose,
std::string const &  blueprint_ss 
)
utility::vector1< utility::vector1< utility::vector1< core::Real > > > core::io::external::PsiPredInterface::run_psipred_prob ( core::pose::Pose const &  pose)
void core::io::external::PsiPredInterface::set_scratch_dir ( std::string const &  scratch_dir)
private

Set the scratch directory. Notably adding a / if the path does not end with one.

References scratch_dir_.

Referenced by PsiPredInterface().

Member Data Documentation

std::string core::io::external::PsiPredInterface::cmd_
private

The PsiPred command.

Referenced by run_psipred(), and run_psipred_prob().

PsiPredResultMap core::io::external::PsiPredInterface::psipred_output_
private

This class will cache and store Psipred output for each amino acid sequence string. They are stored in this map, which is indexed by sequence string.

std::string core::io::external::PsiPredInterface::scratch_dir_
private

A scratch directory to store files in. Always ends with /.

Referenced by PsiPredInterface(), run_psipred(), run_psipred_prob(), and set_scratch_dir().


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