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

#include <SequenceAlignment.hh>

Inheritance diagram for core::sequence::SequenceAlignment:
Inheritance graph
[legend]

Public Member Functions

 SequenceAlignment ()
 ctor More...
 
 ~SequenceAlignment () override
 dtor More...
 
SequenceAlignmentOP clone () const
 
void clear ()
 
void add_sequence (SequenceOP myseq)
 
Size size () const
 Returns the number of sequences. More...
 
Size length () const
 Returns the length of all sequences in this SequenceAlignment. More...
 
SequenceOP sequence (Size idx) const
 
std::string to_string () const
 
void read_data (std::istream &in)
 
void score (Real const &sc)
 Accessors for the score of this SequenceAlignment. More...
 
Real score () const
 
Real score (std::string const &name) const
 
void score (std::string const &name, Real const value)
 
std::map< std::string, core::Realscores () const
 
void scores (std::map< std::string, core::Real > new_scores)
 
void read_from_file (std::string const &filename)
 initialize this SequenceAlignment object from the given file. More...
 
core::id::SequenceMapping sequence_mapping (core::Size const idx1, core::Size const idx2) const
 returns a SequenceMapping of the sequence at index idx1 mapped to the sequence at idx2. More...
 
void remove_gapped_positions ()
 Removes positions that are gapped in all columns of the alignment. More...
 
Real calculate_score_sum_of_pairs (ScoringSchemeOP ss) const
 calculates the score of this alignment under the given ScoringScheme by summing up all of pairwise alignment scores between all pairs of sequence. More...
 
utility::vector1< Realcalculate_per_position_scores (ScoringSchemeOP ss) const
 calculates pairwise scores similar to calculate_score_sum_of_pairs. More...
 
bool sequences_are_in_frame () const
 Returns true if all of the sequences are "in-frame," which means that residue x in the first sequence maps to residue x in all other sequences. This method intentionally ignores any sequence at the position where that sequence has a gap. More...
 
utility::vector1< core::Sizesequence_indices (core::Size const column) const
 Returns a vector1 of the sequence indices in the given column of the SequenceAlignment that are calculated using the Sequence resnum() method. More...
 
void comment (std::string const &comment)
 getter/setters for comments More...
 
utility::vector1< std::string > comments () const
 
void data_integrity_check () const
 
Size identities () const
 Returns the number of positions at which all. More...
 
Size gapped_positions () const
 Returns the number of positions in the SequenceAlignment with at least one gap. More...
 
Real max_gap_percentage () const
 Returns the number of gaps contained by the sequence in the alignment with the most gaps. More...
 
bool is_gapped (Size const col_idx) const
 Returns true if the given alignment column index is gapped, false otherwise. More...
 
std::string alignment_id () const
 this gives the id of the second sequence — in a typical alignment it is 1) query, 2) template More...
 
 SequenceAlignment (SequenceAlignment const &src)
 copy constructor More...
 
SequenceAlignmentoperator= (SequenceAlignment const &src)
 assignment operator More...
 
bool operator== (const SequenceAlignment &other) const
 Equality operator. More...
 
void printGrishinFormat (std::ostream &out) const
 

Private Attributes

utility::vector1< SequenceOPsequences_
 
utility::vector1< std::string > comments_
 
std::map< std::string, core::Realscores_
 

Friends

bool operator< (SequenceAlignment const &lhs, SequenceAlignment const &rhs)
 Less-than operator. Usd for storing SequenceAlignment objects in a std::set. More...
 
std::ostream & operator<< (std::ostream &out, const SequenceAlignment &sa)
 Print SequenceAlignment object to the given std::ostream. More...
 
std::istream & operator>> (std::istream &in, SequenceAlignment &aln)
 

Constructor & Destructor Documentation

core::sequence::SequenceAlignment::SequenceAlignment ( )
inline

ctor

core::sequence::SequenceAlignment::~SequenceAlignment ( )
override

dtor

moving from .cc file

core::sequence::SequenceAlignment::SequenceAlignment ( SequenceAlignment const &  src)

copy constructor

Member Function Documentation

void core::sequence::SequenceAlignment::add_sequence ( SequenceOP  myseq)
std::string core::sequence::SequenceAlignment::alignment_id ( ) const

this gives the id of the second sequence — in a typical alignment it is 1) query, 2) template

References sequence().

Referenced by protocols::comparative_modeling::ThreadingJob::alignment_id(), and operator==().

utility::vector1< Real > core::sequence::SequenceAlignment::calculate_per_position_scores ( ScoringSchemeOP  ss) const

calculates pairwise scores similar to calculate_score_sum_of_pairs.

References length(), scores(), sequence(), sequences_, size(), and core::sequence::tr().

Referenced by calculate_score_sum_of_pairs().

Real core::sequence::SequenceAlignment::calculate_score_sum_of_pairs ( ScoringSchemeOP  ss) const

calculates the score of this alignment under the given ScoringScheme by summing up all of pairwise alignment scores between all pairs of sequence.

