eqtlTests {GGtools} | R Documentation

## compute association statistics between all probes and SNP in an smlSet instance

### Description

compute association statistics (or point estimates and standard errors) between all probes and SNP in an smlSet instance, using out-of-memory storage; the basic test statistics are generated by the snp.rhs.tests function of the snpStats package

### Usage

    eqtlTests(smlSet, rhs = ~1 - 1, runname = "foo",
    	targdir = "foo", geneApply = lapply,
    	shortfac = 100,
    	checkValid = TRUE, useUncertain = TRUE,
    	glmfamily = "gaussian", doFFSUMM = FALSE)

    eqtlEstimates(smlSet, rhs = ~1 - 1, runname = "foo",
    	targdir = "fooe", geneApply = lapply,
    	shortfac = 10000,
    	checkValid = TRUE, useUncertain = TRUE,
    	glmfamily = "gaussian")

### Arguments

`smlSet` | instance of `smlSet`
`rhs` | fragment of a standard formula, minus a dependent variable (i.e., starts with tilde); bindings will be sought in `pData(smlSet)`
`runname` | string used to identify output ff files
`targdir` | string naming the folder where ff outputs will reside
`geneApply` | analog to `lapply` to drive iteration over probes
`shortfac` | ff contents will be multiplied by this quantity and stored as short integers
`checkValid` | logical, will apply validObject to `smlSet` if TRUE
`useUncertain` | logical, passed as `uncertain` parameter to `snp.rhs.tests` to specify whether uncertain genotypes will be used (as 'dosage' in GLM fitting)
`glmfamily` | family specification for `snp.rhs.tests`
`doFFSUMM` | logical indicating whether ff archives will be retained for col.summary outputs for SNPs

### Details

The purpose of the `eqtlTests` function is to allow very substantial eQTL search processes to occur with R. For several million SNP and tens of thousands of probes, the storage of test results requires attention to parsimony. The storage occurs out of memory, using the ff package, and employs short integers to represent chi squared statistics. These are scaled up prior to storage, and will be scaled down prior to use.

`eqtlEstimates` will use compact storage for both the point estimates and standard errors of association estimated under an additive genetic model

Note: `snp.rhs.estimates` will emit a warning whenever the parameters are not estimable. These warning are suppressed by temporary setting of options()[['warn']] to zero.

### Value

returns an instance of `eqtlTestsManager`

### Author(s)

VJ Carey <stvjc@channing.harvard.edu>

### Examples

    hm2ceuSMS = getSS("GGtools", c("20"), renameChrs=c("chr20"))
    library(illuminaHumanv1.db)
    cptag = get("CPNE1", revmap(illuminaHumanv1SYMBOL))
    indc = which(featureNames(hm2ceuSMS) == cptag[1])
    #
    # get a set of additional genes on chr20
    all20 = get("20", revmap(illuminaHumanv1CHR))
    g20 = unique(c(all20[1:10], cptag))
    #
    hm = hm2ceuSMS[probeId(g20),]  # reduce problem
    td = tempdir()
    curd = getwd()
    setwd(td)
    time.lapply = system.time(e1 <- eqtlTests( hm, ~male ))
    time.lapply
    e1
    # best chisq(1) for CPNE1
    topFeats(probeId(cptag), e1)
    setwd(curd)

[Package GGtools version 5.23.2 Index]