codonsToAminoAcids: SLiM method codonsToAminoAcids

Description Usage Arguments Details Value Copyright Author(s)

View source: R/slim_lang.R

Description

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.

Usage

1
codonsToAminoAcids(codons, long, paste)

Arguments

codons

An object of type integer or logical or logical. See details for description.

long

An object of type integer or logical or logical. Must be of length 1 (a singleton). The default value is F. See details for description.

paste

An object of type integer or logical or logical. Must be of length 1 (a singleton). The default value is T. See details for description.

Details

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.). When 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 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.

Value

An object of type string or float or float or float or integer or float or integer.

Copyright

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/

Author(s)

Benjamin C Haller (bhaller@benhaller.com) and Philipp W Messer (messer@cornell.edu)


rdinnager/slimrlang documentation built on June 20, 2020, 8:17 p.m.