ajbase.c

Datatypes:
none Base


Datatype: none

Function is for manipulating nucleotide base codes

Sections:
character conversionCasts
ComplementGeneral use
binary conversionCasts
queryGeneral use
retrievalGeneral use
Doublet namesCasts
exitMiscellaneous


Section: character conversion

Functions converting binary forms of base codes

Functions:
ajBaseAlphaCompareReturns an element of the base match probability array
ajBaseAlphaToBinReturns a binary OR'd representation of an IUB base where A=1, C=2, G=4 and T=8 Uses the base table set up by daseInit


Function ajBaseAlphaCompare

Returns an element of the base match probability array

Prototype

float ajBaseAlphaCompare (
      ajint base,
      ajint base2
);

TypeNameRead/WriteDescription
ajintbaseInputFirst base offset
ajintbase2InputSecond base offset
float RETURNBase probability value

From EMBOSS 6.0.0


Function ajBaseAlphaToBin

Returns a binary OR'd representation of an IUB base where A=1, C=2, G=4 and T=8 Uses the base table set up by daseInit

Prototype

ajint ajBaseAlphaToBin (
      ajint base
);

TypeNameRead/WriteDescription
ajintbaseInputcharacter to convert
ajint RETURNBinary OR'd representation

From EMBOSS 6.0.0


Function ajBaseAlphacharCompare

Check ambiguity codes (IUB) to estimate the distance score.

Prototype

float ajBaseAlphacharCompare (
      char c,
      char c2
);

TypeNameRead/WriteDescription
charcInputFirst base to compare
charc2InputSecond base to compare
float RETURNestimated match

From EMBOSS 6.0.0


Function ajBaseAlphacharToBin

Returns a binary OR'd representation of an IUB base where A=1, C=2, G=4 and T=8 Uses the base table set up by baseInit

Prototype

char ajBaseAlphacharToBin (
      char c
);

TypeNameRead/WriteDescription
charcInputcharacter to convert
char RETURNBinary OR'd representation

From EMBOSS 6.0.0


Section: Complement

Functions complementing nucleotide base codes

Functions:
ajBaseAlphacharCompComplements a nucleotide base.


Function ajBaseAlphacharComp

Complements a nucleotide base.

Prototype

char ajBaseAlphacharComp (
      char c
);

TypeNameRead/WriteDescription
charcInputBase character.
char RETURNComplementary base.

From EMBOSS 6.0.0


Section: binary conversion

Functions converting binary forms of base codes

Functions:
ajBaseBinToAlphaConverts a binary OR'd representation of an IUB base where A=1, C=2, G=4 and T=8 into an ambiguous DNA base code (uses T rather than U).


Function ajBaseBinToAlpha

Converts a binary OR'd representation of an IUB base where A=1, C=2, G=4 and T=8 into an ambiguous DNA base code (uses T rather than U).

Prototype

char ajBaseBinToAlpha (
      ajint c
);

TypeNameRead/WriteDescription
ajintcInputcharacter to convert
char RETURNAmbiguous DNA base code

From EMBOSS 6.0.0


Section: query

Functions

Functions:
ajBaseExistsBinTests whether a base code exists
ajBaseExistsCharTests whether a base code exists


Function ajBaseExistsBin

Tests whether a base code exists

Prototype

AjBool ajBaseExistsBin (
      ajint base
);

TypeNameRead/WriteDescription
ajintbaseInputBase code in range 0 to 31
AjBool RETURNTrue if base code is known

From EMBOSS 6.0.0


Function ajBaseExistsChar

Tests whether a base code exists

Prototype

AjBool ajBaseExistsChar (
      char c
);

TypeNameRead/WriteDescription
charcInputBase character
AjBool RETURNTrue if base code is known

From EMBOSS 6.0.0


Section: retrieval

Functions

Functions:
ajBaseGetCodesReturns a string of matching base codes
ajBaseGetMnemonicReturns a string of matching base codes


Function ajBaseGetCodes

Returns a string of matching base codes

Prototype

const AjPStr ajBaseGetCodes (
      ajint base
);

TypeNameRead/WriteDescription
ajintbaseInputOriginal base code
const AjPStr RETURNBase codes

From EMBOSS 6.0.0


Function ajBaseGetMnemonic

Returns a string of matching base codes

Prototype

const AjPStr ajBaseGetMnemonic (
      ajint base
);

TypeNameRead/WriteDescription
ajintbaseInputOriginal base code
const AjPStr RETURNBase codes

From EMBOSS 6.0.0


Section: Doublet names

Functions exchanging residue codes with PDB two letter codes

Functions:
ajBaseFromDoubletTakes a 2 character PDB base code and writes a char with the corresponding single letter code.


Function ajBaseFromDoublet

Takes a 2 character PDB base code and writes a char with the corresponding single letter code.

Prototype

AjBool ajBaseFromDoublet (
      const AjPStr nuc2,
      char* Pc
);

TypeNameRead/WriteDescription
const AjPStrnuc2InputAjPStr object (2 letter code)
char*PcOutputResulting residue code
AjBool RETURNTrue on success, false if doublet is not recognised

