Entering edit mode
8.5 years ago
rishi
▴
10
Hi. I am a beginner in computational biology.
I have a bed file with four columns; CHR#, START, STOP, READVALUE. I have a second bed file with five columns; CHR#, START, STOP, ENSG-ID, GENE-ID. The CHR#s are not in order.
I want to create a third bed file which intersects the START and STOP intervals of File 1 and 2 (or 2 and 1) and prints the READVALUE as a sixth column after the GENE-ID column. I've tried my best but am unable to do so. What command(s) should I try?
Thanks in advance for the help.
what have you tried ?
I've tried intersecting in different ways but doesn't work. I need all the six columns. I guess I have to write something in awk but I don't know how to
Have you looked at BedTools intersectBed (http://bedtools.readthedocs.io/en/latest/content/tools/intersect.html )?
Got the answer! Adding -wb and then editing made it possible. Thank you