plot_json: Plot variants from a JSON file

Description Usage Arguments Value

View source: R/plot_json.R

Description

Adds a geom_point layer to the output of mito_plot showing mitochondrial variants contained in the given JSON file

Usage

1
2
3
4
plot_json(json_file, json_format = "vector", pos_col = "POS",
  ref_col = "REF", alt_col = "ALT", show_loci_names = TRUE,
  show_loci_legend = TRUE, show_var_labels = FALSE, title = "",
  save_plot = FALSE, save_to = "mitoviz_plot.png")

Arguments

json_file

Path of the input JSON file

json_format

JSON format used; allowed values are c("vector", "dataframe") (default = "vector")

pos_col

When json_format = "dataframe", name of column containing variants position (default = "POS")

ref_col

When json_format = "dataframe", name of column containing variants reference allele (default = "REF")

alt_col

When json_format = "dataframe", name of column containing variants alternate allele (default = "ALT")

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.