Hi everyone! I'm asking a question related to R. I'm not an R user, but it's the only tool that can get me this done.
I'm uploading to R a pedigree file that looks like this:
famid id dadid momid sex pheno
EPBL-0001 epbl0001 epbl0003 epbl0002 2 2
EPBL-0001 epbl0002 0 0 2 1
EPBL-0001 epbl0003 0 0 1 1
EPBL-0004 epbl0004 epbl0006 epbl0005 2 2
EPBL-0004 epbl0005 0 0 2 1
EPBL-0004 epbl0006 0 0 1 1
EPBL-0007 epbl0007 epbl0009 epbl0008 2 2
EPBL-0007 epbl0008 0 0 2 1
EPBL-0007 epbl0009 0 0 1 1
Family id unique for the whole family, ids unique for every patient, dadid and momid are the same of the respective id et cetera...
I'm using package kinship2 which can read the ped file and create pedigree plots.
This is the command giving me problems:
pedAll <- pedigree(id= multisample$id, dadid = multisample$dadid, momid = multisample$momid, sex= multisample$sex, famid = multisample$famid, affected= cbind(multisample$pheno))
and this is the error, that I don't get:
Error in pedigree(id = multisample$id, dadid = multisample$dadid, momid = multisample$momid, :
Value of 'dadid' not found in the id list EPBL-0001/0 EPBL-0001/0 EPBL-0004/0 EPBL-0004/0 EPBL-0007/0
Thank you in advance.
Actually the regular ped file format is like this... dadid and momid has to be on the same row of the proband, because the proband have to be linked to the parents ids for kinship2 to recognize it as a family. And 0 in the row of dad and mom.
H.Hasani is right. Please read the manual:
Because your
id
is not numeric, you'll need to setmissid=0
explicitly.OK got it. Thank you!
If an answer was helpful, you should upvote it; if the answer resolved your question, you should mark it as accepted. You can accept more than one answer if they all work.