SNPRelate icon indicating copy to clipboard operation
SNPRelate copied to clipboard

snpgdsCombineGeno makes new snp.id when combine multiple gds files

Open yangli-ai opened this issue 4 years ago • 2 comments

I have several gds files. Their snp.id are numeric but not continuous. Gds file 1 has snp.id like 1, 2, 3, ...,10; Gds file 2 has 20, 21, ...., 30. (Our original gds files don't use rsID for each SNP) After I used snpgdsCombineGeno, the new gds file changed snp.id to make it continous, like 1,2,3,...10,11,...20. I cannot keep the original snp.id.

yangli-ai avatar Dec 23 '20 16:12 yangli-ai

You can use the functions in the gdsfmt package to change snp.id in the new GDS file:

add.gdsn(f, "snp.id", your_new_snp_id, replace=TRUE)

zhengxwen avatar Dec 30 '20 00:12 zhengxwen

Will snpgdsCombineGeno change the order of these SNPs from multiple gds files? I cannot check it, as SNP IDs have been changed.

yangli-ai avatar Dec 30 '20 15:12 yangli-ai