ajtranslate.c


Function ajTrnDel

Deletes a translation table object

Prototype

void ajTrnDel (
      AjPTrn* pthis
);

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

From EMBOSS 1.0.0


Function ajTrnNewC

Initialises translation. Reads a translation data file.

Prototype

AjPTrn ajTrnNewC (
      const char* filename
);

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

From EMBOSS 1.0.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.

Prototype

AjPTrn ajTrnNewI (
      ajint trnFileNameInt
);

TypeNameRead/WriteDescription
ajinttrnFileNameIntInputtranslation table file name number
AjPTrn RETURNTranslation object

From EMBOSS 1.0.0


Function ajTrnNew

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

Prototype

AjPTrn ajTrnNew (
      const AjPStr trnFileName
);

TypeNameRead/WriteDescription
const AjPStrtrnFileNameInputtranslation table file name
AjPTrn RETURNTranslation object

From EMBOSS 1.0.0


Function ajTrnReadFile

Reads a translation data file

Prototype

void ajTrnReadFile (
      AjPTrn trnObj,
      AjPFile trnFile
);

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

From EMBOSS 1.0.0


Function ajTrnNewPep

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

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

From EMBOSS 1.0.0


Function ajTrnCodonS

Translates a codon

Prototype

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

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

From EMBOSS 6.2.0


Function ajTrnCodonRevS

Translates the reverse complement of a codon

Prototype

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

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

From EMBOSS 6.2.0


Function ajTrnCodonC

Translates a const char * codon

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

From EMBOSS 1.0.0


Function ajTrnCodonRevC

Translates the reverse complement of a const char * codon

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

From EMBOSS 6.2.0


Function ajTrnCodonK

Translates a const char * codon to a char

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

From EMBOSS 1.0.0


Function ajTrnRevCodonK

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

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

From EMBOSS 1.0.0


Function ajTrnSeqC

Translates a sequence in a char

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

From EMBOSS 6.2.0


Function ajTrnSeqInitC

Translates a sequence in a char

Prototype

void ajTrnSeqInitC (
      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

From EMBOSS 6.2.0


Function ajTrnSeqRevC

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

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

From EMBOSS 6.2.0


Function ajTrnSeqRevinitC

Translates the reverse complement of a sequence in a char *. If the sequence begins with a defined alternative start codon, the residue is replaced with Methionine.

Prototype

void ajTrnSeqRevinitC (
      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

From EMBOSS 6.2.0


Function ajTrnSeqAltRevC

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

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

From EMBOSS 6.2.0


Function ajTrnSeqAltRevinitC

Translates the reverse complement of a sequence in a char *. If the sequence begins with a defined alternative start codon, the residue is replaced with Methionine.

Prototype

void ajTrnSeqAltRevinitC (
      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

From EMBOSS 6.2.0


Function ajTrnSeqS

Translates a sequence in a AjPStr.

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

From EMBOSS 6.2.0


Function ajTrnRevStr

Translates the reverse complement of a sequence in a AjPStr.

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

From EMBOSS 1.0.0


Function ajTrnSeqAltRevS

Translates the reverse complement of a sequence in a AjPStr.

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

From EMBOSS 6.2.0


Function ajTrnSeqSeq

Translates a sequence in a AjPSeq

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

From EMBOSS 6.2.0


Function ajTrnSeqRevSeq

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

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

From EMBOSS 6.2.0


Function ajTrnSeqAltRevSeq

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

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

From EMBOSS 6.2.0


Function ajTrnSeqFrameC

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

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

From EMBOSS 6.2.0


Function ajTrnSeqFrameS

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

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

From EMBOSS 6.2.0


Function ajTrnSeqFrameInitC

Translates a sequence in a char * in the specified frame. The translation is APPENDED to the input peptide. If the sequence begins with a defined alternative start codon, the residue is replaced with Methionine.

Prototype

void ajTrnSeqFrameInitC (
      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

From EMBOSS 6.2.0


Function ajTrnSeqFrameInitS

Translates a sequence in a AjStr in the specified frame. The translation is APPENDED to the input peptide. If the sequence begins with a defined alternative start codon, the residue is replaced with Methionine.

Prototype

void ajTrnSeqFrameInitS (
      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

From EMBOSS 6.2.0


Function ajTrnSeqFrameSeq

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

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

From EMBOSS 6.2.0


Function ajTrnSeqFrameSeqInit

Translates a sequence in an AjPSeq in the specified frame. The translation is APPENDED to the input peptide. If the sequence begins with a defined alternative start codon, the residue is replaced with Methionine.

Prototype

void ajTrnSeqFrameSeqInit (
      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

From EMBOSS 6.2.0


Function ajTrnSeqFramePep

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

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

From EMBOSS 2.0.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.

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)

From EMBOSS 6.2.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.

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;

From EMBOSS 6.2.0


Function ajTrnSeqInit

Translates a sequence, correcting first residue to methionine if it is a defined start codon in the translation table.

Prototype

AjPSeq ajTrnSeqInit (
      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

From EMBOSS 1.0.0


Function ajTrnSeqOrig

Translates a sequence.

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

From EMBOSS 1.0.0


Function ajTrnCodonstrTypeC

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

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

From EMBOSS 6.2.0


Function ajTrnCodonstrTypeS

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

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

From EMBOSS 6.2.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.

Prototype

AjPStr ajTrnGetTitle (
      const AjPTrn thys
);

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

From EMBOSS 1.0.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.

Prototype

AjPStr ajTrnGetFilename (
      const AjPTrn thys
);

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

From EMBOSS 6.2.0


Function ajTrnName

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

Prototype

const AjPStr ajTrnName (
      ajint trnFileNameInt
);

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

From EMBOSS 3.0.0


Function ajTrnExit

Cleans up translation processing internal memory

Prototype

void ajTrnExit (
      void
);

TypeNameRead/WriteDescription
void RETURN

From EMBOSS 4.0.0