Description Usage Arguments Details Value Examples
View source: R/plot_variant_list.R
Plot a genotype grid from a list of known variants
1 2 3 | plot_variant_list(variant_list, legend = TRUE, legend_size = 22,
text_size = 14, palette = c("#4e8ce4", "#a6c6f2", "#999999",
"#cccccc"))
|
variant_list |
The data containing the variants (dataframe) |
legend |
Show a legend for the genotype colours (boolean) |
legend_size |
Size of the legend (numeric). |
text_size |
Text size for axes and legend (numeric). |
palette |
Nucleotide colour palette (4-element character vector) |
This function creates publication-ready plots from lists of known variants, taking a dataframe containing all the genotypes (on "A1/A2" format) for each sample (columns) and variant (row names).
A ggplot2 graphical object.
1 2 3 4 5 | # Load test variant list
data(test_variant_list)
# Plot each variant's genotype per sample
genotype_grid <- plot_variant_list(test_variant_list)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.