View source: R/amino_acid_names.R
amino_acid_names | R Documentation |
Retrieve amino acid names based on an input string, following IUPAC names.
amino_acid_names(X.in, X.type, Y.type, showTable = FALSE)
X.in |
Character: a vector of amino acids to retrieve names. Can be either single letter, three letter, or full. See Details. |
X.type |
Character: a single value, one of "single", "three", or "full".
The type of the input for |
Y.type |
Character: a single value, one of "single", "three", or "full".
The type of the output you want to return for |
showTable |
Logical: Show the amino acid name table instead of performing the name retrieval? Default = FALSE. |
Input the string of amino acid in either single letter (e.g., 'A'),
three letter (e.g., 'Ala') or full (e.g., 'Alanin') with X.in
. Specify
what the input format is with X.type
. Specify the desired format of
name you want back with Y.type
.
Returns a character vector of amino acid names in desired output format.
library(genoalicious)
# Vector of amino acids in single letter form
aa_vec <- c('A','W','Y','N','K','Q')
# Show the table
amino_acid_names(showTable=TRUE)
# Match to three letters
aa3_vec <- amino_acid_names(X.in=aa_vec, X.type='single', Y.type='three')
aa3_vec
# Match three letters to full
aafull_vec <- amino_acid_names(X.in=aa3_vec, X.type='three', Y.type='full')
aafull_vec
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.