Rosetta
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
core::id::SequenceMapping Class Reference

#include <SequenceMapping.hh>

Inheritance diagram for core::id::SequenceMapping:
Inheritance graph
[legend]

Public Member Functions

 SequenceMapping ()
 ctor More...
 
 SequenceMapping (Size const s1, Size const s2)
 ctor More...
 
 SequenceMapping (utility::vector1< Size > const &mapping)
 ctor More...
 
 SequenceMapping (conformation::signals::LengthEvent const &event)
 convenience constructor from LengthEvent More...
 
 ~SequenceMapping () override
 dtor More...
 
 SequenceMapping (SequenceMapping const &src)
 copy constructor More...
 
SequenceMappingoperator= (SequenceMapping const &src)
 
Size get_corresponding_residue_in_current (Size original_resnum) const
 A->B; Get the corresponding (new) resnum (B) from the old (A). More...
 
Size operator[] (Size const pos1) const
 A->B; Get a list of the old residues contained in this class (all A residues). More...
 
Sizeoperator[] (Size const pos1)
 
void resize (Size const s1, Size const s2, bool clear_values=true)
 resize More...
 
void reverse ()
 go from an A->B mapping to a B->A mapping More...
 
void downstream_combine (core::id::SequenceMapping const &smap_to_add)
 Apply a B->C mapping to the current A->B mapping to get an A->C mapping i.e. smap[j] becomes smap_to_add[ smap[j] ]. More...
 
void upstream_combine (core::id::SequenceMapping const &smap_to_add)
 Apply a C->A mapping to the current A->B mapping to get a C->B mapping i.e. smap[j] becomes smap[ smap_to_add[ j ] ]. More...
 
Size size1 () const
 size of target sequence More...
 
Size size2 () const
 size of aligned sequence ??? More...
 
void set_offset (int setting)
 
bool all_aligned () const
 
bool is_identity () const
 
bool is_identity_ignore_gaps () const
 
void size2 (Size const s2)
 
void push_back (Size const al)
 
void delete_source_residue (Size const pos1)
 
void show () const
 
void show (std::ostream &output) const
 
void insert_source_residue (Size const pos1)
 
void insert_aligned_residue (Size const pos1, Size const pos2)
 
void insert_aligned_residue_safe (Size const pos1, Size const pos2)
 same as insert_aligned_residue, but a couple of extra checks on size1 and size2. More...
 
void insert_target_residue (Size const pos)
 
void delete_target_residue (Size const pos)
 
void clear ()
 
virtual bool operator== (SequenceMapping const &rhs) const
 Equality operator. More...
 
virtual bool same_type_as_me (SequenceMapping const &other) const
 virtual function for ensuring both sequence mappings are the same type; essential for a valid equality operator. More...
 
utility::vector1< core::Size > const & mapping () const
 
void mapping (utility::vector1< core::Size > const &mapping)
 
std::string to_string () const
 

Static Public Member Functions

static SequenceMapping identity (Size const size)
 Construct an identity mapping, which means that for all positions, i in seq1 maps to i in seq2. More...
 

Private Attributes

Size size2_
 
utility::vector1< Sizemapping_
 

Constructor & Destructor Documentation

◆ SequenceMapping() [1/5]

core::id::SequenceMapping::SequenceMapping ( )
inline

ctor

◆ SequenceMapping() [2/5]

core::id::SequenceMapping::SequenceMapping ( Size const  s1,
Size const  s2 
)
inline

ctor

◆ SequenceMapping() [3/5]

core::id::SequenceMapping::SequenceMapping ( utility::vector1< Size > const &  mapping)

ctor

◆ SequenceMapping() [4/5]

core::id::SequenceMapping::SequenceMapping ( conformation::signals::LengthEvent const &  event)

◆ ~SequenceMapping()

core::id::SequenceMapping::~SequenceMapping ( )
overridedefault

dtor

◆ SequenceMapping() [5/5]

core::id::SequenceMapping::SequenceMapping ( SequenceMapping const &  src)

copy constructor

Member Function Documentation

◆ all_aligned()

bool core::id::SequenceMapping::all_aligned ( ) const

◆ clear()

void core::id::SequenceMapping::clear ( )

References mapping_, and size2_.

Referenced by core::sequence::read_alignment_file().

◆ delete_source_residue()

void core::id::SequenceMapping::delete_source_residue ( Size const  pos1)

◆ delete_target_residue()

