Hi
Im using the kinship package to draw a pedigree. On my data set this works fine
but when i add indivudals to the pedigree i keep getting an error i hope someone
can help me!
This is the code im using:
Data<-read.table("Tree.txt", header=T, sep=",")
attach(Data)
ped<-pedigree(id, dadid, momid, sex, aff)
par(xpd=T)
plot.pedigree(ped)
This is my data looks like without the last 3 individuals it works perfect,when
i add them i get the following error:
Error in if (min(pos2) < 0) { : missing value where TRUE/FALSE needed
famid,id,dadid,momid,sex,aff
1,8860,9972,8856,2,0
1,8855,9972,8856,2,0
1,8859,9976,8860,2,0
1,8854,9971,8855,2,0
1,8863,9975,8859,2,0
1,8858,9975,8859,2,0
1,8865,9975,8859,2,0
1,9969,9970,8854,1,0
1,8864,9980,8863,2,0
1,8862,9980,8863,2,0
1,23834,9981,8865,2,0
1,9968,9969,8853,1,0
1,21141,9974,8858,1,0
1,21142,9974,8858,2,0
1,23172,265,21142,2,0
1,25409,265,21142,1,0
1,23171,265,21142,2,0
1,265,NA,NA,1,0
1,9981,NA,NA,1,0
1,8853,NA,NA,2,0
1,9974,NA,NA,1,0
1,9980,NA,NA,1,0
1,9972,NA,NA,1,0
1,8856,NA,NA,2,0
1,9976,NA,NA,1,0
1,9971,NA,NA,1,0
1,9975,NA,NA,1,0
1,9970,NA,NA,1,0
1,9979,NA,NA,1,0
1,20644,9979,8862,2,0
1,20670,9979,8862,1,0
I tried putting nuclear families closer together in de pedigree but this
doesn't seem to help. All individuals have both parents in the pedigree or
have 2 missing parents.
I hope someone can help me with this!
Iris
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
[[alternative HTML version deleted]]
I tried replacing the missing parents with 0 but got the same error
Error in if (min(pos2) < 0) { : missing value where TRUE/FALSE needed
Any other thoughts?
Iris
Subject: Re: [R] kinship package: drawing pedigree error
On Wed, 06-Feb-2008 at 04:49AM -0800, Iris Kolder wrote:
[...]
|> 1,9979,NA,NA,1,0
|> 1,20644,9979,8862,2,0
|> 1,20670,9979,8862,1,0
|>
|> I tried putting nuclear families closer together in de pedigree but
|> this doesn't seem to help. All individuals have both parents in the
|> pedigree or have 2 missing parents.
It's a while since I used that function, but IIRC, a missing parent is
set as 0, not NA.
It might have changed since I used it, in which case ignore me.
HTH
--
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
___ Patrick Connolly
{~._.~} Great minds discuss ideas
_( Y )_ Middle minds discuss events
(:_~*~_:) Small minds discuss people
(_)-(_) ..... Anon
~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
____________________________________________________________________________________
Be a better friend, newshound, and
[[alternative HTML version deleted]]
You can also draw pedigrees using the pedtodot() function from the gap package. It does however depend on graphviz (http://www.graphviz.org). An article on drawing pedigrees in R is available in Bioinformatics 22(8):1013-1014 (see http://forums.gentoo.org/viewtopic-t-641204) There _may_ also be some pedigree drawing functionality in the GeneticsPed package thats part of the RGenetics project (see http://rgenetics.org/) although at present there are a few unresolved problems with the package and only the SVN version is available. Neil Iris Kolder wrote:> > Hi > > Im using the kinship package to draw a pedigree. On my data set this works > fine but when i add indivudals to the pedigree i keep getting an error i > hope someone can help me! > > This is the code im using: > > Data<-read.table("Tree.txt", header=T, sep=",") > attach(Data) > ped<-pedigree(id, dadid, momid, sex, aff) > par(xpd=T) > plot.pedigree(ped) > >-- View this message in context: http://www.nabble.com/kinship-package%3A-drawing-pedigree-error-tp15314771p15352813.html Sent from the R help mailing list archive at Nabble.com.
Maybe Matching Threads
- no solution yet, please help: extract p-value from mixed model in kinship package
- kinship package example data
- Pedigree / Identifying Immediate Family of Index Animal
- extract p-value from mixed model in kinship package
- Anyone have experience with kinship pedigree plot?