histSampCov: histSampCov function

View source: R/histSampCov.R

histSampCovR Documentation

histSampCov function

Description

Produce a Histogram of Mean Coverage Across mtDNA Loci for Subjects.

Usage

histSampCov(coverage, loci = seq_len(.mtLength), type = "median", ...)

Arguments

coverage

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", …).

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

histSampCov(coverage, loci="coding")


## End(Not run)


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