From EMBOSS 6.1.0


Section: exit

Functions called on exit from the program by ajExit to do any necessary cleanup and to report internal statistics to the debug file

Functions:
ajBaseExitCleans up sequence base and residue processing internal memory


Function ajBaseExit

Cleans up sequence base and residue processing internal memory

Prototype

void ajBaseExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 4.0.0


Section: character conversion

Functions converting binary forms of amino acid residue codes

Functions:
ajResidueAlphaToBinReturns a binary OR'd representation of an IUB residue where A=1, C=2, Uses the base table set up by residueInit


Function ajResidueAlphaToBin

Returns a binary OR'd representation of an IUB residue where A=1, C=2, Uses the base table set up by residueInit

Prototype

ajint ajResidueAlphaToBin (
      ajint base
);

TypeNameRead/WriteDescription
ajintbaseInputcharacter to convert
ajint RETURNBinary OR'd representation

From EMBOSS 6.0.0


Section: binary conversion

Functions converting binary forms of base codes

Functions:
ajResidueBinToAlphaConverts a binary OR'd representation of an IUB residue where A=1, C=2, etc into an ambiguous protein code


Function ajResidueBinToAlpha

Converts a binary OR'd representation of an IUB residue where A=1, C=2, etc into an ambiguous protein code

Prototype

char ajResidueBinToAlpha (
      ajint c
);

TypeNameRead/WriteDescription
ajintcInputcharacter to convert
char RETURNAmbiguous residue code

From EMBOSS 6.0.0


Section: query

Functions

Functions:
ajResidueExistsBinTests whether a residue code exists
ajResidueExistsCharTests whether a residue code exists


Function ajResidueExistsBin

Tests whether a residue code exists

Prototype

AjBool ajResidueExistsBin (
      ajint base
);

TypeNameRead/WriteDescription
ajintbaseInputBase code in range 0 to 31
AjBool RETURNTrue if base code is known

From EMBOSS 6.0.0


Function ajResidueExistsChar

Tests whether a residue code exists

Prototype

AjBool ajResidueExistsChar (
      char c
);

TypeNameRead/WriteDescription
charcInputBase character
AjBool RETURNTrue if base code is known

From EMBOSS 6.0.0


Section: retrieval

Functions

Functions:
ajResidueGetCodesReturns a string of matching amino acid residue codes
ajResidueGetMnemonicReturns a string of matching amino acid residue codes


Function ajResidueGetCodes

Returns a string of matching amino acid residue codes

Prototype

const AjPStr ajResidueGetCodes (
      ajint base
);

TypeNameRead/WriteDescription
ajintbaseInputOriginal base code
const AjPStr RETURNBase codes

From EMBOSS 6.0.0


Function ajResidueGetMnemonic

Returns a string of matching amino acid residue codes

Prototype

const AjPStr ajResidueGetMnemonic (
      ajint base
);

TypeNameRead/WriteDescription
ajintbaseInputOriginal base code
const AjPStr RETURNBase codes

From EMBOSS 6.0.0


Section: Triplet names

Functions exchanging residue codes with three letter codes

Functions:
ajResidueFromTripletTakes a 3 character amino acid code and writes a char with the corresponding single letter code.
ajResidueToTripletWrites an AjPStr with an amino acid 3 letter code


Function ajResidueFromTriplet

Takes a 3 character amino acid code and writes a char with the corresponding single letter code.

Prototype

AjBool ajResidueFromTriplet (
      const AjPStr aa3,
      char* Pc
);

TypeNameRead/WriteDescription
const AjPStraa3InputAjPStr object (3 letter code)
char*PcOutputResulting residue code
AjBool RETURNTrue on success, false if triplet is not recognised

From EMBOSS 6.0.0


Function ajResidueToTriplet

Writes an AjPStr with an amino acid 3 letter code

Prototype

AjBool ajResidueToTriplet (
      char c,
      AjPStr* Paa3
);

TypeNameRead/WriteDescription
charcInputSingle letter identifier of amino acid
AjPStr*Paa3OutputAjPStr object
AjBool RETURNTrue on success

From EMBOSS 6.0.0


Section: Conversion

Functions:
ajBasecodeFromIntReturns 'A' for 0 to 'Z' for 25
ajBasecodeToIntReturns A=0 to Z=25 or 27 otherwise


Function ajBasecodeFromInt

Returns 'A' for 0 to 'Z' for 25

Prototype

ajint ajBasecodeFromInt (
      ajint n
);

TypeNameRead/WriteDescription
ajintnInputcharacter to convert
ajint RETURN0 as 'A' up to 25 as 'Z'

From EMBOSS 6.0.0


Function ajBasecodeToInt

Returns A=0 to Z=25 or 27 otherwise

Prototype

ajint ajBasecodeToInt (
      ajint c
);

TypeNameRead/WriteDescription
ajintcInputcharacter to convert
ajint RETURNA=0 to Z=25 or 27 if unknown

From EMBOSS 6.0.0