Entering edit mode
lxiao63
•
0
@lxiao63-22932
Last seen 4.9 years ago
Hi,
I am trying to load 1000 Genome Project data into R through snpStats. I downloaded 1000 g SNPs data from https://www.cog-genomics.org/plink/1.9/resources, where SNPs data could be downloaded separately for each chromosome or simultaneously for all chromosomes. I downloaded 1kgphase1chr16.tar.gz file, which is first decompressed through 7-zip to a .tar file, which is further decompressed to 3 files in .bed, .bim, and .fam format. I then used the code below to load the three files into R:
library(snpStats)
path <- "D:\\Downloads"
snps <- read.plink(file.path(path, "1kg_phase1_chr16"), na.strings = ("-9"))
However, I was returned the error message:
Error in `.rowNamesDF<-`(x, value = value) :
duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique value when setting 'row.names': ‘.’
Do you have any ideas to fix this?
Any help is appreciated!
Thanks