calculate_similarity: SNV profile similarity calculations

Description Usage Arguments Details Value Examples

View source: R/calculate_similarity.R

Description

Calculate the similarity statistics for SNV profile comparisons.

Usage

1
calculate_similarity(data, similarity = NULL, a = 1, b = 5)

Arguments

data

The input SNV data dataframe.

similarity

Optional dataframe to add results to.

a

Similarity score parameter a (integer).

b

Similarity score parameter b (integer).

Details

This function calculates various summary statistics and sample similarities for a given profile comparison dataframe. It returns a small dataframe with the overall similarity score (whose parameters 'a' and 'b' can be adjusted in the function call), total SNV data, the concordance of the data and the sample names in question. This dataframe can also be given to the function, in which case it will simply add another row for the current samples, facilitating downstream aggregate analyses.

Value

A dataframe with summary statistics.

Examples

1
2
3
4
5
6
7
8
# Load test data
data(test_comparison)

# Calculate similarities
similarity <- calculate_similarity(test_comparison)

# Add another row of summary statistics
calculate_similarity(test_comparison, similarity = similarity)

seqCAT documentation built on Nov. 1, 2018, 2:07 a.m.