Documentation for SLiM function codonsToAminoAcids
, which is a method of
the SLiM class SLiMBuiltin
.
Note that the R function is a stub, it does not do anything in R (except bring
up this documentation). It will only do
anything useful when used inside a slim_block
function further
nested in a slim_script
function call, where it will be translated into valid SLiM code as part of a
full SLiM script.
codonsToAminoAcids(codons, long, paste)
An object of type integer. See details for description.
An object of type logical or integer. Must be of length 1 (a
singleton). The default value is F
. See details for description.
An object of type logical. Must be of length 1 (a singleton). The
default value is T
. See details for description.
An object of type integer or string.
Documentation for this function can be found in the official SLiM manual: page 748.
Returns the amino acid sequence corresponding to the codon sequence in codons. Codons should be represented with values in [0, 63] where AAA is 0, AAC is 1, AAG is 2, and TTT is 63; see ancestralNucleotides() for discussion of this encoding. If long is F (the default), the standard single-letter codes for amino acids will be used (where Serine is "S", etc.); if long is T, the standard three-letter codes will be used instead (where Serine is "Ser", etc.). Beginning in SLiM 3.5, if long is 0, integer codes will be used as follows (and paste will be ignored): stop (TAA, TAG, TGA) 0 Alanine 1 Arginine 2 Asparagine 3 Aspartic acid (Aspartate) 4 Cysteine 5 Glutamine 6 Glutamic acid (Glutamate) 7 Glycine 8 Histidine 9 Isoleucine 10 Leucine 11 Lysine 12 Methionine 13 Phenylalanine 14 Proline 15 Serine 16 Threonine 17 Tryptophan 18 Tyrosine 19 Valine 20 There does not seem to be a widely used standard for integer coding of amino acids, so SLiM just numbers them alphabetically, making stop codons 0. If you want a different coding, you can make your own 64-element vector and use it to convert codons to whatever integer codes you need. Other integer values of long are reserved for future use (to support other codings), and will currently produce an error. When long is T or F and paste is T (the default), the amino acid sequence returned will be a singleton string, such as "LYATI" (when long is F) or "Leu-Tyr-Ala-Thr-Ile" (when long is T). When long is T or F and paste is F, the amino acid sequence will instead be returned as a string vector, with one element per amino acid, such as "L" "Y" "A" "T" "I" (when long is F) or "Leu" "Tyr" "Ala" "Thr" "Ile" (when long is T). Using the paste=T option is considerably faster than using paste() in script. This function interprets the supplied codon sequence as the sense strand (i.e., the strand that is not transcribed, and which mirrors the mRNA's sequence). This uses the standard DNA codon table directly. For example, if the nucleotide sequence is CAA TTC, that will correspond to a codon vector of 16 61, and will result in the amino acid sequence Gln-Phe ("QF"). (is)codonsToNucleotides(integer codons, [string$ format = "string"]) Returns the nucleotide sequence corresponding to the codon sequence supplied in codons. Codons should be represented with values in [0, 63] where AAA is 0, AAC is 1, AAG is 2, and TTT is 63; see ancestralNucleotides() for discussion of this encoding. The format parameter controls the format of the returned sequence. It may be "string" to obtain the sequence as a singleton string (e.g., "TATACG"), "char" to obtain it as a string vector of single characters (e.g., "T", "A", "T", "A", "C", "G"), or "integer" to obtain it as an integer vector (e.g., 3, 0, 3, 0, 1, 2), using SLiM's standard code of A=0, C=1, G=2, T=3.
This is documentation for a function in the SLiM software, and has been reproduced from the official manual, which can be found here: http://benhaller.com/slim/SLiM_Manual.pdf. This documentation is Copyright © 2016-2020 Philipp Messer. All rights reserved. More information about SLiM can be found on the official website: https://messerlab.org/slim/
Other SLiMBuiltin:
SB
,
calcFST()
,
calcHeterozygosity()
,
calcInbreedingLoad()
,
calcPairHeterozygosity()
,
calcVA()
,
calcWattersonsTheta()
,
mm16To256()
,
mmJukesCantor()
,
mmKimura()
,
nucleotideCounts()
,
nucleotideFrequencies()
,
nucleotidesToCodons()
,
summarizeIndividuals()
,
treeSeqMetadata()
## This just brings up the documentation:
codonsToAminoAcids()