Learn R Programming

Haplin (version 7.3.2)

plot.haptable: Plot a haptable object

Description

Plot a haptable object, which is the result of running haptable on a haplin result, and (optionally) produce picture files.

Usage

# S3 method for haptable
plot(x, separate.plots = F, filename, 
filetype = "png", use.dd, verbose = T, ...)

Arguments

x

A haptable object, i.e. the result of running haptable on a result from haplin. This is the only required argument.

separate.plots

Logical. If you estimate effects of both fetal and maternal genes you can decide whether or not to plot them in the same plot. The default is the same plot (TRUE), the alternative (FALSE) means in separate plots. If you choose separate plots you may have to set the graphics window to "recording" to make sure you can scroll back to the first plot.

filename

If you want a file containing the plot to be produced, give a character string for the filename.

filetype

The default filetype is "png", alternatively you can choose "jpeg".

use.dd

Numeric vector indicating which double dose estimates should be plotted. For instance, if set to c(1,3) only the first and third haplotypes will be drawn with double dose estimates. This is useful if some haplotypes are rare and you want to exclude the uncertain estimates from the plot.

verbose

Turns on or off some minor comments when plotting

...

Further arguments to be passed on to the plot function

Author

Hakon K. Gjessing
Professor of Biostatistics
Division of Epidemiology
Norwegian Institute of Public Health
hakon.gjessing@uib.no

References

Gjessing HK and Lie RT. Case-parent triads: Estimating single- and double-dose effects of fetal and maternal disease gene haplotypes. Annals of Human Genetics (2006) 70, pp. 382-396.

Web Site: https://haplin.bitbucket.io

See Also

haplin

Examples

Run this code
if (FALSE) {

# Directly plotting the haplin result. Produce separate plots for child and mother, 
# dump plots to files:
res <- haplin("data.dat", use.missing = T, maternal = T)
plot(res, separate.plots = T, filename = "Haplinres.png")

# Create haptable from the haplin result and plot the results in the table:
res <- haplin("data.dat", use.missing = T, maternal = T)
tab <- haptable(res)
plot(tab)

# Create haptables for the 10 first markers of a data file using haplinSlide. 
# Create plots for each result:
res <- haplinSlide("data.dat", markers = 1:10, use.missing = T, maternal = T, table.output = T)
lapply(res, plot)
}

Run the code above in your browser using DataLab