Title: | Estimation of the amplicon methylation pattern distribution from bisulphite sequencing data |
---|---|
Description: | Estimate distribution of methylation patterns from a table of counts from a bisulphite sequencing experiment given a non-conversion rate and read error rate. |
Authors: | Peijie Lin, Sylvain Foret, Conrad Burden |
Maintainer: | Conrad Burden <[email protected]> |
License: | GPL (>= 3) |
Version: | 1.43.0 |
Built: | 2024-11-18 03:22:34 UTC |
Source: | https://github.com/bioc/MPFE |
Estimate distribution of methylation patterns from a table of counts from a bisulphite sequencing experiment given a non-conversion rate and sequencing error rate.
Package: | MPFE |
Type: | Package |
License: | GPL(>=3) |
The main component of this package is the function estimatePatterns
,
which reads a table of read counts of bisulphite sequencing data for a given
amplicon and generates a table and plot of the estimated distribution over
methylation patterns.
Peijie Lin, Sylvain Foret, Conrad Burden
Maintainer: [email protected]
data(patternsExample) estimates <- estimatePatterns(patternsExample, epsilon=0.02, eta=0.01) estimates plotPatterns(estimates[[2]])
data(patternsExample) estimates <- estimatePatterns(patternsExample, epsilon=0.02, eta=0.01) estimates plotPatterns(estimates[[2]])
Estimate distribution of methylation patterns from a table of counts from a bisulphite sequencing experiment given a non-conversion rate and a sequencing error rate.
estimatePatterns(patternCounts, epsilon=0, eta=0, column=NULL, fast=TRUE, steps=20000, reltol=1e-12)
estimatePatterns(patternCounts, epsilon=0, eta=0, column=NULL, fast=TRUE, steps=20000, reltol=1e-12)
patternCounts |
data frame with methylation patterns in first column and pattern counts in subsequent columns. |
epsilon |
non-converson rate, a value between 0 and 1. |
eta |
error rate, either a vector of numbers between 0 and 1 of length equal to the number of CpG sites or a single value between 0 and 1 for a single error rate across all sites. |
column |
a vector that specifies the indices of the columns of ‘patternCounts’ to process. Its entries are integer values from 1 to the number of pattern counts columns in ‘patternCounts’. If NULL, defaults to all columns. |
fast |
logical, if TRUE, fast version implemented (default). |
steps |
number of steps for the optimiser, passed to |
reltol |
relative tolerance for the optimiser, passed to |
The function returns a list of data frames.
The data frames contain the following columns:
pattern |
the list of input patterns (factor) |
coverage |
the number of reads for each pattern (integer) |
observedDistribution |
the observed frequencies of each pattern (numeric) |
estimatedDistribution |
the estimated frequencies (numeric) |
spurious |
indicates whether the patterns are real or spurious (logical) |
Peijie Lin, Sylvain Foret, Conrad Burden
data(patternsExample) estimatePatterns(patternsExample, epsilon=0.02, eta=0.01) estimatePatterns(patternsExample, epsilon=0.01, eta=c(0.015, 0.01, 0.01, 0.01, 0.015), column=2)
data(patternsExample) estimatePatterns(patternsExample, epsilon=0.02, eta=0.01) estimatePatterns(patternsExample, epsilon=0.01, eta=c(0.015, 0.01, 0.01, 0.01, 0.015), column=2)
Plot the observed distribution and the estimated distribution of the methylation patterns
patternMap(patterns, minFreq=0, maxFreq=1, noSpurious=TRUE, estimatedDistribution=TRUE, topDown=TRUE, allTicks=FALSE, methCol='black', unMethCol='white', ...)
patternMap(patterns, minFreq=0, maxFreq=1, noSpurious=TRUE, estimatedDistribution=TRUE, topDown=TRUE, allTicks=FALSE, methCol='black', unMethCol='white', ...)
patterns |
A data frame obtained from the output of the function |
minFreq |
Only plot patterns with at least |
maxFreq |
Only plot patterns with more |
noSpurious |
Don't plot spurious patterns (only relevant if |
estimatedDistribution |
Use the frequencies from the estimated distribution. If |
topDown |
Put the most abundant patterns at the top. If |
allTicks |
Draw a tick under every position. |
methCol |
The colour for the methylated positions. Can be a single colour, a vector of colours (recycled), or a function (for instance from |
unMethCol |
As |
... |
Other arguments passed to |
This function draws a map of the different pattern and their frequencies based on the values returned by estimatePatterns
.
Peijie Lin, Sylvain Foret, Conrad Burden
data(patternsExample) estimates <- estimatePatterns(patternsExample, epsilon=0.02, eta=0.01) patternMap(estimates[[1]])
data(patternsExample) estimates <- estimatePatterns(patternsExample, epsilon=0.02, eta=0.01) patternMap(estimates[[1]])
A data frame which contains a column of methylation patterns and two columns of counts. This data was obtained as described in Lyko, F., Forest, S., Kucharski, R., Wolf, S., Falckenhayn, C., and Maleszka, R. (2010). The honey bee epigenomes: differential methylation of brain DNA in queens and workers. PLoS Biol, 8(11), e1000506.
data(patternsExample)
data(patternsExample)
This data frame contains the following columns:
methylation patterns
first column of counts
second column of counts
Plot the observed distribution and the estimated distribution of the methylation patterns
plotPatterns(compareData, yLimit1=NULL, yLimit2=NULL)
plotPatterns(compareData, yLimit1=NULL, yLimit2=NULL)
compareData |
data frame, obtained from the output of the function |
yLimit1 |
upper limit of y-axis on left hand scale of the first graph. If NULL, defaults to show all patterns |
yLimit2 |
upper limit of y-axis on left hand scale of the second graph. If NULL, defaults to show most patterns |
The two graphs in the output plot are the same but have different ranges. The parameters yLimit1 and yLimit2 control the range of the y_axis on the plots produced.
A plot that compares the observed read distribution with the estimated distribution.
Peijie Lin, Sylvain Foret, Conrad Burden
data(patternsExample) estimates <- estimatePatterns(patternsExample, epsilon=0.02, eta=0.01) plotPatterns(estimates[[1]])
data(patternsExample) estimates <- estimatePatterns(patternsExample, epsilon=0.02, eta=0.01) plotPatterns(estimates[[1]])