plotCover: plotCover function

View source: R/plotCover.R

plotCoverR Documentation

plotCover function

Description

Produce a Diagnostic Scatter Plot to Visualize Mean Coverage Across Subjects for Each Locus.

Usage

plotCover(
  x,
  loci = seq_len(.mtLength),
  col = "blue",
  pch = ".",
  cex = 0.2,
  xlab = "mtloci",
  ylab = "",
  main = "Median Coverage for all mtDNA loci",
  type = "median",
  ...
)

Arguments

x

a numeric matrix (16569 x N). Rows correspond to loci and columns correspond to subjects. This matrix contains the reads coverage of the 16569 mtDNA loci for each subject. The matrix must contain the subject ID as the column names.

loci

one of the following to specify mtDNA loci: 1. a numeric vector (default is c(1:16569)) of mitochondrial DNA loci, 2. a character string for the regions(e.g. "coding", "tRNA", "Dloop", …).

col

color to be used in the plot.

pch

plotting "character", i.e., symbol to use.

cex

expansion factor for symbols used in the plot.

xlab

a label for the x axis.

ylab

a label for the y axis.

main

a title for the plot.

type

a string: "median" to calculate median coverage at individual level, "mean" to calculate mean coverage at individual level

...

arguments to be passed to plot function.

Examples


## Not run: 
## Read input data
coverage_file <- "coverage.csv"
coverage <- as.matrix(read.csv(file=coverage_file, sep=",", header=FALSE))

plotCover(coverage, loci="coding")


## End(Not run)


mtDNA-BU/mtdnaANNO documentation built on Aug. 11, 2022, 10:57 a.m.