This is a test version of Biostars. For the public version, visit https://www.biostars.org.
vlookup type array matching command for BED analysis

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.

chip-seq unix

I've tried my best but am unable to do so

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

Got the answer! Adding -wb and then editing made it possible. Thank you

0 answers

No answers yet.

Log in to answer this question.