plot_df: Plot variants from a dataframe

Description Usage Arguments Value

View source: R/plot_df.R

Description

Adds a geom_point layer to the output of mito_plot showing mitochondrial variants contained in the given dataframe.

Usage

1
2
3
4
5
plot_df(dataframe, pos_col = "POS", ref_col = "REF", alt_col = "ALT",
  sample_col = "SAMPLE", gt_col = "GT", hf_col = "HF",
  show_loci_names = TRUE, show_loci_legend = TRUE,
  show_var_labels = FALSE, title = "", save_plot = FALSE,
  save_to = "mitoviz_plot.png")

Arguments

dataframe

Name of the input dataframe

pos_col

Name of column containing variants position (default = "POS")

ref_col

Name of column containing variants reference allele (default = "REF")

alt_col

Name of column containing variants alternate allele (default = "ALT")

sample_col

Name of column containing sample name for each variant (default = "SAMPLE")

gt_col

Name of column containing GT information, mostly from VCF files (default = "GT")

hf_col

Name of column containing HF information, mostly from VCF files (default = "HF")

show_loci_names

Show labels of loci names on the genome (default = TRUE)

show_loci_legend

Show legend for locus type colours (default = TRUE)

show_var_labels

Show labels with the position for each variant (default = FALSE)

title

Set plot title (default = "")

save_plot

Save the current plot to a file (default = FALSE)

save_to

Path or filename to which the current plot will be saved (default = "mitoviz_plot.png")

Value

p ggplot2 polar plot variants on the human mitochondrial genome


robertopreste/mitovizR documentation built on May 22, 2019, 2:46 p.m.