Question: R:how to read bed file with identical Famliy ID by read.plink
gravatar for zwang10
4.2 years ago by
United States
zwang1010 wrote:

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


But today when I use the same command to get snp matrix, I got following error:

Error in `row.names<`(`*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 file plink R • 1.9k views
ADD COMMENTlink modified 3.4 years ago by ingrid.szilagyi0 • written 4.2 years ago by zwang1010

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

ADD REPLYlink written 3.4 years ago by zx87549.6k

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 REPLYlink modified 3.4 years ago • written 3.4 years ago by ingrid.szilagyi0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 865 users visited in the last hour