Learn R Programming

seedy (version 1.3)

plotdiversity: Plot genetic diversity over time

Description

Calculates and plots the genetic diversity (mean pairwise number of SNPs between samples) in deep-sequenced samples.

Usage

plotdiversity(X, sample.times, makeplot = TRUE, filter=FALSE, ...)

Arguments

X
Simulated deep sequence data over time.
sample.times
Vector of sample collection times.
makeplot
Should diversity samples be plotted?
filter
Should a subset of the sequence data be plotted? That is, should only the sequences at sample.times be plotted, out of a larger sample set?
...
Additional arguments to be passed to plot (if makeplot=TRUE).

Value

  • Returns a vector of diversity values for each sample time.

Examples

Run this code
data(deepseq)
D <- plotdiversity(deepseq, sample.times=(1:50)*1000, xlab="Time", 
                   ylab="Expected pairwise SNPs")

Run the code above in your browser using DataLab