ajbase.c


Function ajBaseCodes

Returns a string of matching base codes

Synopsis

Prototype
const AjPStr ajBaseCodes (
      ajint ibase
);

TypeNameRead/WriteDescription
ajintibaseInputOriginal base code
const AjPStr RETURNBase codes

Input
ibase:(Input)Original base code
Returns
const AjPStr:Base codes

Description

Returns a string of matching base codes

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 5.0.0

Function ajAZToInt

Returns A=0 to Z=25 or 27 otherwise

Synopsis

Prototype
ajint ajAZToInt (
      ajint c
);

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

Input
c:(Input)character to convert
Returns
ajint:A=0 to Z=25 or 27 if unknown

Description

Returns A=0 to Z=25 or 27 otherwise

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 5.0.0

Function ajIntToAZ

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

Synopsis

Prototype
ajint ajIntToAZ (
      ajint n
);

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

Input
n:(Input)character to convert
Returns
ajint:0 as 'A' up to 25 as 'Z'

Description

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

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 5.0.0

Function ajBinToAZ

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).

Uses the base table set up by ajBaseInit

Synopsis

Prototype
char ajBinToAZ (
      ajint c
);

TypeNameRead/WriteDescription
ajintcInputcharacter to convert
char RETURNAmbiguous DNA base code

Input
c:(Input)character to convert
Returns
char:Ambiguous DNA base code

Description

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).

Uses the base table set up by ajBaseInit

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 5.0.0

Function ajAZToBin

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 ajBaseInit

Synopsis

Prototype
ajint ajAZToBin (
      ajint c
);

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

Input
c:(Input)character to convert
Returns
ajint:Binary OR'd representation

Description

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 ajBaseInit

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 5.0.0

Function ajAZToBinC

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 ajBaseInit

Synopsis

Prototype
char ajAZToBinC (
      char c
);

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

Input
c:(Input)character to convert
Returns
char:Binary OR'd representation

Description

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 ajBaseInit

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 5.0.0

Function ajBaseInit

Sets up binary OR'd representation of an IUB bases in a table aj_base_table where A=1, C=2, G=4 and T=8 Also sets up a match probability array aj_base_prob holding the probability of one IUB base matching any other. Uses the Ebases.iub file Is initialised if necessary from other AJAX functions.

Synopsis

Prototype
AjBool ajBaseInit (
      void
);

TypeNameRead/WriteDescription
AjBool RETURNTrue on success

Returns
AjBool:True on success

Description

Sets up binary OR'd representation of an IUB bases in a table aj_base_table where A=1, C=2, G=4 and T=8 Also sets up a match probability array aj_base_prob holding the probability of one IUB base matching any other. Uses the Ebases.iub file Is initialised if necessary from other AJAX functions.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 5.0.0

Function ajBaseAa1ToAa3

Writes an AjPStr with an amino acid 3 letter code

Synopsis

Prototype
AjBool ajBaseAa1ToAa3 (
      char aa1,
      AjPStr* aa3
);

TypeNameRead/WriteDescription
charaa1InputSingle letter identifier of amino acid
AjPStr*aa3OutputAjPStr object
AjBool RETURNTrue on succcess

Input
aa1:(Input)Single letter identifier of amino acid
Output
aa3:(Output)AjPStr object
Returns
AjBool:True on succcess

Description

Writes an AjPStr with an amino acid 3 letter code

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 5.0.0

Function ajBaseAa3ToAa1

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

Synopsis

Prototype
AjBool ajBaseAa3ToAa1 (
      char* aa1,
      const AjPStr aa3
);

TypeNameRead/WriteDescription
char*aa1OutputSingle letter identifier of amino acid
const AjPStraa3InputAjPStr object (3 letter code)
AjBool RETURNTrue on success

Input
aa3:(Input)AjPStr object (3 letter code)
Output
aa1:(Output)Single letter identifier of amino acid
Returns
AjBool:True on success

Description

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

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 5.0.0

Function ajBaseProb

Returns an element of the base match probability array

Synopsis

Prototype
float ajBaseProb (
      ajint base1,
      ajint base2
);

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

Input
base1:(Input)First base offset
base2:(Input)Second base offset
Returns
float:Base probability value

Description

Returns an element of the base match probability array

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 5.0.0

Function ajBaseComp

Complements a nucleotide base.

Synopsis

Prototype
char ajBaseComp (
      char base
);

TypeNameRead/WriteDescription
charbaseInputBase character.
char RETURNComplementary base.

Input
base:(Input)Base character.
Returns
char:Complementary base.

Description

Complements a nucleotide base.

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 5.0.0

Function ajBaseExit

Cleans up sequence base processing internal memory

Synopsis

Prototype
void ajBaseExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

Returns
void:No return value

Description

Cleans up sequence base processing internal memory

Usage

See source code

Example

In preparation

Errors

See source code

Dependencies

See source code

See Also

See other functions in this section

Availability

In release 5.0.0