ajtranslate.c


Function ajTrnDel

Deletes a translation table object

Synopsis

Prototype
void ajTrnDel (
      AjPTrn* pthis
);

TypeNameRead/WriteDescription
AjPTrn*pthisDeleteAddress of translation table object
void RETURN

Output
pthis:(Delete)Address of translation table object
Returns
void:No return value

Description

Deletes a translation table object

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnNewC

Initialises translation. Reads a translation data file.

Synopsis

Prototype
AjPTrn ajTrnNewC (
      const char* filename
);

TypeNameRead/WriteDescription
const char*filenameInputtranslation table file name
AjPTrn RETURNTranslation object

Input
filename:(Input)translation table file name
Returns
AjPTrn:Translation object

Description

Initialises translation. Reads a translation data file.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnNewI

Initialises translation. Reads a translation data file called 'EGC.x' where 'x' is supplied as an ajint parameter. The filename must exist somewhere in the data path. ajTrnDel should be called when translation has ceased.

Synopsis

Prototype
AjPTrn ajTrnNewI (
      ajint trnFileNameInt
);

TypeNameRead/WriteDescription
ajinttrnFileNameIntInputtranslation table file name number
AjPTrn RETURNTranslation object

Input
trnFileNameInt:(Input)translation table file name number
Returns
AjPTrn:Translation object

Description

Initialises translation. Reads a translation data file called 'EGC.x' where 'x' is supplied as an ajint parameter. The filename must exist somewhere in the data path. ajTrnDel should be called when translation has ceased.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnNew

Initialises translation. Reads a translation data file ajTrnDel should be called when translation has ceased.

Synopsis

Prototype
AjPTrn ajTrnNew (
      const AjPStr trnFileName
);

TypeNameRead/WriteDescription
const AjPStrtrnFileNameInputtranslation table file name
AjPTrn RETURNTranslation object

Input
trnFileName:(Input)translation table file name
Returns
AjPTrn:Translation object

Description

Initialises translation. Reads a translation data file ajTrnDel should be called when translation has ceased.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnReadFile

Reads a translation data file

The destructor ajTrnDel should be called when translation has ceased.

Synopsis

Prototype
void ajTrnReadFile (
      AjPTrn trnObj,
      AjPFile trnFile
);

TypeNameRead/WriteDescription
AjPTrntrnObjOutputtranslation table object
AjPFiletrnFileModifytranslation table file handle
void RETURN

Output
trnObj:(Output)translation table object
Input & Output
trnFile:(Modify)translation table file handle
Returns
void:No return value

Description

Reads a translation data file

The destructor ajTrnDel should be called when translation has ceased.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnNewPep

Creates a new AjPSeq set up with an appropriate name and description

It: Creates a AjPSeq object Sets it to be a protein. Sets the description as being the same as that description of the nucleic acid sequence it was translated from. Gives it the same name as the nucleic acid sequence it is translated from.

If the frame is not specified as being '0' it will then append a '_' and the number of the frame to form a unique name for the protein sequence in the event of many frames being translated. If the frame number is negative, it will use a number in the range 4, 5, 6, this is because ID names with '-' in them were causing problems in the sequence reading routines.

Frame 4 is the same as frame -1, 5 is -2, 6 is -3.

You will have to set the sequence of this object with something like: ajSeqAssignSeqS(trnPeptide, seqstr);

Synopsis

Prototype
AjPSeq ajTrnNewPep (
      const AjPSeq nucleicSeq,
      ajint frame
);

TypeNameRead/WriteDescription
const AjPSeqnucleicSeqInputnucleic sequence being translated
ajintframeInputframe of translation (-3,-2,-1,0,1,2,3,4,5,6)
AjPSeq RETURNNew peptide object

Input
nucleicSeq:(Input)nucleic sequence being translated
frame:(Input)frame of translation (-3,-2,-1,0,1,2,3,4,5,6)
Returns
AjPSeq:New peptide object

Description

Creates a new AjPSeq set up with an appropriate name and description

It: Creates a AjPSeq object Sets it to be a protein. Sets the description as being the same as that description of the nucleic acid sequence it was translated from. Gives it the same name as the nucleic acid sequence it is translated from.

If the frame is not specified as being '0' it will then append a '_' and the number of the frame to form a unique name for the protein sequence in the event of many frames being translated. If the frame number is negative, it will use a number in the range 4, 5, 6, this is because ID names with '-' in them were causing problems in the sequence reading routines.

