calculate_similarity {seqCAT} | R Documentation |
Calculate the similarity statistics for SNV profile comparisons.
calculate_similarity(data, similarity = NULL, a = 1, b = 5)
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). |
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.
A dataframe with summary statistics.
# 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)