void core::id::SequenceMapping::delete_target_residue ( Size const  pos)

◆ downstream_combine()

void core::id::SequenceMapping::downstream_combine ( core::id::SequenceMapping const &  smap_to_add)

Apply a B->C mapping to the current A->B mapping to get an A->C mapping i.e. smap[j] becomes smap_to_add[ smap[j] ].

References mapping_, size2(), and size2_.

Referenced by core::id::combine_sequence_mappings().

◆ get_corresponding_residue_in_current()

Size core::id::SequenceMapping::get_corresponding_residue_in_current ( Size  original_resnum) const

◆ identity()

static SequenceMapping core::id::SequenceMapping::identity ( Size const  size)
inlinestatic

◆ insert_aligned_residue()

void core::id::SequenceMapping::insert_aligned_residue ( Size const  pos1,
Size const  pos2 
)

◆ insert_aligned_residue_safe()

void core::id::SequenceMapping::insert_aligned_residue_safe ( Size const  pos1,
Size const  pos2 
)

◆ insert_source_residue()

void core::id::SequenceMapping::insert_source_residue ( Size const  pos1)

◆ insert_target_residue()

void core::id::SequenceMapping::insert_target_residue ( Size const  pos)

◆ is_identity()

bool core::id::SequenceMapping::is_identity ( ) const

◆ is_identity_ignore_gaps()

bool core::id::SequenceMapping::is_identity_ignore_gaps ( ) const

References identity(), mapping_, and size1().

◆ mapping() [1/2]

utility::vector1< core::Size > const& core::id::SequenceMapping::mapping ( ) const
inline

◆ mapping() [2/2]

void core::id::SequenceMapping::mapping ( utility::vector1< core::Size > const &  mapping)
inline

References mapping(), and mapping_.

◆ operator=()

SequenceMapping & core::id::SequenceMapping::operator= ( SequenceMapping const &  src)

References mapping(), mapping_, size2(), and size2_.

◆ operator==()

bool core::id::SequenceMapping::operator== ( SequenceMapping const &  rhs) const
virtual

Equality operator.

References mapping_, same_type_as_me(), and size2_.

◆ operator[]() [1/2]

Size & core::id::SequenceMapping::operator[] ( Size const  pos1)

References mapping_.

◆ operator[]() [2/2]

Size core::id::SequenceMapping::operator[] ( Size const  pos1) const

A->B; Get a list of the old residues contained in this class (all A residues).

References mapping_.

◆ push_back()

void core::id::SequenceMapping::push_back ( Size const  al)

◆ resize()

void core::id::SequenceMapping::resize ( Size const  s1,
Size const  s2,
bool  clear_values = true 
)

resize

Parameters
[in]s1new size of the target sequence
[in]s2new size of the aligned sequence
[in]clear_valuesoptional parameter, defaults to true. By default, reset mapping to empty. Cases where passing clear_values as false is desired should be rare.

References mapping_, and size2_.

Referenced by protocols::rbsegment_relax::setup_pose_from_rbsegs().

◆ reverse()

void core::id::SequenceMapping::reverse ( )

◆ same_type_as_me()

bool core::id::SequenceMapping::same_type_as_me ( SequenceMapping const &  other) const
virtual

virtual function for ensuring both sequence mappings are the same type; essential for a valid equality operator.

Referenced by operator==().

◆ set_offset()

void core::id::SequenceMapping::set_offset ( int  setting)

◆ show() [1/2]

void core::id::SequenceMapping::show ( ) const

◆ show() [2/2]

void core::id::SequenceMapping::show ( std::ostream &  output) const

References mapping_, and size1().

◆ size1()

Size core::id::SequenceMapping::size1 ( ) const

◆ size2() [1/2]

Size core::id::SequenceMapping::size2 ( ) const

◆ size2() [2/2]

void core::id::SequenceMapping::size2 ( Size const  s2)

References size2_.

◆ to_string()

std::string core::id::SequenceMapping::to_string ( ) const

◆ upstream_combine()

void core::id::SequenceMapping::upstream_combine ( core::id::SequenceMapping const &  smap_to_add)

Apply a C->A mapping to the current A->B mapping to get a C->B mapping i.e. smap[j] becomes smap[ smap_to_add[ j ] ].

References mapping(), and mapping_.

Member Data Documentation

◆ mapping_

utility::vector1< Size > core::id::SequenceMapping::mapping_
private

◆ size2_

Size core::id::SequenceMapping::size2_
private

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