Is it possible to merge two files together using awk? I have two files with matched Chrom and pos column
file1 has the columns
CHROM POS ID REF ALT QUAL FILTER INFO
file2 has the columns
CHROM POS ID REF ALT FATHER MOTHER DAUGHTER1 DAUGHTER2 DAUGHTER3 SON1 SON2
I want the final merged file to have these columns
CHROM POS ID REF ALT QUAL FILTER INFO FATHER MOTHER DAUGHTER1 DAUGHTER2 DAUGHTER3 SON1 SON2
CHROM
andPOS
alone might create problems if there are multi-allelic variants (or even ifALT
is different between the two files). You might want to match all three of those columns to be sure that the variants you're merging are identical. $\endgroup$