Question: Single-base bins for finding enrichment at promoters
gravatar for sobethon
12 months ago by
sobethon0 wrote:

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?

ADD COMMENTlink modified 12 months ago by ATpoint44k • written 12 months ago by sobethon0
gravatar for Sparkyflyer
12 months ago by
Sparkyflyer0 wrote:

Hi! This would be a slightly different approach, but you could take your bam file and convert it to a genomecov file using BedTools. The genomecov file is a three column tsv with the chromosome as the first column, the base pair position as the second column, and the amount of reads covering that base pair in the third column. From here you could simply read the genomecov into R as a tsv, select the region of interest and generate whatever analysis or plot you require.

ADD COMMENTlink written 12 months ago by Sparkyflyer0

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)?

ADD REPLYlink written 12 months ago by sobethon0

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.

ADD REPLYlink written 12 months ago by Sparkyflyer0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1035 users visited in the last hour