best.cis.eQTLs: collect genewise best scoring eQTL

Description Usage Arguments Details Value Author(s) Examples

View source: R/snpsCisToGenes.R

Description

collect genewise best scoring eQTL

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
best.cis.eQTLs(smpack = "GGdata", rhs = ~1, 
  folderstem = "cisScratch", radius = 50000, 
  shortfac = 100,
  chrnames = as.character(1:22), 
  smchrpref = "", gchrpref = "", schrpref = "ch", 
  geneApply = lapply, geneannopk = "illuminaHumanv1.db", 
  snpannopk = snplocsDefault(),
  smFilter = function(x) nsFilter(MAFfilter(x, lower = 0.05), var.cutoff = 0.97), nperm = 2,
  useME=FALSE, excludeRadius=NULL, exFilter=function(x)x, 
  keepMapCache=FALSE, getDFFITS=FALSE, SSgen = GGBase::getSS)

All.cis.eQTLs(maxfdr = 0.05, inbestcis = NULL, smpack = "GGdata", 
    rhs = ~1, folderstem = "cisScratch", radius = 50000, 
    shortfac = 100,
    chrnames = as.character(1:22), 
    smchrpref = "", gchrpref = "", schrpref = "ch", 
    geneApply = lapply, geneannopk = "illuminaHumanv1.db", 
    snpannopk = snplocsDefault(),
    smFilter4cis = function(x) nsFilter(MAFfilter(clipPCs(x, 
        1:10), lower = 0.05), var.cutoff = 0.85), 
    smFilter4all = function(x) MAFfilter(clipPCs(x, 
        1:10), lower = 0.05), 
    nperm = 2, excludeRadius=NULL, exFilter=function(x)x,
    SSgen = GGBase::getSS)

meta.best.cis.eQTLs(smpackvec = c("GGdata", "hmyriB36"), rhslist = list(~1, 
    ~1), folderstem = "cisScratch", radius = 50000, shortfac = 100, 
    chrnames = as.character(1:22), smchrpref = "", gchrpref = "", 
    schrpref = "ch", geneApply = lapply, geneannopk = "illuminaHumanv1.db", 
    snpannopk = snplocsDefault(), SMFilterList = list( 
   function(x) nsFilter(MAFfilter(x, lower = 0.05), var.cutoff = 0.97), 
   function(x) nsFilter(MAFfilter(x, lower = 0.05), var.cutoff = 0.97) ),
    exFilterList = list(function(x)x, function(x)x),
   nperm = 2, excludeRadius=NULL) 

meta.All.cis.eQTLs(minchisq, smpackvec = c("GGdata", "hmyriB36"),
  rhslist = list(~1, ~1), folderstem = "cisScratch",
  radius = 50000, shortfac=100, chrnames = as.character(1:22), smchrpref = "",
  gchrpref = "", schrpref = "ch", geneApply = lapply,
  geneannopk = "illuminaHumanv1.db",
  snpannopk = snplocsDefault(),
  SMFilterList = list(function(x) nsFilter(MAFfilter(x,
                 lower = 0.05), var.cutoff = 0.97), function(x)
                 nsFilter(MAFfilter(x, lower = 0.05), var.cutoff =
                 0.97)), 
  exFilterList = list(function(x) x, function(x)
                 x),
  nperm = 2)


chromsUsed(x)

fdr(x)

fullreport(x, type, ...)

getAll(x)

getBest(x)

getCall(x)

Arguments

smpack

character string naming a package to which getSS can be applied to extract smlSet-class instances

smpackvec

vector of character strings naming packages that can be used as smpack values in a series of best.cis.eQTLs calls, one per population for meta-analysis

rhs

R model formula, with no dependent variable, that will be used with snp.rhs.tests to adjust GWAS tests for each expression probe

rhslist

a list of model formulae to be used as rhs in a series of best.cis.eQTLs calls, one per population for meta-analysis

folderstem

prefix of the folder name to be used to hold ff archives of test results

radius

coding extent of each gene will be extended in both directions by radius bases, and only SNP within these limits are used for selecting best hits for the gene

shortfac

