Hello !
I want to join 2 files.
They look like this:
KE340296.1 1 0/0:11
KE340296.1 2 0/0:12
KE340296.1 6 0/1:13
KE340297.1 1 0/1:14
KE340297.1 3 0/1:15
KE340297.1 4 0/1:16
and
KE340296.1 1 0/0:21
KE340296.1 2 0/0:22
KE340296.1 3 0/1:23
KE340297.1 1 0/1:24
KE340297.1 2 0/1:25
KE340297.1 3 0/1:26
I would like to obtain this: Columns 1 and 2 are the two first columns of the two files. Column 3 corresponds to file1:col3 and column 4 to file2:col3.
KE340296.1 1 0/0:11 0/0:21
KE340296.1 2 0/0:12 0/0:22
KE340296.1 3 . 0/1:23
KE340296.1 6 0/1:13 .
KE340297.1 1 0/1:14 0/1:24
KE340297.1 2 . 0/1:25
KE340297.1 3 0/1:15 0/1:26
KE340297.1 4 0/1:16 .
Let me explain:
These two files are sorted by first the colum 1 where I have this names KE... and then by the column 2 (position).
The tricky thing is that for some position, I don't have a value in one of the file. For instance in KE340296.1, position 4, I have only a value in the first file.
The file I want to obtain contains all the positions represented in the two files (there may be hole, as for KE340296.1, no position 4 and 5 in either of the two files) and if there is no value for one of the file, then I would like a dot or whatever character.
I wanted to use "join" but it seems that it won't work because positions are not perfectly matching.
Any one knows how I can do that ?
Thanks a lot !
Mu
