% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{getMutCount}
\alias{getMutCount}
\title{Determine the mutation counts from allele calls}
\usage{
getMutCount(samples, allele_calls, germline_db)
}
\arguments{
\item{samples}{vector of IMGT-gapped sample V sequences}

\item{allele_calls}{vector of strings representing Ig allele calls for
the sequences in \code{samples}, where multiple
calls are separated by a comma}

\item{germline_db}{vector of named nucleotide germline sequences
matching the calls detailed in \code{allele_calls}}
}
\value{
A list equal in length to \code{samples}, containing the Hamming
          distance to each germline allele contained within each call within
          each element of \code{samples}
}
\description{
\code{getMutCount} takes a set of nucleotide sequences and their allele calls
and determines the distance between that sequence and any germline alleles
contained within the call
}
\examples{
# Insert a mutation into a germline sequence
s2 <- s3 <- SampleGermlineIGHV[1]
stringi::stri_sub(s2, 103, 103) <- "G"
stringi::stri_sub(s3, 107, 107) <- "C"

sample_seqs <- c(SampleGermlineIGHV[2], s2, s3)

# Pretend that one sample sequence has received an ambiguous allele call
sample_alleles <- c(paste(names(SampleGermlineIGHV[1:2]), collapse=","),
                    names(SampleGermlineIGHV[2]),
                    names(SampleGermlineIGHV[1]))

# Compare each sequence to its assigned germline(s) to determine the distance
getMutCount(sample_seqs, sample_alleles, SampleGermlineIGHV)

}
