plotobservedsnps: Plot expected frequency of polymorphic sites in a model deep...

Description Usage Arguments Details Value Author(s) Examples

View source: R/plotobservedsnps.R

Description

Given an average depth of coverage and per base sequencing error rate, estimate the read frequency of most common polymorphic sites.

Usage

1
2
plotobservedsnps(data, timepoint=1, coverage=50, error=0.001, iterations=100, maxsnp=50, 
            legend=TRUE, ylim=c(0,1.5*coverage), ...)

Arguments

data

Full sequence data generated from the simulatepopulation function.

timepoint

Which sampling time should be used.

coverage

Coverage depth.

error

Sequencing erorr rate per base.

iterations

Number of iterations to generate confidence bounds.

maxsnp

Number of polymorphic sites to show.

legend

Should a legend be plotted?

ylim

Bounds of y axis.

...

Additional arguments to be passed to plot.

Details

Plots the expected number of reads containing the most frequent polymorphisms, with a 95% confidence interval, derived from repeated random draws. Additionally shows the frequency of false positive observations arising through sequencing error.

Value

Returns an iterations x maxsnp matrix. Each column represents a polymorphic site, and each row one iteration. Each entry provides the number of reads containing the polymorphism in a given iteration. Columns are ordered by frequency.

Author(s)

T. D. Read (tread@emory.edu)

Examples

1
2
3
4
5
6
7
8
data(deepseq)

# At the 25th time point
plotobservedsnps(data=deepseq, timepoint=25, xaxt="n", xlab="Ranked polymorphic sites", 
      ylab="Reads", yaxs="i", las=1)
# At the 50th time point
plotobservedsnps(data=deepseq, timepoint=50, xaxt="n", xlab="Ranked polymorphic sites", 
      ylab="Reads", yaxs="i", las=1)

seedy documentation built on May 29, 2017, 10:58 a.m.