removeblacklist: Remove blacklist.

Description Usage Arguments Value Author(s) Examples

View source: R/removeblacklist.R

Description

The function is used to remove blacklist which we are not interest.

Usage

1
removeblacklist(file2,cpg)

Arguments

file2

The path of blacklist site file.

cpg

All bins.

Value

All bins except blacklist region.

Author(s)

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
  datafile<-system.file("extdata",  package = "methylMnM") 
  filepath<-datafile[1]
  file1<-paste(filepath,"/all_CpGsite_chr18.txt",sep="")
  CpGsite<-read.table(file1, header=FALSE,skip=0, nrows=200, as.is=TRUE) 
  winbin<-CpGsite[1:100,1:4]
  winbin[,2]<-seq(0,49500,500)
  winbin[,3]<-winbin[,2]+500
  winbin[,4]<-rpois(100, lambda=5)
  blacklist<-winbin[1:5,]
  blacklist[,2]<-c(0,10000,20000,30000,40000)
  blacklist[,3]<-blacklist[,2]+1000
  blacklistfile<-paste(setwd(getwd()), "/blacklist.bed", sep = "")  
  write.table(blacklist, blacklistfile, quote=FALSE, 
 row.names =FALSE,col.names =FALSE)
  f<-removeblacklist(blacklistfile,winbin)

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