The proto-Nucleic-Acid Builder (pNAB)
Public Member Functions | Private Attributes | List of all members
PNAB::Bases Class Reference

A class that contains a vector of all the defined bases and a funtion to return a base and the complimentary base for all the bases defined. More...

#include <Containers.h>

Public Member Functions

 Bases (std::vector< Base > input_bases)
 Basic constructor for the Bases. More...
 
 Bases ()
 Empty constructor. More...
 
PNAB::Base getBaseFromName (std::string name)
 Returns the Base instance given the name of the base. More...
 
std::vector< BasegetBasesFromStrand (std::vector< std::string > strand)
 Returns the vector of the instances of Base given the names of the bases in the strand. More...
 
std::vector< BasegetComplimentBasesFromStrand (std::vector< std::string > strand)
 Returns the complimentary vector of the instances of Base given the names of the bases in the strand. More...
 

Private Attributes

std::vector< Basebases
 The vector of bases. More...
 
bool all_bases_pair
 Whether all the bases in the strand have complimentary bases. More...
 
std::map< std::string, PNAB::Basename_base_map
 A map of the names of the bases and the complimentary bases. More...
 

Detailed Description

A class that contains a vector of all the defined bases and a funtion to return a base and the complimentary base for all the bases defined.

See also
Base

Constructor & Destructor Documentation

◆ Bases() [1/2]

Bases::Bases ( std::vector< Base input_bases)

Basic constructor for the Bases.

The given bases are processed to create a vector of the defined bases and a vector of the complimentary bases. This calls Base to make sure the given bases have Openbabel molecules

Parameters
input_basesThe vector containing the information about the bases needed

◆ Bases() [2/2]

PNAB::Bases::Bases ( )
inline

Empty constructor.

Member Function Documentation

◆ getBaseFromName()

PNAB::Base PNAB::Bases::getBaseFromName ( std::string  name)
inline

Returns the Base instance given the name of the base.

Parameters
namename of the base
Returns
the base

◆ getBasesFromStrand()

std::vector< Base > Bases::getBasesFromStrand ( std::vector< std::string >  strand)

Returns the vector of the instances of Base given the names of the bases in the strand.

Parameters
strandvector of base names in the strand
Returns
vector of bases in the strand
See also
Chain::Chain

◆ getComplimentBasesFromStrand()

std::vector< Base > Bases::getComplimentBasesFromStrand ( std::vector< std::string >  strand)

Returns the complimentary vector of the instances of Base given the names of the bases in the strand.

Parameters
strandvector of base names in the strand
Returns
vector of bases in the complimentary strand
See also
Chain::Chain

Member Data Documentation

◆ all_bases_pair

bool PNAB::Bases::all_bases_pair
private

Whether all the bases in the strand have complimentary bases.

◆ bases

std::vector<Base> PNAB::Bases::bases
private

The vector of bases.

◆ name_base_map

std::map<std::string, PNAB::Base> PNAB::Bases::name_base_map
private

A map of the names of the bases and the complimentary bases.


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