View source: R/mutation-frequency.R
mutation_frequency | R Documentation |
Generate a table representing the frequency of unique mutations. In order to ensure confidence in the results, a threshold is provided indicating confidence in genotype calls. All data that do not meet this threshold will be removed from the computation.
mutation_frequency(data, threshold)
## S3 method for class 'ref_alt_cov_tbl'
mutation_frequency(data, threshold)
data |
A data frame, data frame extension (e.g. a tibble), or a lazy data frame (e.g. from dbplyr or dtplyr). |
threshold |
A minimum UMI count which reflects the confidence in the genotype call. Data with a UMI count of less than the threshold will be filtered out from the analysis. |
A tibble with the extra class mut_freq
. The
output has the following columns:
mutation_name
: The unique mutation sequenced.
frequency
: The frequency of the mutation.
plot_mutation_frequency()
for plotting the table.
# Read example data
data <- read_tbl_ref_alt_cov(
miplicorn_example("reference_AA_table.csv"),
miplicorn_example("alternate_AA_table.csv"),
miplicorn_example("coverage_AA_table.csv"),
gene == "atp6" | gene == "crt"
)
# Compute mutation frequency
mutation_frequency(data, 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.