Description Usage Arguments Details Value Author(s) See Also Examples
Plot a pedigree for a family or an individual.
1 2 3 4 5 6 7 8 9 | doPlotPed(family=NULL, individual=NULL, father=NULL, mother=NULL, gender=NULL,
affected=NULL, is.deceased=NULL, is.sab.or.top=NULL, is.proband=NULL,
is.adopted=NULL, are.twins=NULL, are.consanguineous=NULL,
text.inside.symbol=NULL, text.beside.symbol=NULL,
text1.below.symbol=NULL, text2.below.symbol=NULL,
text3.below.symbol=NULL, text4.below.symbol=NULL,
filename=NULL, device="plot", res=600, ...)
switchPlotfun(method)
|
family |
(Optional) character or numeric vector specifying the family id. |
individual |
(Required) character or numeric vector with the ids of the individuals. |
father |
(Required) character or numeric vector with the id of the father for each individual. |
mother |
(Required) character or numeric vector with the id of the mother for each individual. |
gender |
(Required) character, factor or numeric vector specifying the
gender, with |
affected |
(Optional) numeric or logical vector specifying if the individual is
affected, |
is.deceased |
(Optional) numeric of logical vector specifying whether the individual is deceased. |
is.sab.or.top |
(Optional) numeric or logical vector specifying if the individual is the result of a spontaneous abortion or termination of pregnancy. |
is.proband |
(Optional) numeric or logical vector specifying whether the individual is declared as proband (i.e. the first affected family member coming to medical attention). |
is.adopted |
(Optional) numeric or logical vector specifying if the individual has been adopted. |
are.twins |
(Optional) character vector spefifying twins in the
family. Individuals sharing the same string are recognized as
twins. The string has to start either with |
are.consanguineous |
(Optional) character vector specifying cosanguineous couples. |
text.inside.symbol |
(Optional) character vector with text to place inside symbols. |
text.beside.symbol |
(Optional) character vector with text to place beside symbols. |
text1.below.symbol |
(Optional) character vector with text to place below symbols. |
text2.below.symbol |
(Optional) character vector with text to place below symbols. |
text3.below.symbol |
(Optional) character vector with text to place below symbols. |
text4.below.symbol |
(Optional) character vector with text to place below symbols. |
filename |
(Optional) file name for the plot. If not specified the result is plotted to a temporary file. |
device |
The format of the output file. Can be |
res |
(Optional) the resolution of the image if saved to a bitmap device. |
method |
The method which should be used for plotting, either
|
... |
For |
All arguments passed to the doPlotPed
function have to have the
same length (with the exception of arguments filename
,
device
and res
) and their order has to
match the order of the individuals.
The arguments of the doPlotPed
function represent the input
parameters supported by HaploPainter
; for more information
about HaploPainter
refer to http://haplopainter.sourceforge.net/.
By default, doPlotPed
uses the kinship2
package for
plotting, but can also be configured by the switchPlotFun
to
use HaploPainter
instead.
HaploPainter
is a perl script/tool for pedigree plotting bundled in
the package that requires however some dependencies that might not be
present on every system. Thus, the package checks on startup whether
all requirements for HaploPainter
are available.
If HaploPainter
is used, the plot can only be exported to a pdf
or png device, while, if kinship2
is used, the plot can also be
directly plotted and displayed (if device="plot"
is specified).
HaploPainter
plotting supports also device = "txt"
in
which case the pedigree data is exported (in the HaploPainter file
format) as a tabulator delimited file - no plot is created, the
name of the file is returned.
Also, the arguments of this function match the arguments for
HaploPainter
and not all settings can be directly matched to
settings in kinship2
plotting. The list below lists all
arguments specific to HaploPainter
and how, if at all, they are
displayed or used in kinship2
plotting:
Not supported yet.
The id of individuals which are marked as probands are highlighted in red.
Not supported yet.
Not supported yet.
Not supported yet.
The text will be plotted on the top left corner of the symbol of the respective individual.
The text will be plotted on the top right corner of the symbol of the respective individual.
A character string representing the plotting function to be used.
The name of the file to which the plot was exported.
Johannes Rainer.
plot.pedigree
,
plotPed,FAData-method
,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ## load the Minnesota Breast Cancer record and subset to the
## first families.
data(minnbreast)
family <- minnbreast[minnbreast$famid==4, ]
## draw a pedigree and export it to a pdf file; the file name is
## returned by the function.
doPlotPed(family=family$famid, individual=family$id, father=family$fatherid,
mother=family$motherid, gender=family$sex, device="pdf")
## switch to the plotting functions of the kinship2 package
switchPlotfun("ks2paint")
## plot the same pedigree, but display it
doPlotPed(family=family$famid, individual=family$id, father=family$fatherid,
mother=family$motherid, gender=family$sex, device="plot")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.