clonalRelatedness: Clonal relatedness

View source: R/clonalRelatedness.R

clonalRelatednessR Documentation

Clonal relatedness

Description

Calculates the clonal relatedness for each repertoire_id in a study.

Usage

clonalRelatedness(study_table, editDistance = 10)

Arguments

study_table

A tibble of unproductive or productive junction sequences or productive junction sequences. Junction and duplicate_count are required columns.

editDistance

An integer giving the minimum edit distance that the sequence must be less than or equal to. See details below.

Details

Clonal relatedness is the proportion of junction sequences that are related by a defined edit distance threshold. The value ranges from 0 to 1 where 0 indicates no sequences are related and 1 indicates all sequences are related.

Edit distance is a way of quantifying how dissimilar two sequences are to one another by counting the minimum number of operations required to transform one sequence into the other. For example, an edit distance of 0 means the sequences are identical and an edit distance of 1 indicates that the sequences different by a single amino acid or junction.

Value

Returns a tibble with the calculated clonal relatedness for each repertoire_id.

Examples

file_path <- system.file("extdata", "IGH_sequencing", package = "LymphoSeq2")

stable <- readImmunoSeq(path = file_path)

clonal_relatedness <- clonalRelatedness(stable, editDistance = 10)

# Merge results with clonality table
clonality <- clonality(stable)
merged <- dplyr::full_join(clonality, clonal_relatedness, by = "repertoire_id")


elulu3/LymphoSeqTest documentation built on Aug. 27, 2022, 5:47 a.m.