All.cis: functions that compute score tests for all SNP cis to genes,...

Description Usage Arguments Details Value Author(s) Examples

Description

function that computes score tests for all SNP cis to genes, with flexible filtering

Usage

1
2
3
4
5
cisScores( config = new("CisConfig"), ... )
All.cis( config = new("CisConfig"), ... )
addgwhit(ans, traitFilter=force, vname="isgwashit") 
add878(ans)
inflammFilter(gwtagger)

Arguments

config

instance of class CisConfig-class

...

passed to eqtlTests

ans

cisRun-like entity to which additional annotation will be bound by addgwhit or add878

gwtagger

GRanges like gwastagger in gwascat data elements

traitFilter

function that returns a gwastagger-like GRanges, see inflammFilter

vname

name to be used for new data.table column added by addgwhit

Details

cisScores (All.cis) returns score statistics for assocations of all SNP cis to genes, in a GRanges instance, with range names given by probes; metadata supplied SNP location, name, and score

cisAssoc targets SummarizedExperiment instances for molecular phenotype measures and VCF for variant data

addgwhit and add878 will use GWAS hit information or ChromHMM labeling to annotation ranges

Value

for cisScores: instance of cisRun-class

for cisAssoc: a GRanges with information on observed and permuted test scores per locus/feature pair

Author(s)

VJ Carey <stvjc@channing.harvard.edu>

Examples

 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
## Not run: 
 
   cc = new("CisConfig")
   chrnames(cc) = "21"
   genome(cc) = "hg19"
   lkp = try(library(parallel))
   if (!inherits(lkp, "try-error")) {
      nc = min(10, detectCores())
      options(mc.cores=nc)
      geneApply(cc) = mclapply
      }
   estimates(cc) = FALSE
   set.seed(1234)
   system.time(f1 <- cisScores( cc ))
 #
 # demonstrate adding annotation on chromatin state and gwas status
 #
 eprops = function(ans) {
 #
 # only adds fields to values() of the input
 #
  data(hmm878)
  ac = as.character
  eqr = GRanges(ac(seqnames(ans)), IRanges(ans$snplocs, width=1))
  fo = findOverlaps(eqr, hmm878)
  chromcat878 = factor(rep("none", length(ans)), levels=c(unique(hmm878$name), "none"))
  chromcat878[ queryHits(fo) ] = factor(hmm878$name[subjectHits(fo)])
  ans$chromcat878 = chromcat878
 
  if (require(gwascat)) {
    data(gwastagger)
    isgwashit = 1*(overlapsAny(eqr, gwastagger) | ans$snp 
    ans$isgwashit = isgwashit
    }
  ans
 }
 extraProps(cc) = eprops
 set.seed(1234)
 system.time(f2 <- cisScores( cc ))
#
#
 inflammFilter # to make more restrictive predicate for prediction
 
## End(Not run)

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