Using R, how would I be able to create single-base bins from a GenomicRanges object (transcripts/promoters) of the hg19 genome? I have a BAM file with CHIP-seq reads, and I would like to find the read depth at each individual base in the promoters GRanges object, in determining enrichment.
I created an RleViewsList object for my reads and the hg19 promoters. How can I essentially obtain the number of overlaps per promoter at a single-base resolution?
Thanks! The tsv files for per base whole genome coverage are too large for me though. Is there a way to only return coverage for only select region (eg. all promoters)?
That's understandable. Another option is, as the intermediate file between the bam and the genomecov is a bed file, you could take the bed file and intersect it with your promoter regions. Then take that filtered bed file and run it through the genomecov function. The resulting file should then be much smaller and only have the per base counts of the promoter regions.
https://bedtools.readthedocs.io/en/latest/content/tools/intersect.html