On 2020-04-10 19:05 -0500, Ana Marija wrote:
> I am not sure what I am suppose to run 
> from your codes.  Can you just send me 
> lines of codes which I should run? 
> (without part where you are loading 
> your data frames) (assuming my files 
> are as I showed them)

Dear Ana,

try these lines:


plink.genome <-
  read.table("plink.genome", header=TRUE)
SNPRelate::snpgdsBED2GDS(
  "output4.bed",
  "output4.fam",
  "output4.bim",
  "HapMap.gds")
genofile <-
  SNPRelate::snpgdsOpen("HapMap.gds")
ibd <- SNPRelate::snpgdsIBDMoM(
  genofile,
  remove.monosnp=FALSE,
  kinship=TRUE)
x <- paste(plink.genome$IID1,
           plink.genome$IID2)
table <- paste(ibd$ID1, ibd$ID2)
idx <- match(x=x, table=table)
plink.genome[idx,]


Best,
Rasmus

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to