Entering edit mode
9.3 years ago
christylynn002
•
0
I have two files:
FileA.bed
ZC3H14 1
VRK1 2
G6PC 79
tp63dn 3
G6PD 174
FileB.bed
ZC3H14 1
VRK1 1
G6PC 14
G6PD 1
tp63dn 2
I would like to intersect the two files with bedtools intersect -a FileA.bed -b FileB.bed -loj
however, I do not have a range to intersect the two files with. I basically want to print the number in FileB.bed
into FileA.bed
for the corresponding gene as so:
ZC3H14 1 1
VRK1 2 1
G6PC 79 14
tp63dn 3 2
G6PD 174 1
However, when I try the bedtools command as above, I get an error. Can I not use bedtools for this type of intersection?
P.S. I need the -loj
because there are some instances in FileA.bed that are not in FileB.bed, however I still want the line in FileA.bed to print.
use linux join command.
Perfect. Thank you.