EMalgorithm: EM algorithm to infer CpG sites.

Description Usage Arguments Value Examples

View source: R/EMalgorithm.R

Description

Using EM algorithm to infer the real number of CpG sites.

Usage

1
2
EMalgorithm(cpgsitefile, allcpgfile, category = "1", writefile = NULL,
  reportfile = NULL)

Arguments

cpgsitefile

The path of file to store CpG site.

allcpgfile

The file to store CpG sites.

category

Default to "1".

writefile

The path of output results. (If writefile=NULL, there will return the results back to main program.)

reportfile

The path of output results.

Value

values or file If writefile is NULL, then return the values of results,otherwise output to write file.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
datafile <- system.file("extdata", package="methylMnM")
data(example_data)
filepath <- datafile[1]
allcpgfile <- EM_H1ESB1_MeDIP_sigleCpG
dirwrite <- paste(setwd(getwd()), "/", sep="")
readshort <- paste(filepath, "/H1ESB1_MeDIP_18.extended.txt", sep="")
writefile <- paste(dirwrite, "EM2_H1ESB1_MeDIP_sigleCpG.bed", sep="")
reportfile <- paste(dirwrite, "EM2_H1ESB1_MeDIP_sigleCpG_report.bed", sep="")
f <- EMalgorithm(cpgsitefile=readshort, allcpgfile=allcpgfile, category="1",
                 writefile=writefile, reportfile=reportfile)

FocusPaka/SIMD documentation built on May 29, 2019, 10:57 a.m.