Description Usage Arguments Value Author(s) Examples
View source: R/best.trans.eQTLs.R
collect strongest trans SNP-gene associations in a buffer of size K genes per SNP
1 2 3 4 5 | best.trans.eQTLs(smpack, rhs, genechrnum, snpchrnum, K = 20,
targdirpref = "tsco", batchsize = 200, radius = 2e+06, genequeryprefix = "",
snploadprefix = "chr", snplocprefix = "chr", geneannopk, snpannopk,
exFilter = function(x) x, smFilter = function(x) x,
geneApply = lapply, SSgen = GGBase::getSS)
|
smpack |
character string naming a package from which |
rhs |
passed to |
genechrnum |
character vector of chromosome identifiers for genes, typically |
snpchrnum |
specific chromosome identifier for all SNP to be analyzed |
K |
the size of the buffer: scores will be recorded for the most strongly associated K genes for each SNP |
targdirpref |
character string where buffer data will be held in ff archives |
batchsize |
passed to |
radius |
numeric: for same-chromosome tests, tests will not be performed for SNP-gene combinations with base-pair proximity smaller than radius |
genequeryprefix |
string: used when the numeric chromosome identifier requires a prefix like ‘chr’ for annotation query resolution on gene location |
snploadprefix |
string: used when the package identified in |
snplocprefix |
string: used when the numeric chromosome identifier requires a prefix like ‘chr’ for annotation query resolution on SNP location |
geneannopk |
package to be used for CHRLOC and CHRLOCEND queries for genes |
snpannopk |
package to be used to resolve
|
exFilter |
function returning an smlSet instance, operating on expression component prior to smFilter application and eQTL testing |
smFilter |
function returning an smlSet instance, operating on the full smlSet |
geneApply |
lapply-like function, typically mclapply or the like |
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. |
instance of transManager-class
VJ Carey <stvjc@channing.harvard.edu>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
if (.Platform$OS.type != "windows") { # ff overwrites failing 5.IX.12
nsFilter2 = function(sms, var.cutoff=.5) {
alliq = apply(exprs(sms),1,IQR)
qs = quantile(alliq,var.cutoff, na.rm=TRUE)
sms[ which(alliq > qs), ]
}
thefilt = function(x) GTFfilter( nsFilter2 (clipPCs(x, 1:10), var.cutoff=.95 ), lower=.05 )
tfile = tempfile()
tfold = dir.create(tfile)
t1 = best.trans.eQTLs( "GGdata", ~1, as.character(20:22), "22",
geneannopk="illuminaHumanv1.db", snpannopk= snplocsDefault(),
smFilter=thefilt, snploadprefix="", snplocprefix="ch", targdirpref=tfile)
tt1 = transTab(t1)
tt1o = tt1[ order(tt1[,"sumchisq"], decreasing=TRUE), ][1:10,]
tt1o
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.