|
Rosetta 3.5
|
#include <Sequence.hh>


Public Member Functions | |
| Sequence () | |
| ctor More... | |
| Sequence (std::string seq, std::string id, core::Size start=1) | |
| Sequence (core::pose::Pose const &pose) | |
| Sequence (Sequence const &src) | |
| copy constructor. More... | |
| virtual | ~Sequence () |
| 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 | 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... | |
| 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... | |
| 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_ |
| 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) |
Definition at line 39 of file Sequence.hh.
|
inline |
|
inline |
Definition at line 45 of file Sequence.hh.
References sequence().
| core::sequence::Sequence::Sequence | ( | core::pose::Pose const & | pose) |
Definition at line 41 of file Sequence.cc.
References id_, core::pose::Pose::pdb_info(), sequence(), and core::pose::Pose::sequence().
|
inline |
copy constructor.
Definition at line 56 of file Sequence.hh.
|
virtual |
dtor
Definition at line 53 of file Sequence.cc.
| void core::sequence::Sequence::append_char | ( | char | new_char) |
| void core::sequence::Sequence::append_gap | ( | ) |
| char core::sequence::Sequence::at | ( | core::Size | pos) | const |
Definition at line 123 of file Sequence.cc.
|
virtual |
Returns an owning pointer to a copy of this sequence.
Reimplemented in core::sequence::SequenceProfile, core::sequence::ChemicalShiftSequence, and core::sequence::CompositeSequence.
Definition at line 55 of file Sequence.cc.
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.
Definition at line 142 of file Sequence.cc.
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.
Definition at line 80 of file Sequence.cc.
References gap_char_.
Referenced by core::sequence::SequenceCoupling::operator=(), core::sequence::CompositeSequence::operator=(), core::sequence::ChemicalShiftSequence::operator=(), core::sequence::SequenceProfile::operator=(), and operator=().
| char core::sequence::Sequence::gap_char | ( | ) | const |
Returns the character used to represent a gap for this object.
Definition at line 92 of file Sequence.cc.
References gap_char_.
Referenced by core::sequence::CompositeSequence::add_sequence(), append_gap(), insert_gap(), core::sequence::SequenceCoupling::operator=(), core::sequence::CompositeSequence::operator=(), core::sequence::ChemicalShiftSequence::operator=(), and core::sequence::SequenceProfile::operator=().
| void core::sequence::Sequence::id | ( | std::string | new_id) |
sets id to the given value.
Definition at line 72 of file Sequence.cc.
References id_.
Referenced by operator<(), core::sequence::SequenceCoupling::operator=(), core::sequence::CompositeSequence::operator=(), core::sequence::ChemicalShiftSequence::operator=(), core::sequence::SequenceProfile::operator=(), operator=(), and operator==().
| std::string core::sequence::Sequence::id | ( | ) | const |
Returns the id of this object.
Definition at line 88 of file Sequence.cc.
References id_.
Referenced by core::sequence::CompositeSequence::add_sequence(), core::sequence::ChemicalShiftSequence::ChemicalShiftSequence(), operator<(), core::sequence::SequenceCoupling::operator=(), core::sequence::CompositeSequence::operator=(), core::sequence::ChemicalShiftSequence::operator=(), core::sequence::SequenceProfile::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.
Definition at line 130 of file Sequence.cc.
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.
Definition at line 152 of file Sequence.cc.
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.
Definition at line 164 of file Sequence.cc.
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.
Definition at line 96 of file Sequence.cc.
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<<(), resnum(), core::sequence::SequenceProfile::SequenceProfile(), and ungapped_sequence().
assignment operator.
Definition at line 119 of file Sequence.hh.
References gap_char(), gap_char_, id(), id_, seq_, sequence(), 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.
Definition at line 141 of file Sequence.hh.
References id(), sequence(), and start().
| char core::sequence::Sequence::operator[] | ( | core::Size | pos) | const |
Returns the character at the given sequence position.
Definition at line 117 of file Sequence.cc.
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:
Definition at line 185 of file Sequence.cc.
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.
Definition at line 61 of file Sequence.cc.
| core::Size core::sequence::Sequence::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.
Definition at line 171 of file Sequence.cc.
| void core::sequence::Sequence::sequence | ( | std::string | sequence) |
sets sequence to the given value.
Definition at line 68 of file Sequence.cc.
References seq_, and sequence().
Referenced by core::sequence::SequenceProfile::generate_from_sequence(), core::sequence::SequenceCoupling::operator=(), core::sequence::CompositeSequence::operator=(), core::sequence::ChemicalShiftSequence::operator=(), core::sequence::SequenceProfile::operator=(), operator=(), and operator==().
| string core::sequence::Sequence::sequence | ( | ) | const |
Returns the full sequence, which may include gaps.
Definition at line 113 of file Sequence.cc.
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::SequenceCoupling::operator=(), core::sequence::CompositeSequence::operator=(), core::sequence::ChemicalShiftSequence::operator=(), core::sequence::SequenceProfile::operator=(), operator==(), read_data(), core::sequence::SequenceProfile::read_from_checkpoint(), core::sequence::ChemicalShiftSequence::read_from_file(), core::sequence::SequenceProfile::read_from_file(), Sequence(), sequence(), and to_string().
| void core::sequence::Sequence::start | ( | core::Size | new_start) |
sets starting index to the given value.
Definition at line 76 of file Sequence.cc.
References start_.
Referenced by core::sequence::SequenceCoupling::operator=(), core::sequence::CompositeSequence::operator=(), core::sequence::ChemicalShiftSequence::operator=(), core::sequence::SequenceProfile::operator=(), operator=(), and operator==().
| core::Size core::sequence::Sequence::start | ( | ) | const |
Returns the start of this object.
Definition at line 84 of file Sequence.cc.
References start_.
Referenced by core::sequence::ChemicalShiftSequence::ChemicalShiftSequence(), core::sequence::SequenceProfile::delete_position(), core::sequence::SequenceCoupling::operator=(), core::sequence::CompositeSequence::operator=(), core::sequence::ChemicalShiftSequence::operator=(), core::sequence::SequenceProfile::operator=(), operator==(), read_data(), resnum(), and to_string().
|
virtual |
Reimplemented in core::sequence::CompositeSequence.
Definition at line 212 of file Sequence.cc.
References protocols::comparative_modeling::features::A, 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.
Definition at line 223 of file Sequence.cc.
| Size core::sequence::Sequence::ungapped_length | ( | ) | const |
Returns the number of characters in this object, ignoring gaps.
Definition at line 100 of file Sequence.cc.
References ungapped_sequence().
| string core::sequence::Sequence::ungapped_sequence | ( | ) | const |
Returns the string representing this sequence without gaps.
Definition at line 104 of file Sequence.cc.
References is_gap(), and length().
Referenced by ungapped_length().
|
friend |
Prints the information a given Sequence object to the given std::ostream.
Definition at line 196 of file Sequence.cc.
|
friend |
Prints the information a given Sequence object to the given std::ostream.
|
friend |
Definition at line 205 of file Sequence.cc.
|
private |
Definition at line 197 of file Sequence.hh.
Referenced by gap_char(), is_gap(), and operator=().
|
private |
Definition at line 195 of file Sequence.hh.
Referenced by id(), operator=(), and Sequence().
|
private |
Definition at line 199 of file Sequence.hh.
Referenced by append_char(), append_gap(), length(), operator=(), operator[](), and sequence().
|
private |
Definition at line 196 of file Sequence.hh.
Referenced by operator=(), and start().
1.8.4