![]() |
Rosetta
2021.16
|
#include <Sequence.hh>

Public Member Functions | |
| Sequence () | |
| ctor More... | |
| Sequence (std::string const &seq, std::string const &id, core::Size start=1) | |
| Sequence (core::pose::Pose const &pose) | |
| Sequence (Sequence const &src) | |
| copy constructor. More... | |
| ~Sequence () override | |
| dtor More... | |
| virtual SequenceOP | clone () const |
| Returns an owning pointer to a copy of this sequence. More... | |
| virtual void | read_from_file (utility::file::FileName const &) |
| initializes this sequence object from a file. More... | |
| virtual core::Size | length () const |
| Returns the number of characters in this object. More... | |
| virtual void | insert_char (core::Size pos, char new_char) |
| Inserts a character at the given position. More... | |
| virtual void | replace_char (core::Size pos, char new_char) |
| virtual void | delete_position (core::Size pos) |
| Deletes the given position from the Sequence and shifts everything else back by one. More... | |
| virtual std::string | to_string () const |
| virtual std::string | type () const |
| void | sequence (std::string sequence) |
| sets sequence to the given value. More... | |
| void | id (std::string new_id) |
| sets id to the given value. More... | |
| void | start (core::Size new_start) |
| sets starting index to the given value. More... | |
| void | gap_char (char gap_char) |
| sets gap_char to the given value. More... | |
| void | spacer_positions (utility::vector1< Size > const &spacer_positions) |
| sets spacer_positions to the given value. More... | |
| core::Size | ungapped_length () const |
| Returns the number of characters in this object, ignoring gaps. More... | |
| core::Size | start () const |
| Returns the start of this object. More... | |
| std::string | id () const |
| Returns the id of this object. More... | |
| char | gap_char () const |
| Returns the character used to represent a gap for this object. More... | |
| utility::vector1< Size > | spacer_positions () const |
| Returns the spacer positions (chain breaks, e.g., from spaces or commas in original sequence text) More... | |
| std::string | ungapped_sequence () const |
| Returns the string representing this sequence without gaps. More... | |
| std::string | sequence () const |
| Returns the full sequence, which may include gaps. More... | |
| Sequence & | operator= (Sequence const &rhs) |
| assignment operator. More... | |
| bool | operator< (const Sequence &s) const |
| Returns true if this Sequence object's id is lexicographically less than the given Sequence object's id, returns false otherwise. Uses C++ string < operator to compare this Sequence object's id() to the given Sequence object's id(). More... | |
| bool | operator== (const Sequence &s) const |
| Returns true if the given Sequence object is equal to this Sequence object. Tests for string equality of id(), start(), and sequence(), and returns false if any of these are not equal. More... | |
| char | operator[] (core::Size pos) const |
| Returns the character at the given sequence position. More... | |
| char | at (core::Size pos) const |
| void | insert_gap (core::Size pos) |
| Inserts a gap at the given position, where insert_gap( 0 ) inserts the character at the beginning of the sequence, and insert_gap( length() ) inserts the character at the end of the sequence. More... | |
| void | append_char (char new_char) |
| Append a character. More... | |
| void | append_gap () |
| Append a gap. More... | |
| bool | is_gap (core::Size pos) const |
| Returns true if this position in the sequence represents a gap, returns false otherwise. More... | |
| void | read_data (std::istream &in) |
| Initializes the information in this sequence from the given std::istream. The istream should yield three pieces of information in the following order: More... | |
| core::Size | resnum (core::Size idx) const |
| Returns the index of the given sequence position, which is the position in the sequence minus any gaps that occur earlier in the sequence. For example, if the sequence is —AT, resnum(5) will return 2. Returns 0 for unaligned positions. More... | |
Private Attributes | |
| std::string | id_ |
| core::Size | start_ |
| char | gap_char_ |
| utility::vector1< Size > | spacer_positions_ |
| std::string | seq_ |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const Sequence &seq) |
| Prints the information a given Sequence object to the given std::ostream. More... | |
| std::ostream & | operator<< (std::istream &out, Sequence &seq) |
| Prints the information a given Sequence object to the given std::ostream. More... | |
| std::istream & | operator>> (std::istream &in, Sequence &seq) |
|
inline |
ctor
Referenced by clone().
|
inline |
References sequence().
| core::sequence::Sequence::Sequence | ( | core::pose::Pose const & | pose | ) |
References id_, core::pose::Pose::pdb_info(), sequence(), and core::pose::Pose::sequence().
|
inline |
copy constructor.
|
overridedefault |
dtor
| void core::sequence::Sequence::append_char | ( | char | new_char | ) |
Append a character.
References seq_.
| void core::sequence::Sequence::append_gap | ( | ) |
Append a gap.
References gap_char(), and seq_.
| char core::sequence::Sequence::at | ( | core::Size | pos | ) | const |
|
virtual |
Returns an owning pointer to a copy of this sequence.
Reimplemented in core::sequence::CompositeSequence, core::sequence::SequenceProfile, and core::sequence::ChemicalShiftSequence.
References Sequence().
|
virtual |
Deletes the given position from the Sequence and shifts everything else back by one.
Reimplemented in core::sequence::SequenceProfile, core::sequence::SequenceCoupling, and core::sequence::CompositeSequence.
References length(), and sequence().
Referenced by core::sequence::CompositeSequence::delete_position(), and core::sequence::SequenceProfile::delete_position().
| void core::sequence::Sequence::gap_char | ( | char | gap_char | ) |
sets gap_char to the given value.
References gap_char_.
Referenced by core::sequence::CompositeSequence::operator=(), and operator=().
| char core::sequence::Sequence::gap_char | ( | ) | const |
Returns the character used to represent a gap for this object.
References gap_char_.
Referenced by core::sequence::CompositeSequence::add_sequence(), append_gap(), insert_gap(), and core::sequence::CompositeSequence::operator=().
| void core::sequence::Sequence::id | ( | std::string | new_id | ) |
sets id to the given value.
References id_, and protocols::denovo_design::movers::new_id().
Referenced by operator<(), core::sequence::CompositeSequence::operator=(), operator=(), and operator==().
| std::string core::sequence::Sequence::id | ( | ) | const |
Returns the id of this object.
References id_.
Referenced by core::sequence::CompositeSequence::add_sequence(), core::sequence::ChemicalShiftSequence::ChemicalShiftSequence(), operator<(), core::sequence::CompositeSequence::operator=(), read_data(), core::sequence::ChemicalShiftSequence::read_from_file(), and core::sequence::SequenceProfile::read_from_file().
|
virtual |
Inserts a character at the given position.
Reimplemented in core::sequence::SequenceProfile, core::sequence::SequenceCoupling, and core::sequence::CompositeSequence.
References length(), and sequence().
Referenced by core::sequence::CompositeSequence::insert_char(), core::sequence::SequenceProfile::insert_char(), and insert_gap().
| void core::sequence::Sequence::insert_gap | ( | core::Size | pos | ) |
Inserts a gap at the given position, where insert_gap( 0 ) inserts the character at the beginning of the sequence, and insert_gap( length() ) inserts the character at the end of the sequence.
References gap_char(), and insert_char().
| bool core::sequence::Sequence::is_gap | ( | core::Size | pos | ) | const |
Returns true if this position in the sequence represents a gap, returns false otherwise.
References gap_char_, and length().
Referenced by resnum(), and ungapped_sequence().
|
virtual |
Returns the number of characters in this object.
Reimplemented in core::sequence::CompositeSequence.
References seq_.
Referenced by core::sequence::ChemicalShiftSequence::check_internals_(), core::sequence::SequenceProfile::check_internals_(), core::sequence::ChemicalShiftSequence::ChemicalShiftSequence(), delete_position(), core::sequence::SequenceProfile::delete_position(), core::sequence::SequenceProfile::generate_from_sequence(), insert_char(), core::sequence::SequenceProfile::insert_char(), is_gap(), core::sequence::operator<<(), replace_char(), resnum(), core::sequence::SequenceProfile::SequenceProfile(), ungapped_sequence(), and protocols::indexed_structure_store::movers::SegmentSequenceProfileMover::write_profile().
assignment operator.
References gap_char(), gap_char_, id(), id_, seq_, sequence(), spacer_positions(), spacer_positions_, start(), and start_.
Returns true if the given Sequence object is equal to this Sequence object. Tests for string equality of id(), start(), and sequence(), and returns false if any of these are not equal.
References id(), sequence(), spacer_positions(), and start().
| char core::sequence::Sequence::operator[] | ( | core::Size | pos | ) | const |
Returns the character at the given sequence position.
References seq_.
| void core::sequence::Sequence::read_data | ( | std::istream & | in | ) |
Initializes the information in this sequence from the given std::istream. The istream should yield three pieces of information in the following order:
References id(), sequence(), and start().
Referenced by core::sequence::operator>>().
|
virtual |
initializes this sequence object from a file.
Reimplemented in core::sequence::SequenceProfile, core::sequence::ChemicalShiftSequence, and core::sequence::SequenceCoupling.
|
virtual |
References length(), and sequence().
| core::Size core::sequence::Sequence::resnum | ( | core::Size | idx | ) | const |
| void core::sequence::Sequence::sequence | ( | std::string | sequence | ) |
sets sequence to the given value.
References seq_, and sequence().
Referenced by protocols::splice::concatenate_profiles(), core::sequence::SequenceProfile::generate_from_sequence(), protocols::splice::SpliceManager::generate_profile_from_seq(), core::sequence::CompositeSequence::operator=(), operator=(), operator==(), protocols::indexed_structure_store::movers::SegmentSequenceProfileMover::to_sequence_profile(), and protocols::indexed_structure_store::movers::SegmentSequenceProfileMover::write_profile().
| string core::sequence::Sequence::sequence | ( | ) | const |
Returns the full sequence, which may include gaps.
References seq_.
Referenced by core::sequence::CompositeSequence::add_sequence(), core::sequence::ChemicalShiftSequence::ChemicalShiftSequence(), delete_position(), core::sequence::SequenceProfile::generate_from_sequence(), insert_char(), core::sequence::CompositeSequence::operator=(), operator==(), read_data(), core::sequence::SequenceProfile::read_from_checkpoint(), core::sequence::ChemicalShiftSequence::read_from_file(), core::sequence::SequenceProfile::read_from_file(), replace_char(), Sequence(), sequence(), and to_string().
| void core::sequence::Sequence::spacer_positions | ( | utility::vector1< Size > const & | spacer_positions | ) |
sets spacer_positions to the given value.
References spacer_positions_.
Referenced by operator=(), and operator==().
| utility::vector1< Size > core::sequence::Sequence::spacer_positions | ( | ) | const |
Returns the spacer positions (chain breaks, e.g., from spaces or commas in original sequence text)
References spacer_positions_.
Referenced by operator==().
| void core::sequence::Sequence::start | ( | core::Size | new_start | ) |
sets starting index to the given value.
References start_.
Referenced by core::sequence::CompositeSequence::operator=(), operator=(), and operator==().
| core::Size core::sequence::Sequence::start | ( | ) | const |
Returns the start of this object.
References start_.
Referenced by core::sequence::ChemicalShiftSequence::ChemicalShiftSequence(), core::sequence::SequenceProfile::delete_position(), core::sequence::CompositeSequence::operator=(), operator==(), read_data(), resnum(), and to_string().
|
virtual |
Reimplemented in core::sequence::CompositeSequence.
References protocols::comparative_modeling::features::A, core::chemical::element::I, sequence(), and start().
Referenced by core::sequence::operator<<(), and core::sequence::CompositeSequence::to_string().
|
virtual |
Reimplemented in core::sequence::SequenceProfile, core::sequence::CompositeSequence, and core::sequence::SequenceCoupling.
| Size core::sequence::Sequence::ungapped_length | ( | ) | const |
Returns the number of characters in this object, ignoring gaps.
References ungapped_sequence().
| string core::sequence::Sequence::ungapped_sequence | ( | ) | const |
Returns the string representing this sequence without gaps.
References is_gap(), and length().
Referenced by ungapped_length().
|
friend |
Prints the information a given Sequence object to the given std::ostream.
|
friend |
Prints the information a given Sequence object to the given std::ostream.
|
friend |
|
private |
Referenced by gap_char(), is_gap(), and operator=().
|
private |
Referenced by id(), operator=(), and Sequence().
|
private |
Referenced by append_char(), append_gap(), length(), operator=(), operator[](), and sequence().
|
private |
Referenced by operator=(), and spacer_positions().
|
private |
Referenced by operator=(), and start().
1.8.7