compareEnrichment: Compare enrichment analysis between two SNPs list

Description Usage Arguments Value Note Examples

View source: R/compareEnrichment.R

Description

Compare the enrichment analysis between two set of SNPs. compareEnrichment compare two Enrichment objects.

Usage

1
2
compareEnrichment(object.x, object.y, pattern = "Chrom", nSample = 100,
  empiricPvalue = TRUE, mc.cores = 1, onlyGenome = TRUE)

Arguments

object.x

An Enrichment object fully filled (e.g., readEnrichment).

object.y

An Enrichment object fully filled (e.g., readEnrichment).

pattern

A character string containing a expression to be matched with all chromosomes files (e.g.,"Chrom" for files which start by "Chrom" followed by the chromosome number).

nSample

The number of resampling done by reSample for p-values computation (minimum is 100).

empiricPvalue

Compute PValue based on the null distribution (FALSE). If TRUE (default), the empirical p-values are computed instead.

mc.cores

numeric: the number of cores to use (default is 1), i.e., at most how many child processes will be run simultaneously. Must be at least one, and parallelization requires at least two cores.

onlyGenome

Compute resampling step for all chromosomes (default TRUE).

Value

Return a list of three elements:

Note

Still in development.

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
if (interactive()) {
  data(toyEnrichment)

  reSample(
    object = toyEnrichment,
    nSample = 10,
    empiricPvalue = TRUE,
    MAFpool = c(0.05, 0.10, 0.2, 0.3, 0.4, 0.5),
    mc.cores = 1,
    onlyGenome = TRUE
  )

  excludeFile <- c(
    "rs7897180", "rs4725479", "rs315404", "rs17390391", "rs1650670",
    "rs6783390", "rs1642009", "rs4756586", "rs11995037", "rs4977345",
    "rs13136448", "rs4233536", "rs11151079", "rs2299657", "rs4833930",
    "rs1384", "rs7168184", "rs6909895", "rs7972667", "rs2293229",
    "rs918216", "rs6040608", "rs2817715", "rs13233541", "rs4486743",
    "rs2127806", "rs10912854", "rs1869052", "rs9853549", "rs448658",
    "rs2451583", "rs17483288", "rs10962314", "rs9612059", "rs1384182",
    "rs8049208", "rs12215176", "rs2980996", "rs1736976", "rs8089268",
    "rs10832329", "rs12446540", "rs7676237", "rs869922", "rs16823426",
    "rs1374393", "rs13268781", "rs11134505", "rs7325241", "rs7520109"
  )
  # OR
  excludeFile <- system.file("extdata/Exclude/toyExclude.txt", package = "snpEnrichment")

  toyEnrichment_exclude <- excludeSNP(toyEnrichment, excludeFile, mc.cores = 1)

  compareResults <- compareEnrichment(
    object.x = toyEnrichment,
    object.y = toyEnrichment_exclude,
    pattern = "Chrom",
    nSample = 10,
    empiricPvalue = FALSE,
    mc.cores = 1,
    onlyGenome = TRUE
  )
}

mcanouil/snpEnrichment documentation built on Sept. 19, 2021, 1:21 a.m.