Seems to me that when you merge these PLINK files there will be two issues; i) the SNP IDs are different and, ii) the allele coding is different.
i) Assuming your rsIDs and the genome coordinates are consistent across your two files, you could strip out the rsIDs from file1. This Perl one liner will reprint the map file with the rsIDs stripped out.
ii) You can recode your file1 from ACTG to 12 format using --recode12 in PLINK. This isn't without it's problems; I think PLINK will decide which allele is 1 or 2 based on which one is the more common allele. This is usually fine, but can introduce problems if the SNP is common as the 'minor' allele becomes ambiguous.
Thank you Christopher for your help! I realize Plink can do the recode of the alleles which is great, but can it also recode the SNP ID in file 1 so that they are similar format to the SNP IDs in file 2, i.e. only extracting the first part with rsIDs, and create BED/BIM/FAM file with the recoded SNPs in the new format?
Thank you Christopher for your help! I realize Plink can do the recode of the alleles which is great, but can it also recode the SNP ID in file 1 so that they are similar format to the SNP IDs in file 2, i.e. only extracting the first part with rsIDs, and create BED/BIM/FAM file with the recoded SNPs in the new format?
Thank you!
There may we a way, in PLINK, of updating the rsIDs in the first file using the rsIDs in the second file, but this is not something I am aware of.
I am sorry I mistakenly posted a comment as an answer and cannot delete it...