Description Usage Arguments Value Author(s) Examples

View source: R/estimatePatterns.R

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.

1 2 3 4 5 6 7 | ```
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

1 2 3 4 5 6 7 8 | ```
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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.