Frame 4 is the same as frame -1, 5 is -2, 6 is -3.

You will have to set the sequence of this object with something like: ajSeqAssignSeqS(trnPeptide, seqstr);

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnCodonS

Translates a codon

Synopsis

Prototype
char ajTrnCodonS (
      const AjPTrn trnObj,
      const AjPStr codon
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const AjPStrcodonInputcodon to translate
char RETURNAmino acid translation

Input
trnObj:(Input)Translation tables
codon:(Input)codon to translate
Returns
char:Amino acid translation

Description

Translates a codon

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnCodonRevS

Translates the reverse complement of a codon

Synopsis

Prototype
char ajTrnCodonRevS (
      const AjPTrn trnObj,
      const AjPStr codon
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const AjPStrcodonInputcodon to translate
char RETURNAmino acid translation

Input
trnObj:(Input)Translation tables
codon:(Input)codon to translate
Returns
char:Amino acid translation

Description

Translates the reverse complement of a codon

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnCodonC

Translates a const char * codon

Synopsis

Prototype
char ajTrnCodonC (
      const AjPTrn trnObj,
      const char* codon
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const char*codonInputcodon to translate (these 3 characters need not be NULL-terminated)
char RETURNAmino acid translation

Input
trnObj:(Input)Translation tables
codon:(Input)codon to translate (these 3 characters need not be NULL-terminated)
Returns
char:Amino acid translation

Description

Translates a const char * codon

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnCodonRevC

Translates the reverse complement of a const char * codon

Synopsis

Prototype
char ajTrnCodonRevC (
      const AjPTrn trnObj,
      const char* codon
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const char*codonInputcodon to translate (these 3 characters need not be NULL-terminated)
char RETURNAmino acid translation

Input
trnObj:(Input)Translation tables
codon:(Input)codon to translate (these 3 characters need not be NULL-terminated)
Returns
char:Amino acid translation

Description

Translates the reverse complement of a const char * codon

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnCodonK

Translates a const char * codon to a char

Synopsis

Prototype
char ajTrnCodonK (
      const AjPTrn trnObj,
      const char* codon
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const char*codonInputcodon to translate (these 3 characters need not be NULL-terminated)
char RETURNAmino acid translation

Input
trnObj:(Input)Translation tables
codon:(Input)codon to translate (these 3 characters need not be NULL-terminated)
Returns
char:Amino acid translation

Description

Translates a const char * codon to a char

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnRevCodonK

Translates a the reverse complement of a const char * codon to a char

Synopsis

Prototype
char ajTrnRevCodonK (
      const AjPTrn trnObj,
      const char* codon
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const char*codonInputcodon to translate (these 3 characters need not be NULL-terminated)
char RETURNAmino acid translation

Input
trnObj:(Input)Translation tables
codon:(Input)codon to translate (these 3 characters need not be NULL-terminated)
Returns
char:Amino acid translation

Description

Translates a the reverse complement of a const char * codon to a char

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnSeqC

Translates a sequence in a char

This routine translates in frame 1 (from the first base) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored)

Synopsis

Prototype
void ajTrnSeqC (
      const AjPTrn trnObj,
      const char* str,
      ajint len,
      AjPStr* pep
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const char*strInputsequence string to translate
ajintlenInputlength of sequence string to translate
AjPStr*pepModifyreturned peptide translation (APPENDED TO INPUT)
void RETURN

Input
trnObj:(Input)Translation tables
str:(Input)sequence string to translate
len:(Input)length of sequence string to translate
Input & Output
pep:(Modify)returned peptide translation (APPENDED TO INPUT)
Returns
void:No return value

Description

Translates a sequence in a char

This routine translates in frame 1 (from the first base) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored)

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnSeqRevC

Translates the reverse complement of a sequence in a char *.

This routine translates in frame -1 (using the frame '1' codons) to the first full triplet codon, (i.e. if there are 1 or 2 bases extra at the start, they are ignored)

Synopsis

Prototype
void ajTrnSeqRevC (
      const AjPTrn trnObj,
      const char* str,
      ajint len,
      AjPStr* pep
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const char*strInputsequence string to translate
ajintlenInputlength of sequence string to translate
AjPStr*pepModifyreturned peptide translation (APPENDED TO INPUT)
void RETURN

Input
trnObj:(Input)Translation tables
str:(Input)sequence string to translate
len:(Input)length of sequence string to translate
Input & Output
pep:(Modify)returned peptide translation (APPENDED TO INPUT)
Returns
void:No return value

Description

Translates the reverse complement of a sequence in a char *.

This routine translates in frame -1 (using the frame '1' codons) to the first full triplet codon, (i.e. if there are 1 or 2 bases extra at the start, they are ignored)

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnSeqAltRevC

Translates the reverse complement of a sequence in a char *.

This routine translates in frame -4 (from the last base) to the first full triplet codon, (i.e. if there are 1 or 2 bases extra at the start, they are ignored). This routine is for those people who define frame '-1' as being the frame starting from the first base of a reverse-complemented sequence.

Synopsis

Prototype
void ajTrnSeqAltRevC (
      const AjPTrn trnObj,
      const char* str,
      ajint len,
      AjPStr* pep
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const char*strInputsequence string to translate
ajintlenInputlength of sequence string to translate
AjPStr*pepModifyreturned peptide translation (APPENDED TO INPUT)
void RETURN

Input
trnObj:(Input)Translation tables
str:(Input)sequence string to translate
len:(Input)length of sequence string to translate
Input & Output
pep:(Modify)returned peptide translation (APPENDED TO INPUT)
Returns
void:No return value

Description

Translates the reverse complement of a sequence in a char *.

This routine translates in frame -4 (from the last base) to the first full triplet codon, (i.e. if there are 1 or 2 bases extra at the start, they are ignored). This routine is for those people who define frame '-1' as being the frame starting from the first base of a reverse-complemented sequence.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnSeqS

Translates a sequence in a AjPStr.

This routine translates in frame 1 (from the first base) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored)

Synopsis

Prototype
void ajTrnSeqS (
      const AjPTrn trnObj,
      const AjPStr str,
      AjPStr* pep
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const AjPStrstrInputsequence string to translate
AjPStr*pepModifyreturned peptide translation (APPENDED TO INPUT)
void RETURN

Input
trnObj:(Input)Translation tables
str:(Input)sequence string to translate
Input & Output
pep:(Modify)returned peptide translation (APPENDED TO INPUT)
Returns
void:No return value

Description

Translates a sequence in a AjPStr.

This routine translates in frame 1 (from the first base) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored)

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnRevStr

Translates the reverse complement of a sequence in a AjPStr.

This routine translates in frame -1 (from the first base) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored)

Synopsis

Prototype
void ajTrnRevStr (
      const AjPTrn trnObj,
      const AjPStr str,
      AjPStr* pep
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const AjPStrstrInputsequence string to translate
AjPStr*pepModifyreturned peptide translation (APPENDED TO INPUT)
void RETURN

Input
trnObj:(Input)Translation tables
str:(Input)sequence string to translate
Input & Output
pep:(Modify)returned peptide translation (APPENDED TO INPUT)
Returns
void:No return value

Description

Translates the reverse complement of a sequence in a AjPStr.

This routine translates in frame -1 (from the first base) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored)

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnSeqAltRevS

Translates the reverse complement of a sequence in a AjPStr.

This routine translates in frame -4 (from the last base) to the first full triplet codon, (i.e. if there are 1 or 2 bases extra at the start, they are ignored). This routine is for those people who define frame '-1' as being the frame starting from the first base of a reverse-complemented sequence.

Synopsis

Prototype
void ajTrnSeqAltRevS (
      const AjPTrn trnObj,
      const AjPStr str,
      AjPStr* pep
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const AjPStrstrInputsequence string to translate
AjPStr*pepModifyreturned peptide translation (APPENDED TO INPUT)
void RETURN

Input
trnObj:(Input)Translation tables
str:(Input)sequence string to translate
Input & Output
pep:(Modify)returned peptide translation (APPENDED TO INPUT)
Returns
void:No return value

Description

Translates the reverse complement of a sequence in a AjPStr.

This routine translates in frame -4 (from the last base) to the first full triplet codon, (i.e. if there are 1 or 2 bases extra at the start, they are ignored). This routine is for those people who define frame '-1' as being the frame starting from the first base of a reverse-complemented sequence.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnSeqSeq

Translates a sequence in a AjPSeq

This routine translates in frame 1 (from the first base) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored)

Synopsis

Prototype
void ajTrnSeqSeq (
      const AjPTrn trnObj,
      const AjPSeq seq,
      AjPStr* pep
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const AjPSeqseqInputsequence to translate
AjPStr*pepModifyreturned peptide translation (APPENDED TO INPUT)
void RETURN

Input
trnObj:(Input)Translation tables
seq:(Input)sequence to translate
Input & Output
pep:(Modify)returned peptide translation (APPENDED TO INPUT)
Returns
void:No return value

Description

Translates a sequence in a AjPSeq

This routine translates in frame 1 (from the first base) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored)

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnSeqRevSeq

Translates the reverse complement of a sequence in a AjPSeq The translation is APPENDED to the input peptide.

This routine translates in frame 1 (from the first base) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored)

Synopsis

Prototype
void ajTrnSeqRevSeq (
      const AjPTrn trnObj,
      const AjPSeq seq,
      AjPStr* pep
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const AjPSeqseqInputsequence to translate
AjPStr*pepModifyreturned peptide translation (APPENDED TO INPUT)
void RETURN

Input
trnObj:(Input)Translation tables
seq:(Input)sequence to translate
Input & Output
pep:(Modify)returned peptide translation (APPENDED TO INPUT)
Returns
void:No return value

Description

Translates the reverse complement of a sequence in a AjPSeq The translation is APPENDED to the input peptide.

This routine translates in frame 1 (from the first base) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored)

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnSeqAltRevSeq

Translates the reverse complement of a sequence in a AjPSeq The translation is APPENDED to the input peptide.

This routine translates in frame -4 (from the last base) to the first full triplet codon, (i.e. if there are 1 or 2 bases extra at the start, they are ignored). This routine is for those people who define frame '-1' as being the frame starting from the first base of a reverse-complemented sequence.

Synopsis

Prototype
void ajTrnSeqAltRevSeq (
      const AjPTrn trnObj,
      const AjPSeq seq,
      AjPStr* pep
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const AjPSeqseqInputsequence to translate
AjPStr*pepModifyreturned peptide translation (APPENDED TO INPUT)
void RETURN

Input
trnObj:(Input)Translation tables
seq:(Input)sequence to translate
Input & Output
pep:(Modify)returned peptide translation (APPENDED TO INPUT)
Returns
void:No return value

Description

Translates the reverse complement of a sequence in a AjPSeq The translation is APPENDED to the input peptide.

This routine translates in frame -4 (from the last base) to the first full triplet codon, (i.e. if there are 1 or 2 bases extra at the start, they are ignored). This routine is for those people who define frame '-1' as being the frame starting from the first base of a reverse-complemented sequence.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnSeqFrameC

Translates a sequence in a char * in the specified frame. The translation is APPENDED to the input peptide.

This routine translates in the specified frame (one of: 1,2,3,-1,-2,-3,4,5,6,-4,-5,-6) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored).

Frame -1 is defined as the translation of the reverse complement sequence which matches the codons used in frame 1. i.e. in the sequence ACGT, the first codon of frame 1 is ACG and the last codon of frame -1 is the reverse complement of ACG (i.e. CGT).

Frame -4 is defined as the translation from the last base to the first full triplet codon. This routine is for those people who define frame '-1' as being the frame starting from the first base of a reverse-complemented sequence. This is also known as the 'alternative frame -1'. Frame -5 starts on the penultimate base. (Alternative frame -2) Frame -6 starts on the ante-penultimate base. (Alternative frame -3)

Frame 4 is the same as frame -1, 5 is -2, 6 is -3.

Synopsis

Prototype
void ajTrnSeqFrameC (
      const AjPTrn trnObj,
      const char* seq,
      ajint len,
      ajint frame,
      AjPStr* pep
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const char*seqInputsequence string to translate
ajintlenInputlength of sequence string to translate
ajintframeInputframe to translate in
AjPStr*pepModifyreturned peptide translation (APPENDED TO INPUT)
void RETURN

Input
trnObj:(Input)Translation tables
seq:(Input)sequence string to translate
len:(Input)length of sequence string to translate
frame:(Input)frame to translate in
Input & Output
pep:(Modify)returned peptide translation (APPENDED TO INPUT)
Returns
void:No return value

Description

Translates a sequence in a char * in the specified frame. The translation is APPENDED to the input peptide.

This routine translates in the specified frame (one of: 1,2,3,-1,-2,-3,4,5,6,-4,-5,-6) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored).

Frame -1 is defined as the translation of the reverse complement sequence which matches the codons used in frame 1. i.e. in the sequence ACGT, the first codon of frame 1 is ACG and the last codon of frame -1 is the reverse complement of ACG (i.e. CGT).

Frame -4 is defined as the translation from the last base to the first full triplet codon. This routine is for those people who define frame '-1' as being the frame starting from the first base of a reverse-complemented sequence. This is also known as the 'alternative frame -1'. Frame -5 starts on the penultimate base. (Alternative frame -2) Frame -6 starts on the ante-penultimate base. (Alternative frame -3)

Frame 4 is the same as frame -1, 5 is -2, 6 is -3.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnSeqFrameS

Translates a sequence in a AjStr in the specified frame. The translation is APPENDED to the input peptide.

This routine translates in the specified frame (one of: 1,2,3,-1,-2,-3,4,5,6,-4,-5,-6) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored).

Frame -1 is defined as the translation of the reverse complement sequence which matches the codons used in frame 1. i.e. in the sequence ACGT, the first codon of frame 1 is ACG and the last codon of frame -1 is the reverse complement of ACG (i.e. CGT).

Frame -4 is defined as the translation from the last base to the first full triplet codon. This routine is for those people who define frame '-1' as being the frame starting from the first base of a reverse-complemented sequence. This is also known as the 'alternative frame -1'. Frame -5 starts on the penultimate base. (Alternative frame -2) Frame -6 starts on the ante-penultimate base. (Alternative frame -3)

Frame 4 is the same as frame -1, 5 is -2, 6 is -3.

Synopsis

Prototype
void ajTrnSeqFrameS (
      const AjPTrn trnObj,
      const AjPStr seq,
      ajint frame,
      AjPStr* pep
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const AjPStrseqInputsequence string to translate
ajintframeInputframe to translate in
AjPStr*pepModifyreturned peptide translation (APPENDED TO INPUT)
void RETURN

Input
trnObj:(Input)Translation tables
seq:(Input)sequence string to translate
frame:(Input)frame to translate in
Input & Output
pep:(Modify)returned peptide translation (APPENDED TO INPUT)
Returns
void:No return value

Description

Translates a sequence in a AjStr in the specified frame. The translation is APPENDED to the input peptide.

This routine translates in the specified frame (one of: 1,2,3,-1,-2,-3,4,5,6,-4,-5,-6) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored).

Frame -1 is defined as the translation of the reverse complement sequence which matches the codons used in frame 1. i.e. in the sequence ACGT, the first codon of frame 1 is ACG and the last codon of frame -1 is the reverse complement of ACG (i.e. CGT).

Frame -4 is defined as the translation from the last base to the first full triplet codon. This routine is for those people who define frame '-1' as being the frame starting from the first base of a reverse-complemented sequence. This is also known as the 'alternative frame -1'. Frame -5 starts on the penultimate base. (Alternative frame -2) Frame -6 starts on the ante-penultimate base. (Alternative frame -3)

Frame 4 is the same as frame -1, 5 is -2, 6 is -3.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnSeqFrameSeq

Translates a sequence in a AjSeq in the specified frame. The translation is APPENDED to the input peptide.

This routine translates in the specified frame (one of: 1,2,3,-1,-2,-3,4,5,6,-4,-5,-6) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored).

Frame -1 is defined as the translation of the reverse complement sequence which matches the codons used in frame 1. i.e. in the sequence ACGT, the first codon of frame 1 is ACG and the last codon of frame -1 is the reverse complement of ACG (i.e. CGT).

Frame -4 is defined as the translation from the last base to the first full triplet codon. This routine is for those people who define frame '-1' as being the frame starting from the first base of a reverse-complemented sequence. This is also known as the 'alternative frame -1'. Frame -5 starts on the penultimate base. (Alternative frame -2) Frame -6 starts on the ante-penultimate base. (Alternative frame -3)

Frame 4 is the same as frame -1, 5 is -2, 6 is -3.

Synopsis

Prototype
void ajTrnSeqFrameSeq (
      const AjPTrn trnObj,
      const AjPSeq seq,
      ajint frame,
      AjPStr* pep
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const AjPSeqseqInputsequence string to translate
ajintframeInputframe to translate in
AjPStr*pepModifyreturned peptide translation (APPENDED TO INPUT)
void RETURN

Input
trnObj:(Input)Translation tables
seq:(Input)sequence string to translate
frame:(Input)frame to translate in
Input & Output
pep:(Modify)returned peptide translation (APPENDED TO INPUT)
Returns
void:No return value

Description

Translates a sequence in a AjSeq in the specified frame. The translation is APPENDED to the input peptide.

This routine translates in the specified frame (one of: 1,2,3,-1,-2,-3,4,5,6,-4,-5,-6) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored).

Frame -1 is defined as the translation of the reverse complement sequence which matches the codons used in frame 1. i.e. in the sequence ACGT, the first codon of frame 1 is ACG and the last codon of frame -1 is the reverse complement of ACG (i.e. CGT).

Frame -4 is defined as the translation from the last base to the first full triplet codon. This routine is for those people who define frame '-1' as being the frame starting from the first base of a reverse-complemented sequence. This is also known as the 'alternative frame -1'. Frame -5 starts on the penultimate base. (Alternative frame -2) Frame -6 starts on the ante-penultimate base. (Alternative frame -3)

Frame 4 is the same as frame -1, 5 is -2, 6 is -3.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnSeqFramePep

Translates a sequence in a AjSeq in the specified frame and returns a new peptide.

This routine translates in the specified frame (one of: 1,2,3,-1,-2,-3,4,5,6,-4,-5,-6) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored).

Frame -1 is defined as the translation of the reverse complement sequence which matches the codons used in frame 1. i.e. in the sequence ACGT, the first codon of frame 1 is ACG and the last codon of frame -1 is the reverse complement of ACG (i.e. CGT).

Frame -4 is defined as the translation from the last base to the first full triplet codon. This routine is for those people who define frame '-1' as being the frame starting from the first base of a reverse-complemented sequence. This is also known as the 'alternative frame -1'. Frame -5 starts on the penultimate base. (Alternative frame -2) Frame -6 starts on the ante-penultimate base. (Alternative frame -3)

Frame 4 is the same as frame -1, 5 is -2, 6 is -3.

NB. that the naming of the output sequence is always to take the name of the input sequence (e.g. ECARGS) and to append an underscore character and the frame number 1 to 3 for forward frames and 4 to 6 for reverse frames regardless of the final orientation of the reverse frames. (i.e. frame -1 = ECARGS_4, frame -2 = ECARGS_5, -3 = ECARGS_6, 4 = ECARGS_4, 5 = ECARGS_5 6 = ECARGS_6)

Synopsis

Prototype
AjPSeq ajTrnSeqFramePep (
      const AjPTrn trnObj,
      const AjPSeq seq,
      ajint frame
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const AjPSeqseqInputsequence string to translate
ajintframeInputframe to translate in
AjPSeq RETURNreturned peptide translation

Input
trnObj:(Input)Translation tables
seq:(Input)sequence string to translate
frame:(Input)frame to translate in
Returns
AjPSeq:returned peptide translation

Description

Translates a sequence in a AjSeq in the specified frame and returns a new peptide.

This routine translates in the specified frame (one of: 1,2,3,-1,-2,-3,4,5,6,-4,-5,-6) to the last full triplet codon, (i.e. if there are 1 or 2 bases extra at the end, they are ignored).

Frame -1 is defined as the translation of the reverse complement sequence which matches the codons used in frame 1. i.e. in the sequence ACGT, the first codon of frame 1 is ACG and the last codon of frame -1 is the reverse complement of ACG (i.e. CGT).

Frame -4 is defined as the translation from the last base to the first full triplet codon. This routine is for those people who define frame '-1' as being the frame starting from the first base of a reverse-complemented sequence. This is also known as the 'alternative frame -1'. Frame -5 starts on the penultimate base. (Alternative frame -2) Frame -6 starts on the ante-penultimate base. (Alternative frame -3)

Frame 4 is the same as frame -1, 5 is -2, 6 is -3.

NB. that the naming of the output sequence is always to take the name of the input sequence (e.g. ECARGS) and to append an underscore character and the frame number 1 to 3 for forward frames and 4 to 6 for reverse frames regardless of the final orientation of the reverse frames. (i.e. frame -1 = ECARGS_4, frame -2 = ECARGS_5, -3 = ECARGS_6, 4 = ECARGS_4, 5 = ECARGS_5 6 = ECARGS_6)

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnSeqDangleC

Translates the last 1 or two bases of a sequence in a char that would not be translated if just translating complete codons in the specified frame. The translation is APPENDED to the input peptide.

Synopsis

Prototype
ajint ajTrnSeqDangleC (
      const AjPTrn trnObj,
      const char* seq,
      ajint frame,
      AjPStr* pep
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const char*seqInputsequence string to translate
ajintframeInputframe to translate in
AjPStr*pepModifyreturned peptide translation (APPENDED TO INPUT)
ajint RETURNNumber of dangling bases (0,1 or 2)

Input
trnObj:(Input)Translation tables
seq:(Input)sequence string to translate
frame:(Input)frame to translate in
Input & Output
pep:(Modify)returned peptide translation (APPENDED TO INPUT)
Returns
ajint:Number of dangling bases (0,1 or 2)

Description

Translates the last 1 or two bases of a sequence in a char that would not be translated if just translating complete codons in the specified frame. The translation is APPENDED to the input peptide.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnSeqDangleS

Translates the last 1 or two bases of a sequence in a AjStr that would not be translated if just translating complete codons in the specified frame. The translation is APPENDED to the input peptide.

Synopsis

Prototype
ajint ajTrnSeqDangleS (
      const AjPTrn trnObj,
      const AjPStr seq,
      ajint frame,
      AjPStr* pep
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const AjPStrseqInputsequence string to translate
ajintframeInputframe to translate in
AjPStr*pepModifyreturned peptide translation (APPENDED TO INPUT)
ajint RETURNNumber of dangling bases (0,1 or 2) dangle = len - end;

Input
trnObj:(Input)Translation tables
seq:(Input)sequence string to translate
frame:(Input)frame to translate in
Input & Output
pep:(Modify)returned peptide translation (APPENDED TO INPUT)
Returns
ajint:Number of dangling bases (0,1 or 2) dangle = len - end;

Description

Translates the last 1 or two bases of a sequence in a AjStr that would not be translated if just translating complete codons in the specified frame. The translation is APPENDED to the input peptide.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnSeqOrig

Translates a sequence.

The frame to translate is in the range -3 to 6. Frames 1 to 3 give normal forward translations.

Frames -3 to -1 give translations in the reverse sense. Frame -1 is defined as the translation of the reverse complement sequence which matches the codons used in frame 1. i.e. in the sequence ACGT, the first codon of frame 1 is ACG and the last codon of frame -1 is the reverse complement of ACG (i.e. CGT).

Frames -4 to -6 give translations in the reverse sense. Frame -4 is defined as the translation of the reverse complement, starting the translation in the first codon of the reversed sequence. i.e. in the sequence ACGT, the last codon is CGT and so frame -4 translates from the reverse complement of CGT (i.e. ACG) - this is for those people who define frame -1 as using the first codon when the sequence is reverse-complemented.

Frames 4 to 6 rev-comp the DNA sequence then reverse the peptide sequence

Frames 4 to 6 are therefore a reversed protein sequence useful mainly for displaying beneath the original DNA sequence.

NB. that the naming of the output sequence is always to take the name of the input sequence (e.g. ECARGS) and to append an underscore character and the frame number 1 to 3 for forward frames and 4 to 6 for reverse frames regardless of the final orientation of the reverse frames. (i.e. frame -1 = ECARGS_4, frame -2 = ECARGS_5, -3 = ECARGS_6, 4 = ECARGS_4, 5 = ECARGS_5 6 = ECARGS_6)

Synopsis

Prototype
AjPSeq ajTrnSeqOrig (
      const AjPTrn trnObj,
      const AjPSeq seq,
      ajint frame
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const AjPSeqseqInputsequence to translate
ajintframeInputframe to translate in (-6 to 6)
AjPSeq RETURNPeptide translation

Input
trnObj:(Input)Translation tables
seq:(Input)sequence to translate
frame:(Input)frame to translate in (-6 to 6)
Returns
AjPSeq:Peptide translation

Description

Translates a sequence.

The frame to translate is in the range -3 to 6. Frames 1 to 3 give normal forward translations.

Frames -3 to -1 give translations in the reverse sense. Frame -1 is defined as the translation of the reverse complement sequence which matches the codons used in frame 1. i.e. in the sequence ACGT, the first codon of frame 1 is ACG and the last codon of frame -1 is the reverse complement of ACG (i.e. CGT).

Frames -4 to -6 give translations in the reverse sense. Frame -4 is defined as the translation of the reverse complement, starting the translation in the first codon of the reversed sequence. i.e. in the sequence ACGT, the last codon is CGT and so frame -4 translates from the reverse complement of CGT (i.e. ACG) - this is for those people who define frame -1 as using the first codon when the sequence is reverse-complemented.

Frames 4 to 6 rev-comp the DNA sequence then reverse the peptide sequence

Frames 4 to 6 are therefore a reversed protein sequence useful mainly for displaying beneath the original DNA sequence.

NB. that the naming of the output sequence is always to take the name of the input sequence (e.g. ECARGS) and to append an underscore character and the frame number 1 to 3 for forward frames and 4 to 6 for reverse frames regardless of the final orientation of the reverse frames. (i.e. frame -1 = ECARGS_4, frame -2 = ECARGS_5, -3 = ECARGS_6, 4 = ECARGS_4, 5 = ECARGS_5 6 = ECARGS_6)

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnCodonstrTypeC

Checks whether a const char * codon is a Start codon, a Stop codon or something else

Synopsis

Prototype
ajint ajTrnCodonstrTypeC (
      const AjPTrn trnObj,
      const char* codon,
      char* aa
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const char*codonInputcodon to translate (these 3 characters need not be NULL-terminated)
char*aaOutputreturned translated amino acid (not a NULL-terminated array of char)
ajint RETURN1 if it is a start codon, -1 if it is a stop codon, else 0

Input
trnObj:(Input)Translation tables
codon:(Input)codon to translate (these 3 characters need not be NULL-terminated)
Output
aa:(Output)returned translated amino acid (not a NULL-terminated array of char)
Returns
ajint:1 if it is a start codon, -1 if it is a stop codon, else 0

Description

Checks whether a const char * codon is a Start codon, a Stop codon or something else

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnCodonstrTypeS

Checks whether the input codon is a Start codon, a Stop codon or something else

Synopsis

Prototype
ajint ajTrnCodonstrTypeS (
      const AjPTrn trnObj,
      const AjPStr codon,
      char* aa
);

TypeNameRead/WriteDescription
const AjPTrntrnObjInputTranslation tables
const AjPStrcodonInputcodon to check
char*aaOutputreturned translated amino acid (not a NULL-terminated array of char)
ajint RETURN1 if it is a start codon, -1 if it is a stop codon, else 0

Input
trnObj:(Input)Translation tables
codon:(Input)codon to check
Output
aa:(Output)returned translated amino acid (not a NULL-terminated array of char)
Returns
ajint:1 if it is a start codon, -1 if it is a stop codon, else 0

Description

Checks whether the input codon is a Start codon, a Stop codon or something else

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnGetTitle

Returns the translation table description. Because this is a pointer to the real internal string the caller must take care not to change the character string in any way. If the string is to be changed (case for example) then it must first be copied.

Synopsis

Prototype
AjPStr ajTrnGetTitle (
      const AjPTrn thys
);

TypeNameRead/WriteDescription
const AjPTrnthysInputTranslation object.
AjPStr RETURNDescription as a string.

Input
thys:(Input)Translation object.
Returns
AjPStr:Description as a string.

Description

Returns the translation table description. Because this is a pointer to the real internal string the caller must take care not to change the character string in any way. If the string is to be changed (case for example) then it must first be copied.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnGetFilename

Returns the file that the translation table was read from. Because this is a pointer to the real internal string the caller must take care not to change the character string in any way. If the string is to be changed (case for example) then it must first be copied.

Synopsis

Prototype
AjPStr ajTrnGetFilename (
      const AjPTrn thys
);

TypeNameRead/WriteDescription
const AjPTrnthysInputTranslation object.
AjPStr RETURNFile name as a string.

Input
thys:(Input)Translation object.
Returns
AjPStr:File name as a string.

Description

Returns the file that the translation table was read from. Because this is a pointer to the real internal string the caller must take care not to change the character string in any way. If the string is to be changed (case for example) then it must first be copied.

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnName

Checks whether a const char * codon is a Start codon, a Stop codon or something else

Synopsis

Prototype
const AjPStr ajTrnName (
      ajint trnFileNameInt
);

TypeNameRead/WriteDescription
ajinttrnFileNameIntInputtranslation table file name number
const AjPStr RETURNGenetic code description

Input
trnFileNameInt:(Input)translation table file name number
Returns
const AjPStr:Genetic code description

Description

Checks whether a const char * codon is a Start codon, a Stop codon or something else

See Also

See other functions in this section

Availability

In release 6.4.0

Function ajTrnExit

Cleans up translation processing internal memory

Synopsis

Prototype
void ajTrnExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

Returns
void:No return value

Description

Cleans up translation processing internal memory

See Also

See other functions in this section

Availability

In release 6.4.0