countcpgbin: Compute the total CpG number of each bin with each CpG site.

Description Usage Arguments Value Author(s) Examples

View source: R/countcpgbin.R

Description

The function is used to compute the total CpG number of each bin with each CpG site.

Usage

1
2
countcpgbin(file.cpgsite,file.blacklist=NULL,file.bin=NULL, writefile=NULL,
 reportfile=NULL, binlength=500)

Arguments

file.cpgsite

The path of cpg site file or sequence tag file.

file.blacklist

The path of blacklist file (If we do not use the file, there will be defaulted as NULL).

file.bin

The path of all cpg bin file. For computing the number of sequence tag of each window, we use the file as a normalization window position. (If we do not use the file, there will be defaulted as NULL).

writefile

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

reportfile

The path of output results of bin length, the number of bin, total reads before processing and total reads after processing.

binlength

The length of each window.(Defaulted length is 500).

Value

The CpG site should include at least three columns "chromosome", "start position" and "end position". The output file is include four columns, that is "chromosome", "start position", "end position" and "CpG count". Also, the function output a report for some parameters.

Author(s)

Yan Zhou, Bo Zhang, Nan Lin, BaoXue Zhang and Ting Wang

Examples

1
2
3
4
  datafile<-system.file("extdata",  package = "methylMnM") 
  filepath<-datafile[1]
  file.cpgsite<-paste(filepath,"/all_CpGsite_chr18.txt",sep="")
  f<-countcpgbin(file.cpgsite, binlength=5000)

methylMnM documentation built on Nov. 8, 2020, 6:47 p.m.