makeDistanceMatrix: Convert distance table to distance matrix

Description Usage Arguments Value Author(s) Examples

View source: R/calculateSimilarity.R

Description

This function takes a distance table under the form of a tibble object and transforms it into a distance matrix ready for clustering.

Usage

1

Arguments

outMet

a tibble object containing distance metric for sample pairs.

Value

a matrix containing the distance for sample pairs.

Author(s)

Santiago Medina, Pascal Belleau, Astrid Deschenes

Examples

1
2
3
4
5
6
7
8
9
## Tibble object containing a distance table
pairedData <- data.frame(SampleName1=c("ERR053", "ERR053", "ERR465"),
    SampleName2=c("ERR465", "ERR040", "ERR040"),
    HammingDistance = c(17, 18, 19))

tibbleData <- dplyr::as_tibble(pairedData)

## Calculate distance matrix
HLAClustRView:::makeDistanceMatrix(tibbleData)

NCBI-Hackathons/Integrating-HLA-typing-methods-and-RNA-seq documentation built on Nov. 23, 2019, 1:57 a.m.