calculate_similarity {seqCAT} | R Documentation

## SNV profile similarity calculations

### Description

Calculate the similarity statistics for SNV profile comparisons.

### Usage

    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

    # 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)

[Package seqCAT version 1.12.0 Index]