Loading...
Searching...
No Matches
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
Chain * | getFirstStrand () const
Chain * | getSecondStrand () const
Residue * | firstToSecond (Residue *a) const
Residue * | secondToFirst (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)

## 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

## Alignment

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

Definition at line 24 of file nucleotideMapping.h.

## Constructor & Destructor Documentation

## NucleotideMapping()

BALL::NucleotideMapping::NucleotideMapping | ( |  | ) |

## Member Function Documentation

## assignFromAlignment()

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

  a | The first nucleic acid, it is assumed that it is available in 5' -> 3' order.
  b | The second nucleic acid, it is assumed that it is available in 5' -> 3' order.
  alignment | A 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.

## assignFromDistances()

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

  a | The first nucleic acid, it is assumed that it is available in 5' -> 3' order.
  b | The second nucleic acid, it is assumed that it is available in 5' -> 3' order.

## assignNaively()

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

  a | The first nucleic acid, it is assumed that it is available in 5' -> 3' order.
  b | The second nucleic acid, it is assumed that it is available in 5' -> 3' order.
  offset_a | start matching at the base in strand a with index offset_a instead of 0
  offset_b | start matching at the base in strand b with index offset_b instead of 0

## firstToSecond()

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

## getFirstStrand()

Chain * BALL::NucleotideMapping::getFirstStrand | ( |  | ) | const

Get a pointer to the first DNA strand

## getSecondStrand()

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

Get a pointer to the second DNA strand

## secondToFirst()

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