plot_variant_list: Plot known variants list

Description Usage Arguments Details Value Examples

View source: R/plot_variant_list.R

Description

Plot a genotype grid from a list of known variants

Usage

1
2
3
plot_variant_list(variant_list, legend = TRUE, legend_size = 22,
  text_size = 14, palette = c("#4e8ce4", "#a6c6f2", "#999999",
  "#cccccc"))

Arguments

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)

Details

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

Value

A ggplot2 graphical object.

Examples

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)

fasterius/seqCAT documentation built on Feb. 12, 2022, 7:24 p.m.