Learn R Programming

cape (version 2.0.2)

one.pairscan.parallel: Perform regression analysis for one phenotype and all pairs of markers using a kinship correction.

Description

This is an internal function that performs a single pairwise scan. It is used for individual pair scans as well as permutation testing.

Usage

one.pairscan.parallel(data.obj, phenotype.vector, genotype.matrix, int = NULL, covar.vector = NULL, paired.markers, n.perm = 0, run.parallel = TRUE, verbose = FALSE, n.cores = 2)

Arguments

data.obj
The object in which all results are stored. See read.population.
phenotype.vector
A vector of phenotype values, one entry for each individual.
genotype.matrix
A matrix of genotype values with individuals in rows and markers in columns. Matrix entries contain the probability of the reference allele at each position for each individual.
int
The interaction term used in the kinship correction.
covar.vector
A vector of 1s and 0s indicating which markers should be used as covariates (1) and which should not (0),
paired.markers
A numeric matrix with two columns specifying which marker pairs should be scanned.
n.perm
The number of permutations to perform. May be 0.
run.parallel
A logical value indicating whether to use parallel processing.
verbose
A logical value indicating whether the progress of the scan should be printed to the screen.
n.cores
An integer specifying the number of cores to be used in parallel processing.

Value

This function returns a list with two elements:
pairscan.results
The results of the pairwise scan on the provided phenotype and genotypes.
pairscan.perm
The results of the permutations of the pairwise scan on the provided phenotype and genotypes.
Each of the results elements itself a list of 3 elements:
pairscan.effects
A table of effects of each marker pair. The columns list the effects in the following order: marker1, marker2, the variance of marker1, the covariance of marker1 and marker2, the variance of marker2, the covariance of marker1 and the interaction effect, the covariance between marker2 and ther interaction effect, and the variance of the interaction.
pairscan.se
A table of the standard errors from the test on each marker pair. The columns are identical to those described for pairscan.effects
model.covariance
This is a table in which each row is the linearized matrix of the variance-covariance matrix of each pairwise regression.
The results element for the permutation tests has the same structure as for the pairwise scan except that each row represents the results of one permutation.

References

Carter, G. W., Hays, M., Sherman, A., & Galitski, T. (2012). Use of pleiotropy to model genetic interactions in a population. PLoS genetics, 8(10), e1003010. doi:10.1371/journal.pgen.1003010

Kang, H.M., Zaitlen, N.A., Wade, C.M., Kirby, A., Heckerman, D., Daly, M. J., and Eskin, E. (2008). Efficitne control of population structure in model organism association mapping. Genetics, 178(3), 1709-1723.

See Also

pairscan