c3_display_result: c3_display_result

Description Usage Arguments Details Examples

View source: R/c3_functions.R

Description

This function displays the C3 results (gene set enrichment p-values for overlap between each query sample and the compendium data) in a barplot.

Usage

1
c3_display_result(c3.result)

Arguments

c3.result

C3 / XGSA testing results, as returned by 'c3_test'.

Details

This function displays the most significant C3 results (gene set enrichment p-values for overlap between each query sample and the compendium data) in a barplot. X axis is -log10 p-value, Y axis shows compendium cell types tested.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Here we will use "human.encode.data" and "human.encode.data.descriptor" from C3 repository to make the compendium.
## These data sets are loaded automatically with the package.
## The gene expression data sets are in list format. Here every list element contains transcriptomic profile data of a cell or tissue type.
human.compendium<-make_gene_expression_compendium(gene.expression.data=human.encode.data, experiment.descriptor=human.encode.data.descriptor, expression.data.format="list")

## Then we will add "hawse.human.lens.data" to the compendium. This data is also loaded with the package.
## This data set has 2 different cell types - lens epithelial cell (LEC) and lens fiber cell (LFC). Each cell type has 3 biological replicates.
Hawse.data.descriptor<-c("Hawse_LEC","Hawse_LEC","Hawse_LEC","Hawse_LFC","Hawse_LFC","Hawse_LFC")
Hawse.human.compendium<-add_sample_into_compendium(compendium.data=human.compendium, sample.data=hawse.human.lens.data, species = "hsapiens", data.format = "matrix", geneID = "external_gene_name", experiment.descriptor = Hawse.data.descriptor)

## Next we will make the marker gene compendium from the Hawse.human.compendium
human.marker.gene.compendium<-make_marker_gene_compendium(compendium.data =Hawse.human.compendium, specific.cutoff = 0.05, top.expressed.genes = 500)

## Now we will pre-process the "hoang.mouse.lens.data" (query data). This data is also loaded with the package.
## This data set also contains 2 separate cell type: LEC and LFC. Each cell contains average expression value of 3 replicates.
Hoang.processed.query.data<-preprocess_querydata(cell.tissue.data = hoang.mouse.lens.data, species = "mmusculus", data.format = "matrix", geneID = "external_gene_name")

## Next we will perform the test of the query data with the human.marker.gene.compendium
Hoang.data.test.result<-c3_test(processed.queryData = Hoang.processed.query.data, marker.gene.compendium = human.marker.gene.compendium)

## Finally we will display the test result in a bar plot where the top result shows the matched query data
par(mar=c(8,10,5,5))
c3_display_result(Hoang.data.test.result)

VCCRI/C3 documentation built on May 14, 2019, 8:41 a.m.