ajtranslate.c
Deletes a translation table object
Synopsis
Prototype
void ajTrnDel (
AjPTrn* pthis
);
Type | Name | Read/Write | Description |
AjPTrn* | pthis | Delete | Address of translation table object |
void | | RETURN | |
Output
pthis: | (Delete) | Address of translation table object |
Returns
Description
Deletes a translation table object
See Also
See other functions in this section
Availability
In release 6.4.0
Initialises translation. Reads a translation data file.
Synopsis
Prototype
AjPTrn ajTrnNewC (
const char* filename
);
Type | Name | Read/Write | Description |
const char* | filename | Input | translation table file name |
AjPTrn | | RETURN | Translation 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
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
);
Type | Name | Read/Write | Description |
ajint | trnFileNameInt | Input | translation table file name number |
AjPTrn | | RETURN | Translation 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
Initialises translation. Reads a translation data file
ajTrnDel should be called when translation has ceased.
Synopsis
Prototype
AjPTrn ajTrnNew (
const AjPStr trnFileName
);
Type | Name | Read/Write | Description |
const AjPStr | trnFileName | Input | translation table file name |
AjPTrn | | RETURN | Translation 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
Reads a translation data file
The destructor ajTrnDel should be called when translation has ceased.
Synopsis
Prototype
void ajTrnReadFile (
AjPTrn trnObj,
AjPFile trnFile
);
Type | Name | Read/Write | Description |
AjPTrn | trnObj | Output | translation table object |
AjPFile | trnFile | Modify | translation table file handle |
void | | RETURN | |
Output
trnObj: | (Output) | translation table object |
Input & Output
trnFile: | (Modify) | translation table file handle |
Returns
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
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
);
Type | Name | Read/Write | Description |
const AjPSeq | nucleicSeq | Input | nucleic sequence being translated |
ajint | frame | Input | frame of translation (-3,-2,-1,0,1,2,3,4,5,6) |
AjPSeq | | RETURN | New 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
Translates a codon
Synopsis
Prototype
char ajTrnCodonS (
const AjPTrn trnObj,
const AjPStr codon
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const AjPStr | codon | Input | codon to translate |
char | | RETURN | Amino 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
Translates the reverse complement of a codon
Synopsis
Prototype
char ajTrnCodonRevS (
const AjPTrn trnObj,
const AjPStr codon
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const AjPStr | codon | Input | codon to translate |
char | | RETURN | Amino 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
Translates a const char * codon
Synopsis
Prototype
char ajTrnCodonC (
const AjPTrn trnObj,
const char* codon
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const char* | codon | Input | codon to translate
(these 3 characters need not be NULL-terminated) |
char | | RETURN | Amino 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
Translates the reverse complement of a const char * codon
Synopsis
Prototype
char ajTrnCodonRevC (
const AjPTrn trnObj,
const char* codon
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const char* | codon | Input | codon to translate
(these 3 characters need not be NULL-terminated) |
char | | RETURN | Amino 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
Translates a const char * codon to a char
Synopsis
Prototype
char ajTrnCodonK (
const AjPTrn trnObj,
const char* codon
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const char* | codon | Input | codon to translate
(these 3 characters need not be NULL-terminated) |
char | | RETURN | Amino 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
Translates a the reverse complement of a const char * codon to a char
Synopsis
Prototype
char ajTrnRevCodonK (
const AjPTrn trnObj,
const char* codon
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const char* | codon | Input | codon to translate
(these 3 characters need not be NULL-terminated) |
char | | RETURN | Amino 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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const char* | str | Input | sequence string to translate |
ajint | len | Input | length of sequence string to translate |
AjPStr* | pep | Modify | returned 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
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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const char* | str | Input | sequence string to translate |
ajint | len | Input | length of sequence string to translate |
AjPStr* | pep | Modify | returned 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
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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const char* | str | Input | sequence string to translate |
ajint | len | Input | length of sequence string to translate |
AjPStr* | pep | Modify | returned 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
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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const AjPStr | str | Input | sequence string to translate |
AjPStr* | pep | Modify | returned 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
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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const AjPStr | str | Input | sequence string to translate |
AjPStr* | pep | Modify | returned 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
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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const AjPStr | str | Input | sequence string to translate |
AjPStr* | pep | Modify | returned 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
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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const AjPSeq | seq | Input | sequence to translate |
AjPStr* | pep | Modify | returned 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
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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const AjPSeq | seq | Input | sequence to translate |
AjPStr* | pep | Modify | returned 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
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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const AjPSeq | seq | Input | sequence to translate |
AjPStr* | pep | Modify | returned 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
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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const char* | seq | Input | sequence string to translate |
ajint | len | Input | length of sequence string to translate |
ajint | frame | Input | frame to translate in |
AjPStr* | pep | Modify | returned 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
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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const AjPStr | seq | Input | sequence string to translate |
ajint | frame | Input | frame to translate in |
AjPStr* | pep | Modify | returned 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
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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const AjPSeq | seq | Input | sequence string to translate |
ajint | frame | Input | frame to translate in |
AjPStr* | pep | Modify | returned 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
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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const AjPSeq | seq | Input | sequence string to translate |
ajint | frame | Input | frame to translate in |
AjPSeq | | RETURN | returned 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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const char* | seq | Input | sequence string to translate |
ajint | frame | Input | frame to translate in |
AjPStr* | pep | Modify | returned peptide translation (APPENDED TO INPUT) |
ajint | | RETURN | Number 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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const AjPStr | seq | Input | sequence string to translate |
ajint | frame | Input | frame to translate in |
AjPStr* | pep | Modify | returned peptide translation (APPENDED TO INPUT) |
ajint | | RETURN | Number 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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const AjPSeq | seq | Input | sequence to translate |
ajint | frame | Input | frame to translate in (-6 to 6) |
AjPSeq | | RETURN | Peptide 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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const char* | codon | Input | codon to translate
(these 3 characters need not be NULL-terminated) |
char* | aa | Output | returned translated amino acid
(not a NULL-terminated array of char) |
ajint | | RETURN | 1 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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | trnObj | Input | Translation tables |
const AjPStr | codon | Input | codon to check |
char* | aa | Output | returned translated amino acid
(not a NULL-terminated array of char) |
ajint | | RETURN | 1 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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | thys | Input | Translation object. |
AjPStr | | RETURN | Description 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
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
);
Type | Name | Read/Write | Description |
const AjPTrn | thys | Input | Translation object. |
AjPStr | | RETURN | File 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
Checks whether a const char * codon is a Start codon, a Stop codon or
something else
Synopsis
Prototype
const AjPStr ajTrnName (
ajint trnFileNameInt
);
Type | Name | Read/Write | Description |
ajint | trnFileNameInt | Input | translation table file name number |
const AjPStr | | RETURN | Genetic 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
Cleans up translation processing internal memory
Synopsis
Prototype
void ajTrnExit (
void
);
Type | Name | Read/Write | Description |
void | | RETURN | |
Returns
Description
Cleans up translation processing internal memory
See Also
See other functions in this section
Availability
In release 6.4.0