bedtools random without strand and no overlap
1
0
Entering edit mode
10 months ago
octpus616 ▴ 100

Hi,

I am trying to use bedtools to generate a list of random genome intervals

# https://bedtools.readthedocs.io/en/latest/content/tools/random.html
$ bedtools random -g hg19.genome -l 5 -n 100
chr9  54133731        54133736        1       5       +
chr1  235288830       235288835       2       5       -
chr8  26744718        26744723        3       5       +
chr3  187313616       187313621       4       5       -
chr11 88996846        88996851        5       5       -
chr13 84714855        84714860        6       5       -
chr13 10759738        10759743        7       5       -
chr6  122569739       122569744       8       5       +
chr17 50884025        50884030        9       5       -
chr11 38576901        38576906        10      5       +

I noted that there are strand info in col 6 and interval may overlap if length * number > genome length

My question is:

1) Can I safely omit col 6, if I am not need strand infomation, Its also random?

2) I observe that when length * number > genome length, this command tends to output overlapping intervals, but when length * number < genome length, the command will output non-overlapping intervals first or will there be random overlaps as well.

bedtools genome bed • 527 views
ADD COMMENT
2
Entering edit mode
10 months ago
ATpoint 82k

The more intervals you produce, the higher the odds for overlaps, that is what 2) is observing. For 1), random is random, the strand is random as well, so removing strand still gives random intervals.

ADD COMMENT

Login before adding your answer.

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