BALL  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
BALL::NucleotideMapping Class Reference

#include <BALL/STRUCTURE/nucleotideMapping.h>

Public Types

typedef std::pair< const
std::string, const std::string > 
Alignment
 

Public Member Functions

 NucleotideMapping ()
 
Accessors
ChaingetFirstStrand () const
 
ChaingetSecondStrand () const
 
ResiduefirstToSecond (Residue *a) const
 
ResiduesecondToFirst (Residue *b) const
 

Static Public Member Functions

Factory methods
static NucleotideMapping assignNaively (Chain &a, Chain &b, unsigned int offset_a=0, unsigned int offset_b=0)
 
static NucleotideMapping assignFromDistances (Chain &a, Chain &b)
 
static NucleotideMapping assignFromAlignment (Chain &a, Chain &b, const Alignment &alignment)
 

Private Types

typedef HashMap< Residue
*, Residue * > 
NucleotideMap
 

Private Member Functions

 NucleotideMapping (Chain &a, Chain &b, const NucleotideMap &a_to_b, const NucleotideMap &b_to_a)
 

Private Attributes

Chaina_
 
Chainb_
 
NucleotideMap a_to_b_
 
NucleotideMap b_to_a_
 

Detailed Description

This class defines the mapping between complementary bases in to strands of DNA. Ideally this should be tightly coupled with NucleicAcid, however as this is currently broken this class has to do the job. This also explains why a Chain is required as an input.

Definition at line 21 of file nucleotideMapping.h.

Member Typedef Documentation

typedef std::pair<const std::string, const std::string> BALL::NucleotideMapping::Alignment

Definition at line 24 of file nucleotideMapping.h.

Definition at line 106 of file nucleotideMapping.h.

Constructor & Destructor Documentation

BALL::NucleotideMapping::NucleotideMapping ( )
BALL::NucleotideMapping::NucleotideMapping ( Chain a,
Chain b,
const NucleotideMap a_to_b,
const NucleotideMap b_to_a 
)
private

Member Function Documentation

static NucleotideMapping BALL::NucleotideMapping::assignFromAlignment ( Chain a,
Chain b,
const Alignment alignment 
)
static

Construct a NucleotideMapping given a sequence alignment of the strands. Note that residue names are not actually checked, but rather any pair of characters different from '-' are considered as an instruction to align the next bases. E.g: for the sequences ATGC and TCCG this would be a valid input:

*-*** **-**

Also the alignment does not need to cover the full length of the sequences. The assignment process simply stops when the end of the alignment is reached.

Parameters
aThe first nucleic acid, it is assumed that it is available in 5' -> 3' order.
bThe second nucleic acid, it is assumed that it is available in 5' -> 3' order.
alignmentA pair of strings defining the mapping between the two strands. it may only consist of the characters forming the respective abbreviation of the bases and '-' for gaps.
static NucleotideMapping BALL::NucleotideMapping::assignFromDistances ( Chain a,
Chain b 
)
static

This method tries to reconstruct the base complementarity information by looking at the atom distances between the two nucleic acids. Ă„ote that this can fail if the strands are strongly deformed.

Parameters
aThe first nucleic acid, it is assumed that it is available in 5' -> 3' order.
bThe second nucleic acid, it is assumed that it is available in 5' -> 3' order.
static NucleotideMapping BALL::NucleotideMapping::assignNaively ( Chain a,
Chain b,
unsigned int  offset_a = 0,
unsigned int  offset_b = 0 
)
static

This method constructs a Nucleotide mapping by simply assuming, that the first base on the 5' end of a is complementary to the first base on the 3' end of b.

Parameters
aThe first nucleic acid, it is assumed that it is available in 5' -> 3' order.
bThe second nucleic acid, it is assumed that it is available in 5' -> 3' order.
offset_astart matching at the base in strand a with index offset_a instead of 0
offset_bstart matching at the base in strand b with index offset_b instead of 0
Residue* BALL::NucleotideMapping::firstToSecond ( Residue a) const

Given a nucleotide a located in the first strand. This method returns the nucleotide complementary to a located in the second strand. First and second refers to the order the strands were passed in at creation time.

Returns
If a is not mapped, either because it is not member of the first strand or because it has no complementary base 0 is returned
Chain* BALL::NucleotideMapping::getFirstStrand ( ) const

Get a pointer to the first DNA strand

Chain* BALL::NucleotideMapping::getSecondStrand ( ) const

Get a pointer to the second DNA strand

Residue* BALL::NucleotideMapping::secondToFirst ( Residue b) const

Given a nucleotide b located in the second strand. This method returns the nucleotide complementary to b located in the first strand. First and second refers to the order the strands were passed in at creation time.

Returns
If a is not mapped, either because it is not member of the first strand or because it has no complementary base NULL is returned

Member Data Documentation

Chain* BALL::NucleotideMapping::a_
private

Definition at line 109 of file nucleotideMapping.h.

NucleotideMap BALL::NucleotideMapping::a_to_b_
private

Definition at line 112 of file nucleotideMapping.h.

Chain* BALL::NucleotideMapping::b_
private

Definition at line 110 of file nucleotideMapping.h.

NucleotideMap BALL::NucleotideMapping::b_to_a_
private

Definition at line 113 of file nucleotideMapping.h.