a numeric that will scale up the chi-squared statistic before it is converted to short integer for storage in ff array

chrnames

character vector of chromosome identifiers, to be manipulated for certain query resolutions by the following parameters

smchrpref

prefix to convert chrnames into appropriate tokens for indexing smlSet elements as collected from the package named by parameter smpack

gchrpref

prefix to convert chrnames into appropriate tokens for obtaining gene metadata; in future this may need to be a string transformation function

schrpref

prefix to convert chrnames into appropriate tokens for use with snplocs for the SNP location information package identified in snpannopack parameter below

geneApply

an lapply like function, defaults to lapply

geneannopk

character string, name of a *.db annotation package that annotates probe identifiers; or see getCisMap for additional possibilities concerning FDb.* complex token values for newer annotation formats

snpannopk

character string, name of SNPlocs.Hsapiens.dbSNP.* package for obtaining; global function snplocsDefault() can be used to get a nominally current package name

smFilter

function accepting and returning an smlSet-class instance

SMFilterList

list of functions, one element per smlSet package used in meta analysis, accepting and returning an smlSet-class instance

minchisq

threshold on test statistic value that must be met to include records on SNPs in the All.cis.eQTLs report

nperm

number of permutations to be used for plug-in FDR computation

useME

logical; if TRUE, use the rudimentary interface to the MatrixEQTL package from A. Shabalin on CRAN

maxfdr

Used in All.cis.eQTLs. The process of identifying “best” cis eQTL per probe leads to a probe-specific FDR. In All.cis.eQTLs we enumerate all probes and all SNP with FDR at most maxfdr, not just the best scoring SNP per probe.

inbestcis

Used in All.cis.eQTLs. An instance of mcwBestCis that can be used to speed up the extraction of All.cis eQTL.

smFilter4cis

Used in All.cis.eQTLs. A function accepting and returning an smlSet instance. When inbestcis parameter is NULL, this filter will be used for identifying the best SNP per probe.

smFilter4all

Used in All.cis.eQTLs. A function accepting and returning an smlSet instance. This filter will be used for identifying the best SNP per probe. This filter should not affect the number of probes.

x

instance of mcwBestCis

type

character, either 'data.frame' or 'GRanges'

excludeRadius

numeric, defaulting to NULL; if non-null, defines radius around gene region that is excluded for cis SNP scoring; must be less than radius

keepMapCache

logical, if TRUE, returned mcwBestCis object will include an environment loaded with chromosome-specific lists of maps from genes to cis SNP names; if FALSE, the mapCache environment returned will be empty – NB, this feature has been found to add too much volume to returned objects and is suspended...

exFilter

this function is passed to getSS; see Details

exFilterList

for metaanalytic applications, a list of functions in correspondence with the elements of smpackvec to be passed to getSS; see Details

getDFFITS

logical; a component storing max DFFITS value for each gene will be retained if this argument TRUE

...

not used

SSgen

function to be used to create smlSet instance for testing – in general, GGBase::getSS has been used to pull the ExpressionSet and SnpMatrix data from a named package, but in some cases a specialize task is needed to create the desired smlSet. Whatever is passed to SSgen must return an smlSet instance.

Details

geneApply can be set to parallel::mclapply, for example, in a multicore context.

mcwBestCis stands for 'multi-chromosome-wide best cis' eQTL report container.

It is possible that the filtering processes should be broken into genotype filtering and expression probe filtering.

fdr(x) will return a numeric vector of plug-in FDR estimates corresponding to probe:association tests as ordered in the fullreport of a *Cis container. More metadata should be attached to the output of this function.

exFilter may seem redundant with smFilter, but its existence allows simpler management of multitissue expression archives (which may have several records per individual) with germ line genotype data (which will have only one record per individual). In this setting, use exFilter to select records for the tissue of interest; this will occur early in the smlSet generation process.

Value

an instance of mcwBestCis

Author(s)

VJ Carey <stvjc@channing.harvard.edu>

Examples

1
2
3
4
5
getClass("mcwBestCis")
## Not run: 
best.cis.eQTLs(chrnames="20")

## End(Not run)

GGtools documentation built on Nov. 8, 2020, 6:32 p.m.