This class is defined to summarize the enrichment analysis on each chromosomes and the whole genome.

Slots

Signal

A three columns data.frame: "SNP", "PVALUE" and "IN" (e.g., GWAS). "IN" is computed during the reading step and gives informations about which SNPs are kept for the enrichment analysis.

Loss

A four columns data.frame: "Rows", "Unique", "Intersect.Ref.Signal" and "CIS". This slot gives information on data losses.

Call

Each parameters used for the reading or resampling step are stored in this slot.

eSNP

Contain a EnrichSNP object for a list of SNPs (eSNP).

xSNP

Contain a EnrichSNP object for a extended list of SNPs (xSNP).

Chromosomes

A list of 22 Chromosome objects.

Objects from the Class

Enrichment is defined to build an object of class Enrichment in order to compute an enrichment analysis. Enrichment is the object containing the results for all Chromosome object and for the whole genome.

When an Enrichment object is created, it contains a list of SNPs (e.g., eSNPs). All the others slots are "empty". After reSample is ran on an Enrichment object, the slots: Table, EnrichmentRatio, Z, PValue and Resampling are filled.

Note that if reSample is executed on an Enrichment every new resampling is added to the original ones, pre-existing statistics are erased and computed again with the new resampling set.

Examples

data(toyEnrichment) toyEnrich <- enrichment() show(toyEnrich)
#> ~~~ Class: Enrichment ~~~ #> ~ Loss : (0x0) NA #> ~ Call : #> readEnrichment() : Not yet called. reSample() : Not yet called. #> ~ eSNP : #> - List : (0) NA #> - Table : (2x2) NA #> - EnrichmentRatio : NA #> - Z : NA #> - PValue : NA #> - Resampling : (0x5) 0 #> #> ~ xSNP : #> - List : (0) NA #> - Table : (2x2) NA #> - EnrichmentRatio : NA #> - Z : NA #> - PValue : NA #> - Resampling : (0x5) 0 #> #> ~ Chromosomes : 22/22 empty Chromosomes
toyEnrich["Loss"] <- toyEnrichment["Loss"] toyEnrich["Loss"]
#> Rows Unique Intersect.Signal CIS #> Signal 10000 10000 9978 9978 #> Genome 1333 1333 1330 1330 #> Chrom1 104 104 104 104 #> Chrom2 110 110 110 110 #> Chrom3 95 95 95 95 #> Chrom4 83 83 83 83 #> Chrom5 94 94 94 94 #> Chrom6 91 91 91 91 #> Chrom7 78 78 78 78 #> Chrom8 86 86 86 86 #> Chrom9 66 66 66 66 #> Chrom10 62 62 62 62 #> Chrom11 81 81 81 81 #> Chrom12 62 62 61 61 #> Chrom13 48 48 48 48 #> Chrom14 34 34 34 34 #> Chrom15 37 37 36 36 #> Chrom16 37 37 37 37 #> Chrom17 34 34 34 34 #> Chrom18 34 34 34 34 #> Chrom19 26 26 26 26 #> Chrom20 30 30 30 30 #> Chrom21 18 18 17 17 #> Chrom22 23 23 23 23
toyEnrich <- enrichment(Loss = toyEnrichment["Loss"], eSNP = toyEnrichment["eSNP"]) toyEnrich <- enrichment(Loss = toyEnrichment["Loss"]) if (interactive()) { 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 ) print(toyEnrichment) 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" ) toyEnrichment_exclude <- excludeSNP(toyEnrichment, excludeFile, mc.cores = 1) print(toyEnrichment_exclude) }