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

#include <SequenceAlignment.hh>

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

List of all members.

Public Member Functions

 SequenceAlignment ()
 ctor
 ~SequenceAlignment ()
 dtor
SequenceAlignmentOP clone () const
void clear ()
void add_sequence (SequenceOP myseq)
Size size () const
 Returns the number of sequences.
Size length () const
 Returns the length of all sequences in this SequenceAlignment.
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.
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.
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.
void remove_gapped_positions ()
 Removes positions that are gapped in all columns of the alignment.
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.
utility::vector1< Realcalculate_per_position_scores (ScoringSchemeOP ss) const
 calculates pairwise scores similar to calculate_score_sum_of_pairs.
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.
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.
void comment (std::string const &comment)
 getter/setters for comments
utility::vector1< std::string > comments () const
void data_integrity_check () const
Size identities () const
 Returns the number of positions at which all.
Size gapped_positions () const
 Returns the number of positions in the SequenceAlignment with at least one gap.
Real max_gap_percentage () const
 Returns the number of gaps contained by the sequence in the alignment with the most gaps.
bool is_gapped (Size const col_idx) const
 Returns true if the given alignment column index is gapped, false otherwise.
std::string alignment_id () const
 this gives the id of the second sequence
 SequenceAlignment (SequenceAlignment const &src)
 copy constructor
SequenceAlignmentoperator= (SequenceAlignment const &src)
 assignment operator
bool operator== (const SequenceAlignment &other) const
 Equality operator.
void printGrishinFormat (std::ostream &out) const

Friends

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

Constructor & Destructor Documentation

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

ctor

Referenced by clone().

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

dtor

References clear().

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(), 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]

Referenced by operator=(), and ~SequenceAlignment().

SequenceAlignmentOP core::sequence::SequenceAlignment::clone ( ) const [inline]

References SequenceAlignment().

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

getter/setters for comments

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

Referenced by operator=().

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

References length(), 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(), and length().

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 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 core::sequence::end, and length().

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

assignment operator

References add_sequence(), clear(), comments(), 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 core::sequence::end, and length().

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

void core::sequence::SequenceAlignment::score ( Real const &  sc)
Real core::sequence::SequenceAlignment::score ( ) const
Real core::sequence::SequenceAlignment::score ( std::string const &  name) const
void core::sequence::SequenceAlignment::score ( std::string const &  name,
Real const  value 
)
std::map< std::string, core::Real > core::sequence::SequenceAlignment::scores ( ) const
void core::sequence::SequenceAlignment::scores ( std::map< std::string, core::Real new_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 core::sequence::end, and length().

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, and length().

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

References score(), sequence(), and size().

Referenced by data_integrity_check(), and sequence().


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]

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