fat2Lpoly.withinR: Two-locus Family-based Association Test with Polytomous...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/fat2Lpoly.withinR.R

Description

Same as fat2Lpoly except that the first four arguments of fat2Lpoly are replaced by one object having the format of the objects returned by read.merlin.files.

Usage

1
2
3
fat2Lpoly.withinR(ped.x.all, snp.names.mat, ibd.loci = NULL, contingency.file = FALSE, 
                  design.constraint, par.constrained, constraints, 
                  pairweights=calcule.poids.alphafixe, lc = NULL, alpha = NULL)

Arguments

ped.x.all

object returned by the function read.merlin.files or having the same format.

snp.names.mat

matrix of one or two columns giving the names of the SNPs (if one column matrix) or pairs of SNPs (if two columns matrix) to be analyzed. These SNPs represent all or part of the SNPs in the data files datfilenames.

ibd.loci

matrix of the same dimensions as snp.names.mat, giving the respective names of the markers (used to obtain the IBD results) nearest to the corresponding SNPs. The marker names must be written exactly the same as in the ibd files ibdfilenames for extraction of IBD data. If the IBD data are specified by genetic positions instead of marker names, this matrix must contain the genetic positions of the markers instead of the marker names. If NULL (the default), then we use the kinship coefficients multiplied by two, instead of the expectation of the IBD probabilities, in the computation of the score statistics. The kinship coefficients are obtained using the function kinship from the package kinship2.

contingency.file

if 'TRUE' (default is 'FALSE'), then a file called descriptive_statistics'date_and_time'.txt is created and contingency tables with the numbers of subjects per level are progressively added to this file.

design.constraint

function building the design matrices WITHIN each category, for constraints specific to each category. It also returns the design matrices comprising only the loci main effects that are used for computing the covariances.

par.constrained

Optional matrix of dimensions (n.levels-1) x nc specifying the parameter in the linear predictor for each level involved in the nc constraints BETWEEN the logistic models for different levels of the response variable, one constraint per column. This functionality is not yet implemented.

constraints

Optional matrix of dimensions (n.levels-1) x nc specifying the nc linear constraints BETWEEN the logistic models for different levels of the response variable, involving the parameters specified in par.constrained, one constraint per column. A 0 means that the corresponding parameter is not involved in the constraint. This functionality is not yet implemented.

pairweights

function calculating the weights of the observation pair differences when conditioning on the first SNP in the test of the second SNP in a SNP pair. Default is calcule.poids.alphafixe, implementing the weighting function of equation (6) of reference [1]. An alternative is calcule.poids.Chen, implementing the weighting function of equation (7) of reference [1].

lc

numerical identifier of the SNP (locus) on which to condition when testing model terms. Defaults to NULL, or no conditioning.

alpha

vector of length n.levels-1 of the coefficients of the polytomous logistic model of association beween the phenotype and the conditionning SNP. Defaults to NULL. If alpha = NULL and lc is not NULL, an alpha is obtained by logistic regression (multinomial logistic regression if n.levels>2) of the phenotype on the genotype at locus lc.

Details

File "descriptive_statistics'date_and_time'.txt" (will be created if contingency.file='TRUE'): For each tested SNP, it shows contingency tables of the subjects in the 2 or 4 different categories, first for all families together and then for each individual family.

If the argument ibd.loci is left unspecified (or NULL, its default), then we use the kinship coefficients multiplied by two, instead of the expectation of the IBD probabilities, in the computation of the score statistics. The kinship coefficients are obtained using the function kinship from the package kinship2.

Value

scores.covs.all.SNPs

list of length 'nrow(snp.names.mat)', each element of which contains the estimates of the scores and covariances of all the families.

snp.names.mat

(same matrix as provided as argument) matrix of one or two columns giving the names of the SNPs (if one column matrix) or pairs of SNPs (if two columns matrix) to be analyzed. These SNPs represent all or part of the SNPs in the data files datfilenames.

Author(s)

Alexandre Bureau and Jordie Croteau

References

Bureau A., Croteau J., Chagnon, Y.C., Roy, M.-A. and Maziade, M. Extension of the Generalized Disequilibrium Test to polytomous phenotypes and two locus models. Frontiers in Genetics, 5: Article 258.

See Also

fat2Lpoly, read.merlin.files, get.scores.pvalues

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(ped.x.all)

## Not run: 
snp.names.mat=cbind(rep("snp4.loc1",2),c("snp3.loc2","snp4.loc2"))	
microsat.names.mat=cbind(rep("1_4_mrk:",2),c("2_3_mrk:","2_4_mrk:"))	
fat2Lpoly.allSNPs=fat2Lpoly.withinR(ped.x.all,snp.names.mat,ibd.loci=
                            microsat.names.mat,contingency.file=TRUE,
							design.constraint=design.endo2disease,
							lc=1)

joint.tests=list(c(2,5))   
get.scores.pvalues(fat2Lpoly.allSNPs,joint.tests)

## End(Not run)

fat2Lpoly documentation built on Dec. 19, 2019, 1:10 a.m.