amino_acid_names: Retrieve amino acid names

View source: R/amino_acid_names.R

amino_acid_namesR Documentation

Retrieve amino acid names

Description

Retrieve amino acid names based on an input string, following IUPAC names.

Usage

amino_acid_names(X.in, X.type, Y.type, showTable = FALSE)

Arguments

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 X.in.

Y.type

Character: a single value, one of "single", "three", or "full". The type of the output you want to return for X.in.

showTable

Logical: Show the amino acid name table instead of performing the name retrieval? Default = FALSE.

Details

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.

Value

Returns a character vector of amino acid names in desired output format.

Examples

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


j-a-thia/genomalicious documentation built on Oct. 19, 2024, 7:51 p.m.