How to analysis coordinate density in whole gnome
2
0
Entering edit mode
8.6 years ago
cfarmeri ▴ 210

Hi, Biostars.

I have a bed file, containing positions with 1bp interval. These positions express a feature in genome we focus.

I would like to analysis density of above bed file. "density" means accumulation of these position, like "hotspot".

Anyone have a solution? thanks.

genome • 2.0k views
ADD COMMENT
0
Entering edit mode
ADD REPLY
0
Entering edit mode
ADD REPLY
0
Entering edit mode

What do you exactly mean with "density"?

ADD REPLY
0
Entering edit mode

I would like to analysis whether some of bed positions exist in specific region of genome.

For example,

The number of positions : 10000

Whole genome length : 1.0E+9 [bp]

Assuming the above, 10 positions cluster in 1.0E+6 may be random distribution.

On the other hand, 10 positions cluster in 1.0E+3 may be "density" or "hotspot".

Sorry about my poor English and vague goal.

ADD REPLY
0
Entering edit mode
8.6 years ago

You can use ggplot2 as recommended by Irsan in this post.

Edit: the link works now.

ADD COMMENT
0
Entering edit mode

thanks harold, your "this post" lint is not valid...

ADD REPLY
0
Entering edit mode
8.6 years ago

If you are working with BED files, at a very basic level, you could use bedmap to count the number of features that overlap positions of interest ("density"):

$ bedmap --echo --count positions.bed features.bed > answer.bed

You can then apply whatever model over the desired window size, to compare what you expect with what you observe.

For instance, if you pick windows at random over all positions in your background space and --count features over those windows, that gives you a background expected rate. Then you can compare that with what you observe with the observed density of features in windows at each position.

ADD COMMENT

Login before adding your answer.

Traffic: 2658 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6