hi, I would like to create a list of random mm10 genomic coordinates with bedtools. I saw that the useful command to do this is bedtools random [OPTIONS] -g <GENOME>
. The problem is that they must have different length, similar to my coordinates:
> summary (new $ width)
Min. 1st Qu. Median Mean 3rd Qu. Max.
188 1645 2649 2904 4196 11484
is there any other tool that can set different lengths when generating coordinates? Thank you!
Hi, thanks for your reply. I don't want exactly shuffle my coordinates. I have about 1300 coordinates and I want to create a new set of coordinates which are the same width as mine but which do not overlap with mine, to be used as a negative control. My coordinates are enhancers, the ones I want to generate must be non-enhancers. so I thought I'd create them randomly. do you have any idea how I can proceed?
Yes, this is exactly what you can accomplish with bedtools shuffle. Take a look at the documentation here. The shuffle tool will take the coordinates you have on hand and transpose them randomly to produce an equal number of regions of the same width. If you want to make sure that the regions you are using (as well as any other enhancers you are aware of that are relevant in this context), you can use the -excl option and provide a bed file of those enhancer regions to ensure that the regions are shuffled to loci outside of those regions. Your final command would look something like:
bedtools shuffle -excl enhancers.bed -i myInput.bed -g genomeOfInterest
Fantastic, thanks a lot!