require(GenomicRanges)
reads <- GRanges(seqnames = rep("chr1", 5),
IRanges(c(3309, 4756, 4801, 4804, 5392), width = 36),
strand = c('+', '-', '-', '+', '+'))
genes <- GRanges("chr1", IRanges(5000, 7000), strand = '+')
annotationCounts(reads, genes, 500, 500, 300)
Run the code above in your browser using DataLab