Description Usage Arguments Details Value Author(s) Examples
View source: R/calculateSimilarity.R
Takes an object containing HLA typing information for all samples and computes the Hamming distance for each pair of samples.
1 | calculateHamming(hla_data)
|
hla_data |
a |
The Hamming distance is given by
min(s1A1 != s2A1 + s1A2 != s2A2, s1A1 != s2A2 + s1A2 != s2A1) where
s1
and s2
are two samples and A1
and A2
are
there alleles.
a list
of class HLAMetric
containing the following elements:
metric
a character
string containing the name of the
metric "Hamming Distance".
dist
a matrix
that contains the Hamming distance between
samples.
Santiago Medina, Nissim Ranade
1 2 3 4 5 | ## Load example dataset
data(demoHLADataset)
## Calculate Hamming distance metric
calculateHamming(demoHLADataset)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.