Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/callPeaksUnivariate.R
Fit a HMM to a ChIP-seq sample to determine the modification state of genomic regions, e.g. call peaks in the sample.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | callPeaksUnivariate(
binned.data,
control.data = NULL,
prefit.on.chr = NULL,
short = TRUE,
eps = 0.1,
init = "standard",
max.time = NULL,
max.iter = 5000,
num.trials = 1,
eps.try = NULL,
num.threads = 1,
read.cutoff = TRUE,
read.cutoff.quantile = 1,
read.cutoff.absolute = 500,
max.mean = Inf,
post.cutoff = 0.5,
control = FALSE,
keep.posteriors = FALSE,
keep.densities = FALSE,
verbosity = 1
)
|
binned.data |
A |
control.data |
Input control for the experiment. A |
prefit.on.chr |
A chromosome that is used to pre-fit the Hidden Markov Model. Set to |
short |
If |
eps |
Convergence threshold for the Baum-Welch algorithm. |
init |
One of the following initialization procedures:
|
max.time |
The maximum running time in seconds for the Baum-Welch algorithm. If this time is reached, the Baum-Welch will terminate after the current iteration finishes. The default |
max.iter |
The maximum number of iterations for the Baum-Welch algorithm. The default |
num.trials |
The number of trials to run the HMM. Each time, the HMM is seeded with different random initial values. The HMM with the best likelihood is given as output. |
eps.try |
If code num.trials is set to greater than 1, |
num.threads |
Number of threads to use. Setting this to >1 may give increased performance. |
read.cutoff |
The default ( |
read.cutoff.quantile |
A quantile between 0 and 1. Should be near 1. Read counts above this quantile will be set to the read count specified by this quantile. Filtering very high read counts increases the performance of the Baum-Welch fitting procedure. However, if your data contains very few peaks they might be filtered out. If option |
read.cutoff.absolute |
Read counts above this value will be set to the read count specified by this value. Filtering very high read counts increases the performance of the Baum-Welch fitting procedure. However, if your data contains very few peaks they might be filtered out. If option |
max.mean |
If |
post.cutoff |
False discovery rate. codeNULL means that the state with maximum posterior probability will be chosen, irrespective of its absolute probability (default=codeNULL). |
control |
If set to |
keep.posteriors |
If set to |
keep.densities |
If set to |
verbosity |
Verbosity level for the fitting procedure. 0 - No output, 1 - Iterations are printed. |
This function is similar to callPeaksUnivariateAllChr
but allows to pre-fit on a single chromosome instead of the whole genome. This gives a significant performance increase and can help to converge into a better fit in case of unsteady quality for some chromosomes.
A uniHMM
object.
Aaron Taudt, Maria Colome Tatche
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Get an example BAM file with ChIP-seq reads
file <- system.file("extdata", "euratrans",
"lv-H3K27me3-BN-male-bio2-tech1.bam",
package="chromstaRData")
## Bin the BED file into bin size 1000bp
data(rn4_chrominfo)
data(experiment_table)
binned <- binReads(file, experiment.table=experiment_table,
assembly=rn4_chrominfo, binsizes=1000,
stepsizes=500, chromosomes='chr12')
## Fit the univariate Hidden Markov Model
hmm <- callPeaksUnivariate(binned, max.time=60, eps=1)
## Check if the fit is ok
plotHistogram(hmm)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.