# \donttest{
# Subset example data to 50 sequences, one sample and isotype as a demo
data(ExampleDb, package="alakazam")
db <- subset(ExampleDb, sample_id == "-1h" & c_call=="IGHG")[1:50,]
# Use nucleotide Hamming distance and normalize by junction length
db <- distToNearest(db, sequenceColumn="junction", vCallColumn="v_call",
jCallColumn="j_call", model="ham", normalize="len", nproc=1)
# Find threshold using the "gmm" method with user defined specificity
output <- findThreshold(db$dist_nearest, method="gmm", model="gamma-gamma",
cutoff="user", spc=0.99)
plot(output, binwidth=0.02, title=paste0(output@model, " loglk=", output@loglk))
print(output)
# }
Run the code above in your browser using DataLab