Rosetta 3.4
Public Member Functions | Friends
core::sequence::SequenceProfile Class Reference

#include <SequenceProfile.hh>

Inheritance diagram for core::sequence::SequenceProfile:
Inheritance graph
[legend]
Collaboration diagram for core::sequence::SequenceProfile:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SequenceProfile ()
 ctors
 SequenceProfile (FileName const &fn)
 SequenceProfile (utility::vector1< utility::vector1< core::Real > > prof, std::string const &sequence, std::string const &id, Size start=1, bool negative_better=false)
 SequenceProfile (SequenceProfile const &src)
 copy ctor
SequenceProfileoperator= (SequenceProfile const &rhs)
 assignment operator.
 ~SequenceProfile ()
 dtor
virtual SequenceOP clone () const
 Returns an owning pointer to a new SequenceProfile object, with data that is a deep copy of the information in this object.
virtual void read_from_file (FileName const &fn)
 Read an profile matrix from the given filename using the NCBI PSSM format for a position-specific scoring matrix.
virtual void generate_from_sequence (Sequence const &seq, std::string matrix="BLOSUM62")
 Generate the profile matrix from a sequence and a given substitution matrix.
void rescale (core::Real factor=1)
 Multiply all profile weights by factor.
void convert_profile_to_probs (core::Real temp=1.0)
 Use boltzman scaling on a per-residue basis to convert the current profile values to probabilities ( range 0.0-1.0 )
void global_auto_rescale ()
 Use linear rescaling (with a fixed zero) to fit the values within the range -1.0 to 1.0.
void read_from_checkpoint (FileName const &fn, bool negative_better=true)
 Read profile matrix from the given filename using the NNMAKE .checkpoint format. For compatability, negative_better defaults to true. Set manually if necessary.
utility::vector1
< utility::vector1< Real >
> const & 
profile () const
 Returns the 2D vector1 of Real values representing this profile.
void profile (utility::vector1< utility::vector1< Real > > const &new_profile)
 Sets the 2D vector1 of Real values representing this profile.
virtual void insert_char (core::Size pos, char new_char)
 Inserts a character at the given position.
virtual void delete_position (core::Size pos)
 Deletes the given position from the Sequence and shifts everything else back by one.
virtual std::string type () const
Size width () const
 Returns the number of distinct values at each position in this profile.
utility::vector1< Real > const & prof_row (Size pos) const
 Returns the vector1 of values at this position.
bool negative_better () const
 Returns true if negative values are better identities.
void negative_better (bool negbet)
 Set whether negative identities are better.
core::Real temp () const
 returns the temperature used in computing profile probabilities
utility::vector1< std::string > alphabet () const
 Return the alphabet used by this sequence profile. This is an N-dimensional vector1 where N is the width of the profile, and the ith entry of any row in the profile represents the probability of ith character at that row in the sequence.
void alphabet (utility::vector1< std::string > new_alphabet)

Friends

std::ostream & operator<< (std::ostream &out, const SequenceProfile &p)
 Print this SequenceProfile object to the given std::ostream.

Constructor & Destructor Documentation

core::sequence::SequenceProfile::SequenceProfile ( ) [inline]

ctors

Referenced by clone().

core::sequence::SequenceProfile::SequenceProfile ( FileName const &  fn) [inline]

References read_from_file().

core::sequence::SequenceProfile::SequenceProfile ( utility::vector1< utility::vector1< core::Real > >  prof,
std::string const &  sequence,
std::string const &  id,
Size  start = 1,
bool  negative_better = false 
) [inline]
core::sequence::SequenceProfile::SequenceProfile ( SequenceProfile const &  src) [inline]

copy ctor

core::sequence::SequenceProfile::~SequenceProfile ( ) [inline]

dtor


Member Function Documentation

utility::vector1< std::string > core::sequence::SequenceProfile::alphabet ( ) const [inline]

Return the alphabet used by this sequence profile. This is an N-dimensional vector1 where N is the width of the profile, and the ith entry of any row in the profile represents the probability of ith character at that row in the sequence.

Reimplemented in core::sequence::ChemicalShiftSequence.

Referenced by operator=().

void core::sequence::SequenceProfile::alphabet ( utility::vector1< std::string >  new_alphabet) [inline]
virtual SequenceOP core::sequence::SequenceProfile::clone ( ) const [inline, virtual]

