This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to change ID of SNP in one file to adjust to the other file?

Hello,

I am merging two datasets from different platforms. The gene builds are the same for both datasets (h37, p13), but each chromosome has multiple SNPs that have the same positions.

For example,

Warning: Variants 'rs1203956' and '16:240895:A_AG' have the same position.
Warning: Variants 'chr16_632225' and '16:632225' have the same position.
Warning: Variants 'rs116793096' and '16:52244254:A_ATG' have the same position.

Dataset1 has more than 1000 patients, and Dataset2 has only five patients. So I want to change SNP ID in the Dataset2 to be the same as Dataset1. Do we usually need to do this process manually? Any way to do in plink?

In addition, for example, if rs116793096' and '16:52244254:A_ATG' have different alleles, after checking dbSNP, if the latter SNP name has wrong alleles, should I just exclude those SNPs?

Thank you in advance!

gene snp genome

Can you please provide a few lines from your dataset1 and dataset2? It will help understanding the pattern of naming in both.

Thank you for your response.

Warning: Vatiants 'rs2206677' and '1:4872075:A_AC' have the same position.

Dataset1: rs2206677 CA
Dataset2: rs2206677 0A

Dataset1: No 1:4872075:A_AC
Dataset2: 1:4872075:A_AC 0A

dbSNP said AC for this SNP.

Thank you in advance!

Hello khn,

beside the question of toralmanvar: Please show us the exact command you use for merging.

Thanks.

fin swimmer

Thank you for the response. I used as below.

for chr in $(seq 1 22); do ./plink --allow-no-sex --bfile Dataset1 --bmerge Dataset2.bed Dataset2.bim Dataset2.fam --make-bed --out Merged; done

Thank you in advance!

0 answers

No answers yet.

Log in to answer this question.