plot_variant_list {seqCAT} | R Documentation |
Plot a genotype grid from a list of known variants
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.
# Load test variant list data(test_variant_list) # Plot each variant's genotype per sample genotype_grid <- plot_variant_list(test_variant_list)