Rosetta
2015.31
|
#include <SequenceAlignment.hh>
Public Member Functions | |
SequenceAlignment () | |
ctor More... | |
virtual | ~SequenceAlignment () |
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::Real > | scores () 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< Real > | calculate_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::Size > | 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. 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... | |
SequenceAlignment & | operator= (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< SequenceOP > | sequences_ |
utility::vector1< std::string > | comments_ |
std::map< std::string, core::Real > | scores_ |
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) |
|
inline |
ctor
Referenced by clone().
|
virtual |
dtor
moving from .cc file
core::sequence::SequenceAlignment::SequenceAlignment | ( | SequenceAlignment const & | src | ) |
copy constructor
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().
|
inline |
References comments_, and sequences_.
Referenced by protocols::comparative_modeling::AlignmentClustering::AlignmentClustering(), and operator=().
|
inline |
References SequenceAlignment().
Referenced by core::sequence::MCAligner::align(), and core::sequence::Aligner::traceback().
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<<().
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 |
Returns the length of all sequences in this SequenceAlignment.
References sequences_, and size().
Referenced by calculate_per_position_scores(), data_integrity_check(), protocols::nonlocal::find_regions_with_minimum_size(), gapped_positions(), identities(), core::sequence::map_seq1_seq2(), max_gap_percentage(), core::sequence::n_correctly_aligned_positions(), core::sequence::operator<<(), remove_gapped_positions(), sequence_indices(), sequence_mapping(), sequences_are_in_frame(), and core::sequence::steal_alignment().
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, length(), and sequences_.
SequenceAlignment & core::sequence::SequenceAlignment::operator= | ( | SequenceAlignment const & | src | ) |
assignment operator
References add_sequence(), clear(), comments(), comments_, scores(), scores_, sequence(), and size().
|
inline |
Equality operator.
References alignment_id(), core::sequence::end, sequence(), sequence_mapping(), and size().
void core::sequence::SequenceAlignment::printGrishinFormat | ( | std::ostream & | out | ) | const |
References core::sequence::end, score(), scores_, sequence(), and size().
Referenced by protocols::comparative_modeling::AlignmentCluster::output().
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, length(), 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 |
References score().
Referenced by calculate_score_sum_of_pairs(), printGrishinFormat(), read_data(), score(), and to_string().
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 |
References scores_.
Referenced by calculate_per_position_scores(), calculate_score_sum_of_pairs(), and operator=().
void core::sequence::SequenceAlignment::scores | ( | std::map< std::string, core::Real > | new_scores | ) |
References scores_.
SequenceOP core::sequence::SequenceAlignment::sequence | ( | Size | idx | ) | const |
References sequences_, size(), and to_string().
Referenced by alignment_id(), core::sequence::alignment_into_pose(), protocols::comparative_modeling::ThreadingMover::apply(), calculate_per_position_scores(), protocols::nonlocal::find_regions_with_minimum_size(), protocols::comparative_modeling::get_qt_mapping_general(), protocols::comparative_modeling::AlignmentCluster::merge(), core::sequence::n_correctly_aligned_positions(), core::sequence::SequenceAlignmentHasher::operator()(), core::sequence::operator<(), core::sequence::operator<<(), operator=(), operator==(), printGrishinFormat(), core::sequence::steal_alignment(), and to_string().
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, length(), and sequences_.
core::id::SequenceMapping core::sequence::SequenceAlignment::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.
References length(), sequences_, and size().
Referenced by protocols::medal::alignment_probabilities(), protocols::relax::MiniRelax::apply(), protocols::comparative_modeling::MultiThreadingMover::apply(), protocols::comparative_modeling::bounded_loops_from_alignment(), protocols::relax::coordinate_constrain_selection(), protocols::comparative_modeling::gather_coords(), protocols::comparative_modeling::get_qt_mapping_general(), protocols::comparative_modeling::loops_from_alignment(), protocols::comparative_modeling::loops_from_transitive_alignments(), core::sequence::map_seq1_seq2(), core::sequence::n_correctly_aligned_positions(), operator==(), and protocols::frag_picker::scores::sequencealign().
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 |
Returns the number of sequences.
References sequences_.
Referenced by calculate_per_position_scores(), protocols::relax::coordinate_constrain_selection(), data_integrity_check(), is_gapped(), length(), core::sequence::n_correctly_aligned_positions(), core::sequence::SequenceAlignmentHasher::operator()(), core::sequence::operator<(), core::sequence::operator<<(), operator=(), operator==(), printGrishinFormat(), sequence(), sequence_mapping(), core::sequence::steal_alignment(), and to_string().
std::string core::sequence::SequenceAlignment::to_string | ( | ) | const |
References score(), sequence(), and size().
Referenced by data_integrity_check(), sequence(), and core::sequence::steal_alignment().
|
friend |
Less-than operator. Usd for storing SequenceAlignment objects in a std::set.
|
friend |
Print SequenceAlignment object to the given std::ostream.
|
friend |
|
private |
Referenced by clear(), comment(), comments(), and operator=().
|
private |
Referenced by operator=(), printGrishinFormat(), score(), and scores().
|
private |