This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bed Files And Flanking Regions

Hello everyone,

I am looking for an elegant way, may be awk, to do this :

I have a bed file A with locations, I want for each line to grab other locations that are located in 500kb downstream and upstream and then print the line from file 1 with every information found in file 2

Before going into perl loops I wanted to know if this is easily done with awk ?

Thanks

Rad

awk bed

1 answer

maybe windowBed from the BEDTools package will do the trick?

http://code.google.com/p/bedtools/

Log in to answer this question.