write_substitutions {agvgd} | R Documentation |
Generate and export a list of substitutions
Description
This function exports to a file a list of residue substitutions. The format used will be the same one as requested by the web version of Align-GVGD.
Usage
write_substitutions(
file,
alignment,
poi,
sub,
mode = c("recycle", "expand_grid")
)
Arguments
file |
A file path. |
alignment |
A character matrix or an alignment object obtained with
|
poi |
A whole number indicating the position of interest (POI). |
sub |
A character vector of protein residue substitutions to be classified. The amino acids must be provided as one-letter symbols. |
mode |
If both |
Value
This function is run for its side effect of writing a file. But it
returns the file path passed in file
.
Examples
write_substitutions(file = "ex01.csv",
alignment = read_alignment("ATM"),
poi = 20:25,
sub = amino_acids())
cat(readLines("ex01.csv"), sep = "\n")
write_substitutions(file = "ex02.csv",
alignment = read_alignment("ATM"),
poi = 20:21,
sub = amino_acids(),
mode = 'expand_grid')
cat(readLines("ex02.csv"), sep = "\n")