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/Integrating-HLA-typing-methods-and-RNA-seq documentation built on Nov. 23, 2019, 1:57 a.m.