I'm trying to join the two files below:
FileA.txt:
ABCA1 0 2
ABCA4 3 12
ABCB11 0 4
ABCB4 0 3
ABCC6 0 3
ABCC8 4 33
FileB.txt
ABCA4 2
ABCB11 1
Where there isn't a match in the second file I want a 0 printed. I've tried this join command:
join -a 1 -a 2 -e '0' -o 0,1.2,1.3,2.2 FileA.txt FileB.txt
However, this prints 0's for all of the entries in the new 3rd column. As so:
ABCA1 0 2 0
ABCA4 3 12 0
ABCB11 0 4 0
ABCB4 0 3 0
ABCC6 0 3 0
I used a version of this command to generate my FileA.txt. I'm not sure why it won't work to add a third column. Any help?