pQQ
(Package: Haplin) :
QQ-plot with confidence intervals for a vector of p-values
Produces a QQ-plot of p-values. The x-axis is -log10 of the expected p-values (under a null hypothesis of no effects), the y-axis is -log10 values of the actual p-values. A (pointwise) confidence interval can be drawn, and names of snps/genes corresponding to the most significant ones can be added.
suest
(Package: Haplin) :
Compute a joint p-value for a list of haplin fits (usually from a sliding window approach), correcting for multiple testing.
The first argument to suest should be a list of haplin estimation results (from the same data file), usually the output from haplinSlide. suest produces as a result a joint overall p-value based on aggregating the individual p-values and then correcting for multiple testing. The correction is achieved by using the principle of "seemingly unrelated" estimation, taking into account the correlation between the individual estimation results.
hapRun
(Package: Haplin) :
Simulates genetic data and runs Haplin for each simulation
Calculates Haplin results by first simulating genetic data, allowing a various number of family designs, and then running Haplin on the simulations. The simulated data may contain of fetal effects, maternal effects and/or parent-of-origin effects. The function allows for simulations and calculations on both autosomal and X-chromosome markers, assuming Hardy-Weinberg equilibrium. It enables simulation and calculation of gene-environment interaction effects, i.e, the input (relative risks, number of cases etc.) may vary across strata. hapRun calls haplin, haplinStrat or haplinSlide to run on the simulated data files.
hapSim
(Package: Haplin) :
Simulation of genetic data in Haplin format
Simulates genetic data in Haplin format, consisting of fetal effects, maternal effects and/or parent-of-origin effects. Allows for simulation of both autosomal and X-linked markers, assuming Hardy-Weinberg equilibrium. Enables stratified simulations for gene-environment interaction analyses, i.e the input (relative risks, number of cases etc) may vary across different strata.
convertPed
(Package: Haplin) :
Convert large ped files by creating unique IDs, converting allele coding and extracting a selection of SNPs
The function prepPed is used to prepare a ped file for loading into GenABEL. However, GenABEL requires unique individual IDs in the file, not only unique within family. Furthermore, numeric allele coding 1,2,3,4 is not accepted. To fix this, convertPed can be run prior to running prepPed. This will create unique IDs and do the necessary allele recoding, and possibly also select and reorder SNPs. convertPed will also update the corresponding map file.
prepPed
(Package: Haplin) :
Extract family and phenotype information from a ped-format file, to prepare for use in Haplin
Creates a pedIndex file containing family information, a phenotype file, and optionally a “dummy” map file. The files are used by GenABEL when loading data into R, and by Haplin when converting from a GenABEL file to a Haplin file.
toDataFrame
(Package: Haplin) :
Stack dataframes from haplinSlide into a single dataframe
When haplinSlide is run with the option table.output = T, the result is a list of haptables, i.e. tables with summary haplin results for each window haplinSlide is run on. toDataFrame stacks the separate dataframes into one large dataframe containing all results.