dir <- file.path(system.file("extdata", package="Rcade"), "STAT1")
targets <- read.csv(file.path(dir, "targets.csv"), as.is = TRUE)
anno <- read.csv(file.path(dir, "anno.csv"))
anno <- anno[order(anno$chromosome_name),]
colnames(anno) <- c("ENSG","chr","start","end","str")
ChIPannoZones <- defineBins(anno, zone=c(-1500, 1500), geneID="ENSG")
x <- countReads(ChIPannoZones, targets, fileDir = dir)
Run the code above in your browser using DataLab