countReads {Rcade} | R Documentation |
Most Rcade users will not need to call this function directly. Given targets information linking to bam files, count the reads that lie in defined bins.
countReads(annoZone, targets, fileDir=NULL, dontCheckTargets=FALSE)
annoZone |
|
targets |
|
fileDir |
|
dontCheckTargets |
|
Matrix of read counts, with columns corresponding to samples and rows corresponding to bins.
Jonathan Cairns
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)