# Load example data
file <- system.file("extdata", "ExampleDb.gz", package="alakazam")
df <- readChangeoDb(file)
df <- df[c(1,10,100), c("SEQUENCE_ID", "JUNCTION")]
# Calculate default amino acid properties from amino acid sequences
# Use a custom output column prefix
df$JUNCTION_TRANS <- translateDNA(df$JUNCTION)
aminoAcidProperties(df, seq="JUNCTION_TRANS", label="JUNCTION")
# Calculate default amino acid properties from DNA sequences
aminoAcidProperties(df, seq="JUNCTION", nt=TRUE)
# Use the Grantham, 1974 side chain volume scores from the seqinr package
# Set pH=7.0 for the charge calculation
# Calculate only average volume and charge
# Remove the head and tail amino acids from the junction, thus making it the CDR3
library(seqinr)
data(aaindex)
x <- aaindex[["GRAR740103"]]$I
# Rename the score vector to use single-letter codes
names(x) <- translateStrings(names(x), ABBREV_AA)
# Calculate properties
aminoAcidProperties(df, property=c("bulk", "charge"), seq="JUNCTION", nt=TRUE,
trim=TRUE, label="CDR3", bulkiness=x, pH=7.0)Run the code above in your browser using DataLab