ajcod.c
All constructors return a new object by pointer. It is the responsibility
of the user to first destroy any previous object. The target pointer
does not need to be initialised to NULL, but it is good programming practice
to do so anyway.
Default constructor for empty AJAX codon objects.
Synopsis
Prototype
AjPCod ajCodNew (
void
);
Returns
| AjPCod: | Pointer to an codon object |
Description
Default constructor for empty AJAX codon objects.
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 3.0.0
Default constructor for empty AJAX codon usage objects, with the
amino acid assignments taken from a standard genetic code.
Synopsis
Prototype
AjPCod ajCodNewCode (
ajint code
);
Input
| code: | (Input) | Genetic code number |
Returns
| AjPCod: | Pointer to an codon object |
Description
Default constructor for empty AJAX codon usage objects, with the
amino acid assignments taken from a standard genetic 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 3.0.0
Duplicate a codon object
Synopsis
Prototype
AjPCod ajCodDup (
const AjPCod thys
);
Input
| thys: | (Input) | Codon to duplicate |
Returns
| AjPCod: | Pointer to an codon object |
Description
Duplicate a codon object
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 3.0.0
Desctuctor(s) for AjPCod objects
Default destructor for AJAX codon objects.
Synopsis
Prototype
void ajCodDel (
AjPCod* pthys
);
Output
| pthys: | (Output) | codon usage structure |
Returns
Description
Default destructor for AJAX codon objects.
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 3.0.0
Function(s) for AjPCod objects
Backtranslate a string
Synopsis
Prototype
void ajCodBacktranslate (
AjPStr* b,
const AjPStr a,
const AjPCod thys
);
Input
| a: | (Input) | sequence |
| thys: | (Input) | codon usage object |
Output
| b: | (Output) | backtranslated sequence |
Returns
Description
Backtranslate a string
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 3.0.0
Backtranslate a string to a fully ambiguous nucleotide sequence as a string
Synopsis
Prototype
void ajCodBacktranslateAmbig (
AjPStr* b,
const AjPStr a,
const AjPCod thys
);
Input
| a: | (Input) | sequence |
| thys: | (Input) | codon usage object |
Output
| b: | (Output) | backtranslated sequence |
Returns
Description
Backtranslate a string to a fully ambiguous nucleotide sequence as a string
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 3.0.0
Return one codon value given a possibly ambiguous base
Synopsis
Prototype
ajint ajCodBase (
ajint c
);
Input
Returns
Description
Return one codon value given a possibly ambiguous 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 3.0.0
Calculate Gribskov statistic (count per thousand) in AjPCod internals
Synopsis
Prototype
void ajCodCalcGribskov (
AjPCod thys,
const AjPStr s
);
Input
Input & Output
| thys: | (Modify) | codon usage for sequence |
Returns
Description
Calculate Gribskov statistic (count per thousand) in AjPCod internals
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 3.0.0
Calculate effective number of codons
Wright, F. (1990) Gene 87:23-29
Synopsis
Prototype
double ajCodCalcNc (
const AjPCod thys
);
Input
Returns
Description
Calculate effective number of codons
Wright, F. (1990) Gene 87:23-29
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 3.0.0
Calculate fractional and thousand elements of a codon object
Used for creating a codon usage table
Requires pre-running of ajCodCountTriplets
Synopsis
Prototype
void ajCodCalculateUsage (
AjPCod thys,
ajint c
);
Input
Input & Output
| thys: | (Modify) | Codon object |
Returns
Description
Calculate fractional and thousand elements of a codon object
Used for creating a codon usage table
Requires pre-running of ajCodCountTriplets
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 3.0.0
Zero all entries
To retain the genetics code (the amino acids for each codon) use
ajCodClearData instead.
Synopsis
Prototype
void ajCodClear (
AjPCod thys
);
Output
| thys: | (Output) | codon usage structure |
Returns
Description
Zero all entries
To retain the genetics code (the amino acids for each codon) use
ajCodClearData instead.
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 3.0.0
Zero the name, number count and fraction codon entries
Synopsis
Prototype
void ajCodClearData (
AjPCod thys
);
Output
| thys: | (Output) | codon usage structure |
Returns
Description
Zero the name, number count and fraction codon entries
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 3.0.0
Load the num array of a codon structure
Used for creating a codon usage table
Skips triplets with ambiguity codes and any incomplete triplet at the end.
Synopsis
Prototype
void ajCodCountTriplets (
AjPCod thys,
const AjPStr s,
ajint* c
);
Input
Output
| thys: | (Output) | Codon object |
| c: | (Output) | triplet count |
Returns
Description
Load the num array of a codon structure
Used for creating a codon usage table
Skips triplets with ambiguity codes and any incomplete triplet at the end.
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 3.0.0
Return a codon index given a three character codon
Can be called with any coding sequence of 3 or more bases, and will
use only the first 3 bases of the input.
Synopsis
Prototype
ajint ajCodIndex (
const AjPStr s
);
Input
Returns
| ajint: | Codon index AAA=0 TTT=3f |
Description
Return a codon index given a three character codon
Can be called with any coding sequence of 3 or more bases, and will
use only the first 3 bases of the input.
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 3.0.0
Return a codon index given a three character codon
Can be called with any coding sequence of 3 or more bases, and will
use only the first 3 bases of the input.
Synopsis
Prototype
ajint ajCodIndexC (
const char* codon
);
Input
| codon: | (Input) | Codon pointer |
Returns
| ajint: | codon index AAA=0 TTT=3f |
Description
Return a codon index given a three character codon
Can be called with any coding sequence of 3 or more bases, and will
use only the first 3 bases of the input.
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 3.0.0
Read a codon index from a filename using a specified format.
The format can be in the format argument, as a prefix format:: to the
filename, or empty to allow all known formats to be tried.
Synopsis
Prototype
AjBool ajCodRead (
AjPCod thys,
const AjPStr fn,
const AjPStr format
);
Input
| fn: | (Input) | filename |
| format: | (Input) | format |
Output
| thys: | (Output) | Codon object |
Returns
Description
Read a codon index from a filename using a specified format.
The format can be in the format argument, as a prefix format:: to the
filename, or empty to allow all known formats to be tried.
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 3.0.0
Fill the codon usage object "back" element with the most commonly
used triplet index for the amino acids
Synopsis
Prototype
void ajCodSetBacktranslate (
AjPCod* thys
);
Input & Output
| thys: | (Modify) | codon usage structure |
Returns
Description
Fill the codon usage object "back" element with the most commonly
used triplet index for the amino acids
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 3.0.0
Convert triplet index to triple
Synopsis
Prototype
char* ajCodTriplet (
ajint idx
);
Input
Returns
Description
Convert triplet index to triple
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 3.0.0
Write codon structure to output file
Synopsis
Prototype
void ajCodWriteOut (
const AjPCod thys,
AjPOutfile outf
);
Input
Input & Output
Returns
Description
Write codon structure to output file
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 3.0.0
Write codon structure to output file
Synopsis
Prototype
void ajCodWrite (
AjPCod thys,
AjPFile outf
);
Input & Output
| thys: | (Modify) | codon usage |
| outf: | (Modify) | output file |
Returns
Description
Write codon structure to output file
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 3.0.0
Calculate sequence composition
Synopsis
Prototype
void ajCodComp (
ajint* NA,
ajint* NC,
ajint* NG,
ajint* NT,
const char* str
);
Input
Output
| NA: | (Output) | number of A's |
| NC: | (Output) | number of C's |
| NG: | (Output) | number of G's |
| NT: | (Output) | number of T' |
Returns
Description
Calculate sequence composition
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 3.0.0
Calculate codon adaptive index using equation 8
NAR 15:1281-1295
Synopsis
Prototype
double ajCodCalcCai (
const AjPCod thys
);
Input
Returns
Description
Calculate codon adaptive index using equation 8
NAR 15:1281-1295
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 3.0.0
Calculate codon adaptive index W values
NAR 15:1281-1295
Synopsis
Prototype
double* ajCodCaiW (
const AjPCod thys
);
Input
Returns
Description
Calculate codon adaptive index W values
NAR 15:1281-1295
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 3.0.0
Calculate codon adaptive index using equation 7
NAR 15:1281-1295
Synopsis
Prototype
double ajCodCai (
const AjPCod thys,
const AjPStr str
);
Input
| thys: | (Input) | codon usage |
| str: | (Input) | sequence |
Returns
Description
Calculate codon adaptive index using equation 7
NAR 15:1281-1295
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 3.0.0
Returns the name of a codon table
Synopsis
Prototype
const AjPStr ajCodGetName (
const AjPCod thys
);
Input
| thys: | (Input) | Codon usage object |
Returns
| const AjPStr: | Original filename |
Description
Returns the name of a codon table
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 3.0.0
Returns the name of a codon table
Synopsis
Prototype
const char* ajCodGetNameC (
const AjPCod thys
);
Input
| thys: | (Input) | Codon usage object |
Returns
| const char*: | Original filename |
Description
Returns the name of a codon table
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 3.0.0
Returns the description of a codon table
Synopsis
Prototype
const AjPStr ajCodGetDesc (
const AjPCod thys
);
Input
| thys: | (Input) | Codon usage object |
Returns
| const AjPStr: | Original filename |
Description
Returns the description of a codon table
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 3.0.0
Returns the description of a codon table
Synopsis
Prototype
const char* ajCodGetDescC (
const AjPCod thys
);
Input
| thys: | (Input) | Codon usgage object |
Returns
| const char*: | Original filename |
Description
Returns the description of a codon table
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 3.0.0
Returns the species of a codon table
Synopsis
Prototype
const AjPStr ajCodGetSpecies (
const AjPCod thys
);
Input
| thys: | (Input) | Codon usage object |
Returns
Description
Returns the species of a codon table
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 3.0.0
Returns the species of a codon table
Synopsis
Prototype
const char* ajCodGetSpeciesC (
const AjPCod thys
);
Input
| thys: | (Input) | Codon usage object |
Returns
Description
Returns the species of a codon table
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 3.0.0
Returns the division of a codon table
Synopsis
Prototype
const AjPStr ajCodGetDivision (
const AjPCod thys
);
Input
| thys: | (Input) | Codon usage object |
Returns
Description
Returns the division of a codon table
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 3.0.0
Returns the division of a codon table
Synopsis
Prototype
const char* ajCodGetDivisionC (
const AjPCod thys
);
Input
| thys: | (Input) | Codon usage object |
Returns
Description
Returns the division of a codon table
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 3.0.0
Returns the release of a codon table
Synopsis
Prototype
const AjPStr ajCodGetRelease (
const AjPCod thys
);
Input
| thys: | (Input) | Codon usage object |
Returns
Description
Returns the release of a codon table
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 3.0.0
Returns the release of a codon table
Synopsis
Prototype
const char* ajCodGetReleaseC (
const AjPCod thys
);
Input
| thys: | (Input) | Codon usage object |
Returns
Description
Returns the release of a codon table
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 3.0.0
Returns the number of codons in a codon table
Synopsis
Prototype
ajint ajCodGetNumcodon (
const AjPCod thys
);
Input
| thys: | (Input) | Codon usage object |
Returns
Description
Returns the number of codons in a codon table
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 3.0.0
Returns the numbers od CDSs in a codon table
Synopsis
Prototype
ajint ajCodGetNumcds (
const AjPCod thys
);
Input
| thys: | (Input) | Codon usage object |
Returns
Description
Returns the numbers od CDSs in a codon table
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 3.0.0
Returns the genetic code of a codon table
Synopsis
Prototype
ajint ajCodGetCode (
const AjPCod thys
);
Input
| thys: | (Input) | Codon usage object |
Returns
Description
Returns the genetic code of a codon table
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 3.0.0
Assigns the name of a codon table
Synopsis
Prototype
void ajCodAssName (
AjPCod thys,
const AjPStr name
);
Input
Input & Output
| thys: | (Modify) | Codon usage object |
Returns
Description
Assigns the name of a codon table
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 3.0.0
Assigns the name of a codon table
Synopsis
Prototype
void ajCodAssNameC (
AjPCod thys,
const char* name
);
Input
Input & Output
| thys: | (Modify) | Codon usage object |
Returns
Description
Assigns the name of a codon table
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 3.0.0
Assigns the description of a codon table
Synopsis
Prototype
void ajCodAssDesc (
AjPCod thys,
const AjPStr desc
);
Input
Input & Output
| thys: | (Modify) | Codon usage object |
Returns
Description
Assigns the description of a codon table
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 3.0.0
Assigns the description of a codon table
Synopsis
Prototype
void ajCodAssDescC (
AjPCod thys,
const char* desc
);
Input
Input & Output
| thys: | (Modify) | Codon usage object |
Returns
Description
Assigns the description of a codon table
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 3.0.0
Assigns the species of a codon table
Synopsis
Prototype
void ajCodAssSpecies (
AjPCod thys,
const AjPStr species
);
Input
Input & Output
| thys: | (Modify) | Codon usage object |
Returns
Description
Assigns the species of a codon table
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 3.0.0
Assigns the species of a codon table
Synopsis
Prototype
void ajCodAssSpeciesC (
AjPCod thys,
const char* species
);
Input
Input & Output
| thys: | (Modify) | Codon usage object |
Returns
Description
Assigns the species of a codon table
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 3.0.0
Assigns the release of a codon table
Synopsis
Prototype
void ajCodAssRelease (
AjPCod thys,
const AjPStr release
);
Input
Input & Output
| thys: | (Modify) | Codon usage object |
Returns
Description
Assigns the release of a codon table
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 3.0.0
Assigns the of a codon table
Synopsis
Prototype
void ajCodAssReleaseC (
AjPCod thys,
const char* release
);
Input
Input & Output
| thys: | (Modify) | Codon usage object |
Returns
Description
Assigns the of a codon table
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 3.0.0
Assigns the division of a codon table
Synopsis
Prototype
void ajCodAssDivision (
AjPCod thys,
const AjPStr division
);
Input
Input & Output
| thys: | (Modify) | Codon usage object |
Returns
Description
Assigns the division of a codon table
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 3.0.0
Assigns the division of a codon table
Synopsis
Prototype
void ajCodAssDivisionC (
AjPCod thys,
const char* division
);
Input
Input & Output
| thys: | (Modify) | Codon usage object |
Returns
Description
Assigns the division of a codon table
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 3.0.0
Assigns the number of codons in a codon table
Synopsis
Prototype
void ajCodAssNumcodon (
AjPCod thys,
ajint numcodon
);
Input
| numcodon: | (Input) | Number of codons |
Input & Output
| thys: | (Modify) | Codon usage object |
Returns
Description
Assigns the number of codons in a codon table
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 3.0.0
Assigns the number of CDSs in a codon table
Synopsis
Prototype
void ajCodAssNumcds (
AjPCod thys,
ajint numcds
);
Input
| numcds: | (Input) | Number of codons |
Input & Output
| thys: | (Modify) | Codon usage object |
Returns
Description
Assigns the number of CDSs in a codon table
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 3.0.0
Assigns the genetic code in a codon table
Synopsis
Prototype
void ajCodAssCode (
AjPCod thys,
ajint geneticcode
);
Input
| geneticcode: | (Input) | Genetic code |
Input & Output
| thys: | (Modify) | Codon usage object |
Returns
Description
Assigns the genetic code in a codon table
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 3.0.0
Tests the output format for an outcodon ACD type
Synopsis
Prototype
ajint ajCodOutFormat (
const AjPStr name
);
Input
Returns
| ajint: | Internal format index, of -1 if not found |
Description
Tests the output format for an outcodon ACD type
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 3.0.0
Reports the internal data structures
Synopsis
Prototype
void ajCodPrintFormat (
AjPFile outf,
AjBool full
);
Input
| full: | (Input) | Full report (usually ajFalse) |
Input & Output
Returns
Description
Reports the internal data structures
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 3.0.0
Writes codon triplets to a string list
Synopsis
Prototype
void ajCodGetCodonlist (
const AjPCod cod,
AjPList list
);
Input
Output
| list: | (Output) | List with character distributions |
Returns
Description
Writes codon triplets to a string list
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 3.0.0
Cleans up codon usage processing internal memory
Synopsis
Prototype
void ajCodExit (
void
);
Returns
Description
Cleans up codon usage 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 3.0.0