Skip to contents

convert_single() converts the 1-letter abbreviation to the 3-letter abbreviation and convert_three() does the opposite.

Usage

convert_single(str)

convert_three(str)

Arguments

str

String containing amino acids to convert.

Details

Conversion is case-insensitive, but always returns capitalized 1-letter abbreviation and 3-letter abbreviation in title-case.

Examples

# Convert 1-letter abbreviation
convert_single("G235L")
#> [1] "Gly235Leu"
convert_single("s545p")
#> [1] "Ser545Pro"

# Convert 3-letter abbreviation
convert_three("Gly235Leu")
#> [1] "G235L"
convert_three("SER545LEU")
#> [1] "S545L"