Returns an owning pointer to a new SequenceProfile object, with data that is a deep copy of the information in this object.

Reimplemented from core::sequence::Sequence.

Reimplemented in core::sequence::ChemicalShiftSequence.

References SequenceProfile().

void core::sequence::SequenceProfile::convert_profile_to_probs ( core::Real  temp = 1.0)

Use boltzman scaling on a per-residue basis to convert the current profile values to probabilities ( range 0.0-1.0 )

References prof_row(), profile(), and temp().

void core::sequence::SequenceProfile::delete_position ( core::Size  pos) [virtual]

Deletes the given position from the Sequence and shifts everything else back by one.

Reimplemented from core::sequence::Sequence.

Reimplemented in core::sequence::SequenceCoupling.

References core::sequence::Sequence::length(), profile(), and core::sequence::Sequence::start().

void core::sequence::SequenceProfile::generate_from_sequence ( Sequence const &  seq,
std::string  matrix = "BLOSUM62" 
) [virtual]
void core::sequence::SequenceProfile::global_auto_rescale ( )

Use linear rescaling (with a fixed zero) to fit the values within the range -1.0 to 1.0.

References rescale().

void core::sequence::SequenceProfile::insert_char ( core::Size  pos,
char  new_char 
) [virtual]

Inserts a character at the given position.

Reimplemented from core::sequence::Sequence.

Reimplemented in core::sequence::SequenceCoupling.

References core::sequence::Sequence::length(), and core::sequence::Sequence::sequence().

void core::sequence::SequenceProfile::negative_better ( bool  negbet) [inline]

Set whether negative identities are better.

bool core::sequence::SequenceProfile::negative_better ( ) const [inline]

Returns true if negative values are better identities.

The "default" use case is for storing log likelihood values where positive is better. If you're using this class to store energy-like values, set negative_better to true.

Referenced by read_from_checkpoint().

SequenceProfile& core::sequence::SequenceProfile::operator= ( SequenceProfile const &  rhs) [inline]
utility::vector1< Real > const & core::sequence::SequenceProfile::prof_row ( Size  pos) const
void core::sequence::SequenceProfile::profile ( utility::vector1< utility::vector1< Real > > const &  new_profile)

Sets the 2D vector1 of Real values representing this profile.

utility::vector1< utility::vector1< Real > > const & core::sequence::SequenceProfile::profile ( ) const
void core::sequence::SequenceProfile::read_from_checkpoint ( FileName const &  fn,
bool  negative_better = true 
)

Read profile matrix from the given filename using the NNMAKE .checkpoint format. For compatability, negative_better defaults to true. Set manually if necessary.

References core::chemical::aa_from_oneletter_code(), negative_better(), protocols::forge::methods::order(), prof_row(), profile(), and core::sequence::Sequence::sequence().

Referenced by protocols::simple_moves::SequenceProfileMover::apply().

void core::sequence::SequenceProfile::read_from_file ( FileName const &  fn) [virtual]

Read an profile matrix from the given filename using the NCBI PSSM format for a position-specific scoring matrix.

Reimplemented from core::sequence::Sequence.

Reimplemented in core::sequence::ChemicalShiftSequence, and core::sequence::SequenceCoupling.

References core::chemical::aa_from_oneletter_code(), core::sequence::Sequence::id(), protocols::forge::methods::order(), prof_row(), core::sequence::Sequence::sequence(), and core::sequence::tr().

Referenced by SequenceProfile().

void core::sequence::SequenceProfile::rescale ( core::Real  factor = 1)

Multiply all profile weights by factor.

References make_table_of_pilot_apps::begin, core::sequence::end, profile(), and core::sequence::tr().

Referenced by global_auto_rescale().

core::Real core::sequence::SequenceProfile::temp ( ) const [inline]

returns the temperature used in computing profile probabilities

Reimplemented in core::sequence::SequenceCoupling.

Referenced by convert_profile_to_probs().

virtual std::string core::sequence::SequenceProfile::type ( ) const [inline, virtual]

Reimplemented from core::sequence::Sequence.

Reimplemented in core::sequence::SequenceCoupling.

Size core::sequence::SequenceProfile::width ( ) const

Returns the number of distinct values at each position in this profile.

Referenced by core::sequence::operator<<().


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const SequenceProfile p 
) [friend]

Print this SequenceProfile object to the given std::ostream.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines