calculateHamming: Calculate Hamming distance between all samples

Description Usage Arguments Details Value Author(s) Examples

View source: R/calculateSimilarity.R

Description

Takes an object containing HLA typing information for all samples and computes the Hamming distance for each pair of samples.

Usage

1
calculateHamming(hla_data)

Arguments

hla_data

a list of class HLADataset containing a tibble object with the HLA typing information for all samples. At least 2 samples must be present be able to calculate the metric.

Details

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.

Value

a list of class HLAMetric containing the following elements:

Author(s)

Santiago Medina, Nissim Ranade

Examples

1
2
3
4
5
## Load example dataset
data(demoHLADataset)

## Calculate Hamming distance metric
calculateHamming(demoHLADataset)

NCBI-Hackathons/HLAClustRView documentation built on Nov. 22, 2019, 6:11 a.m.