Entering edit mode
8.4 years ago
zwang10
▴
30
I have three files, chr_22.bed
,chr_22.bim
,chr_22.fam
. I always use read.plink
from MultiPhen
to get snp matrix in R
genotype=read.plink(root="/home/chr_22")
But today when I use the same command to get snp matrix, I got following error:
Error in `row.names<-.data.frame`(`*tmp*`, value = value[[1L]]) :
duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique value when setting 'row.names': ‘UK10K’
Then, I check the chr_22.fam
file, and I found the all elements in the first column are same UK10K
. The following is the first 5 row of chr_22.fam
UK10K ALS5085249 0 0 0 -9
UK10K ALS5085250 0 0 0 -9
UK10K ALS5085251 0 0 0 -9
UK10K ALS5085252 0 0 0 -9
UK10K ALS5085253 0 0 0 -9
Can someone help me here?
Read the fam file, and paste 1:n to FID column, write it out as new updated fam. Then use read.plink.
Did you manage to solve this issue? I am also using MultiPhen and I would be interested in how you solved this. Maybe you made a new .fam file and updated the ids using plink?