References calculate_per_position_scores(), core::sequence::end, score(), and scores().

void core::sequence::SequenceAlignment::clear ( )
inline

References comments_, and sequences_.

Referenced by operator=().

SequenceAlignmentOP core::sequence::SequenceAlignment::clone ( ) const
inline
void core::sequence::SequenceAlignment::comment ( std::string const &  comment)

getter/setters for comments

References comments_.

utility::vector1< std::string > core::sequence::SequenceAlignment::comments ( ) const

References comments_.

Referenced by operator=().

void core::sequence::SequenceAlignment::data_integrity_check ( ) const

References length(), sequences_, size(), and to_string().

Referenced by identities().

Size core::sequence::SequenceAlignment::gapped_positions ( ) const

Returns the number of positions in the SequenceAlignment with at least one gap.

References is_gapped(), and length().

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

Size core::sequence::SequenceAlignment::identities ( ) const

Returns the number of positions at which all.

References data_integrity_check(), length(), and sequences_.

Referenced by core::sequence::map_seq1_seq2(), and core::sequence::operator<<().

bool core::sequence::SequenceAlignment::is_gapped ( Size const  col_idx) const

Returns true if the given alignment column index is gapped, false otherwise.

References sequences_, and size().

Referenced by gapped_positions().

Size core::sequence::SequenceAlignment::length ( ) const
Real core::sequence::SequenceAlignment::max_gap_percentage ( ) const

Returns the number of gaps contained by the sequence in the alignment with the most gaps.

References length(), protocols::mean_field::max(), sequence(), and sequences_.

SequenceAlignment & core::sequence::SequenceAlignment::operator= ( SequenceAlignment const &  src)

assignment operator

References add_sequence(), clear(), comments(), comments_, scores(), scores_, sequence(), and size().

bool core::sequence::SequenceAlignment::operator== ( const SequenceAlignment other) const
inline

Equality operator.

References alignment_id(), core::sequence::end, sequence(), sequence_mapping(), and size().

void core::sequence::SequenceAlignment::printGrishinFormat ( std::ostream &  out) const
void core::sequence::SequenceAlignment::read_data ( std::istream &  in)

References add_sequence(), and score().

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

void core::sequence::SequenceAlignment::read_from_file ( std::string const &  filename)

initialize this SequenceAlignment object from the given file.

super-general alignment format reader. This will never ever ever have to be improved or extended.

References add_sequence().

void core::sequence::SequenceAlignment::remove_gapped_positions ( )

Removes positions that are gapped in all columns of the alignment.

References length(), sequence(), and sequences_.

Referenced by core::sequence::Aligner::traceback().

void core::sequence::SequenceAlignment::score ( Real const &  sc)

Accessors for the score of this SequenceAlignment.

References score().

Referenced by core::sequence::operator<<(), and core::sequence::Aligner::traceback().

Real core::sequence::SequenceAlignment::score ( ) const
Real core::sequence::SequenceAlignment::score ( std::string const &  name) const

References scores_.

void core::sequence::SequenceAlignment::score ( std::string const &  name,
Real const  value 
)

References scores_.

std::map< std::string, core::Real > core::sequence::SequenceAlignment::scores ( ) const
void core::sequence::SequenceAlignment::scores ( std::map< std::string, core::Real new_scores)

References scores_.

SequenceOP core::sequence::SequenceAlignment::sequence ( Size  idx) const
utility::vector1< core::Size > core::sequence::SequenceAlignment::sequence_indices ( core::Size const  column) const

Returns a vector1 of the sequence indices in the given column of the SequenceAlignment that are calculated using the Sequence resnum() method.

References length(), sequence(), and sequences_.

core::id::SequenceMapping core::sequence::SequenceAlignment::sequence_mapping ( core::Size const  idx1,
core::Size const  idx2 
) const
bool core::sequence::SequenceAlignment::sequences_are_in_frame ( ) const

Returns true if all of the sequences are "in-frame," which means that residue x in the first sequence maps to residue x in all other sequences. This method intentionally ignores any sequence at the position where that sequence has a gap.

References core::sequence::end, length(), and sequences_.

Size core::sequence::SequenceAlignment::size ( ) const
std::string core::sequence::SequenceAlignment::to_string ( ) const

Friends And Related Function Documentation

bool operator< ( SequenceAlignment const &  lhs,
SequenceAlignment const &  rhs 
)
friend

Less-than operator. Usd for storing SequenceAlignment objects in a std::set.

std::ostream& operator<< ( std::ostream &  out,
const SequenceAlignment sa 
)
friend

Print SequenceAlignment object to the given std::ostream.

std::istream& operator>> ( std::istream &  in,
SequenceAlignment aln 
)
friend

Member Data Documentation

utility::vector1< std::string > core::sequence::SequenceAlignment::comments_
private

Referenced by clear(), comment(), comments(), and operator=().

std::map< std::string, core::Real > core::sequence::SequenceAlignment::scores_
private
utility::vector1< SequenceOP > core::sequence::SequenceAlignment::sequences_
private

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