One file has 3 columns and looks like this:
1 249250621 225280621 2 243199373 238207373 3 198022430 194797140 4 191154276 187661676 5 180915260 177695260 6 171115067 167395067 7 159138663 155353663 8 146364022 142888922 9 141213431 120143431 10 135534747 131314747 11 135006516 131129516 12 133851895 130481895 13 115169878 95589878 14 107349540 88289540 15 102531392 81694769 16 90354753 78884753 17 81195210 77795210 18 78077248 74657248 19 59128983 55808983 20 63025520 59505520 21 48129895 35108702 22 51304566 34894566 X 155270560 151100560 Y 59373566 25653566
My other file looks like this:
5677533 4506000 2272564 2753699 4015846 2163243 3812595 2885199 8064159 3522086 2006115 1490517 1072244 1423429 3009679 2705191 1479591 800436 929876 648000 347993 972862 7812943 9660863
When i try
insert file1.txt file2.txt> file3.txt
I get:
1 567753321 225280621 2 450600073 238207373 3 227256430 194797140 4 275369976 187661676 5 401584660 177695260 6 216324367 167395067 7 381259563 155353663 8 288519922 142888922 9 806415931 120143431 10 352208647 131314747 11 200611516 131129516 12 149051795 130481895 13 107224478 95589878 14 142342940 88289540 15 300967992 81694769 16 27051913 78884753 17 14795910 77795210 18 80043648 74657248 19 92987683 55808983 20 64800020 59505520 21 34799395 35108702 22 97286266 34894566 X 781294360 151100560 Y 96608636 25653566
The file2.txt file data overwrites the second column in file 1. I want the data in file2.txt file to be added to the end in a new column, separated by the file1.txt tab in the new file3.txt file, but this does not seem to work. Thoughts? Thanks.
Edit: for file2, I can create it with the same index of the first column 1-22, x, y. But then when I try to join, it doesn't work either. This is my output on join:
1 249250621 225280621 5677533 2 243199373 238207373 4506000 3 198022430 194797140 2272564 4 191154276 187661676 2753699 5 180915260 177695260 4015846 6 171115067 167395067 2163243 7 159138663 155353663 3812595 8 146364022 142888922 2885199 9 141213431 120143431 8064159 10 135534747 131314747 3522086 11 135006516 131129516 2006115 12 133851895 130481895 1490517 13 115169878 95589878 1072244 14 107349540 88289540 1423429 15 102531392 81694769 3009679 16 90354753 78884753 2705191 17 81195210 77795210 1479591 18 78077248 74657248 800436 19 59128983 55808983 929876 20 63025520 59505520 648000 21 48129895 35108702 347993 22 51304566 34894566 972862 X 155270560 151100560 7812943 Y 59373566 25653566 9660863
source share