plot.haptable: Plot a haptable object

View source: R/plot.haptable.R

plot.haptableR Documentation

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 class '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

Note

Further information is found on the web page.

Author(s)

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://people.uib.no/gjessing/genetics/software/haplin/

See Also

haplin

Examples

## Not run: 

# 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)

## End(Not run)

Haplin documentation built on May 20, 2022, 5:07 p.m.