Divide the genome to vary lengths windows in R
1
0
Entering edit mode
2.8 years ago
rrapopor ▴ 40

Hi,

I have BED file with vary windows lengths, and I want to divide the whole genome to non-overlapping bins in same lengths distribution of the BED file in R.

For example, if the chromosome length is 50, and the windows lengths are 10,10,20 , the output should be:

chr1 1 10
chr1 11 20
chr1 21 40
chr1 41 50

Any suggestions?

Thank you!

bedtools R BED • 1.0k views
ADD COMMENT
0
Entering edit mode

Can you add a representative example?

ADD REPLY
0
Entering edit mode

I added to the question.

ADD REPLY
0
Entering edit mode

These windows are not indexed correctly for the BED format, and are not of the same length distribution.

ADD REPLY
1
Entering edit mode
2.8 years ago

You can use bedtools makewindows in R or linux.

ADD COMMENT

Login before adding your answer.

Traffic: 2618 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