R:how to read bed file with identical Famliy ID by read.plink
0
1
Entering edit mode
7.8 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?

bed plink R • 3.3k views
ADD COMMENT
1
Entering edit mode

Read the fam file, and paste 1:n to FID column, write it out as new updated fam. Then use read.plink.

ADD REPLY
0
Entering edit mode

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?

ADD REPLY

Login before adding your answer.

Traffic: 2835 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6