Question: Binning BED file and counting antisense / sense reads
gravatar for Sam
3.2 years ago by
United States
Sam70 wrote:

I am attempting to bin my BED file that contains gene intervals -2k/2k from the TSS. I would like to produce bins that are 1bp each.

After binning I would like to count anti-sense and sense reads independently. The output data i'm looking for is:

GeneID -2000 -1999 -1998 -1997 ...... 0 ...... 1997 1998 1999 2000
SGIP   0.00  0.00  0.00    1          1        0.00 0.00  9   0.00

Where the first column is the GeneID provided, and the numbers after represent the number of read counts (anti-sense / sense) based on bin interval from TSS.

I'm not quite sure how to do something like this. I at first thought it might be as simple as using bedtools makewindows but i'm unsure if this is appropriate. For read counts, I need a tool that is strand specific and capable of counting anti-sense and sense reads. Which tool would work best for this and what are the input files I require?

ADD COMMENTlink modified 3.2 years ago by Amitm1.6k • written 3.2 years ago by Sam70
gravatar for Amitm
3.2 years ago by
Amitm1.6k wrote:


You could skip the step of creating 1bp bins. Just use one line for each 2k window. And then using Bedtools Coverage use parameter -d. That will give depth at each base anyway. Also you can use the -s to force strandedness. Obviously your input BED must have the strand column.

ADD COMMENTlink written 3.2 years ago by Amitm1.6k

This is great to hear! I'll sort this out today and let you know how it goes so I can accept your answer or ask additional questions.

ADD REPLYlink written 3.2 years ago by Sam70
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: 2433 users visited in the last hour