The DNA namespace contains the object to represent nucleotide, nucleotide chain, similarity matrix, second structures, codons, amino acids.
#include <faif/dna/Chain.h>
#include <faif/dna/EnergyNucleo.h>
#include <faif/dna/FoldedChain.h>
using namespace faif::dna;
Chain x("AAAAAAGGGTTTTTT"); //dna chain
EnergyNucleo energy = createDefaultEnergy(); //the energy matrix
//the default values are 2 for A-T, 3 for G-C
energy.getEnergy( Nucleotide(ADENINE), Nucleotide(THYMINE) ) == 2;
FoldedChain folded(chain,energy );
int m = folded.getSecStructEnergy(); //the maximum energy
SecStructures result = folded.getStructures(); //the structures
The second structures for two strands (using Nussinov algorithm):
#include <faif/dna/Chain.h>
#include <faif/dna/EnergyNucleo.h>
#include <faif/dna/FoldedChain.h>
using namespace faif::dna;
EnergyNucleo energy = createDefaultEnergy();
FoldedPair p( Chain(string("AAAAAGGG")), Chain(string("GGGTTTTT")), energy, 10 ); //maximum 10 second structures
if(p.getStructures().size() > 0)
const SecStruct& result_struct = *(p.getStructures().begin() ); //get the first structure
The codon to amino tables
#include <faif/dna/Codon.h>
#include <faif/dna/CodonAminoTable.h>
using namespace faif::dna;
Codon cod1("AAA");
CodonAminoTable& table = CodonAminoTable::getInstance();
AminoAcid a = table.getAmino( cod1 ); //read the amino for codon
set c = table.getCodons( PHENYLALANINE ); //read the codons for amino
return to the main page