Skip to content

Example Analysis

Corey O'Connor edited this page Jul 6, 2019 · 9 revisions

Table of Contents

Getting Started

Reading the Input

Preparing the Networks

Running Enrichment

Graphing Results

Pathway Enrichment

Getting started

Before running CIE, you will need to download the required input network files and sample differential gene expression (DGE) profile from here. All required data files are withing CIEdata folder. This folder contains the following files:

  1. Input DGE profile from MYC overexpression - sample_input_myc.txt
  2. Tissue Corrected ChIP-network - tissueCorrectedChIP/
  3. STRINGdb Ents - string.ents
  4. STRINGdb Rels - string.rels
  5. TRRUST Ents - TRRUST.ents
  6. TRRUST Rels - TRRUST.rels

In the following, path/to/CIEdata/ must be replaced with the path to the location where you placed and unzipped the CIEdata folder.

Reading the Input

The first step is to read the differential gene expression (DGE) file into a data frame.

library(CIE)
dge  <- read.table("path/to/CIEdata/sample_input_myc.txt",
		   header=T, sep="\t")
head(dge, 20)
Top twenty rows of MYC DGE table

Preparing the Networks

We will be using three networks: TRRUST, STRINGdb, and Tissue Corrected ChIP. To load the Tissue Corrected ChIP network we will use a function call. Here we are using the network valid across multiple tissues, "all".

tissChIP  <- filterChIPAtlas(NA, NA, NA, cellLineType="all", tissueCorrect=TRUE,
			     databaseDir="path/to/CIEdata/tissueCorrectedChIP/")

The ent and rels files of TRRUST and STRINGdb need only be downloaded.

Running Enrichment

Tissue-Corrected ChIP Atlas

To run enrichment over the Tissue-Corrected ChIP network, we will use the Ternary enrichment method since it is completely signed.

tissChIP.myc  <- runCIE(DGEs=dge,
			methods="Ternary",
			ents=tissChIP$ChIPall.ents,
			rels=tissChIP$ChIPall.rels,
			useFile=FALSE)
head(tissChIP.myc, 20)

The top twenty lines of the output are shown below

Enrichment results using Tissue-Corrected ChIP Atlas and MYC sample input data.

STRINGdb

For the STRINGdb network, we will use the Quaternary enrichment method since it is partially signed.

string.myc  <- runCIE(DGEs=dge,
		      methods="Quaternary",
		      databaseType="string",
		      databaseDir="path/to/CIEdata/")
head(string.myc, 20)

The top twenty lines of output are shown below

Enrichment results using STRINGdb and MYC sample input data.

TRRUST

TRRUST is an unsigned network so we will use the Fisher enrichment method.

trrust.myc  <- runCIE(DGEs=dge,
		      methods="Fisher",
		      databaseType="TRRUST",
		      databaseDir="path/to/CIEdata/")
head(trrust.myc, 20)

The top twenty lines of output are shown below

Enrichment results using STRINGdb and MYC sample input data.

Graphing Results

The results can be graphed using our function createCytoGraph and the external library rcytoscapejs. All ents and rels tables must be loaded into the environment for the graphing function. Consequently, we start by reading the rels and ents files for TRRUST and STRINGdb

library(rcytoscapejs)

string  <- lapply(c("string.ents", "string.rels"), function(x) {
    read.table(paste0("path/to/CIEdata/", x),
               header=T, sep="\t")
})
names(string)  <- c("ents", "rels")

trrust  <- lapply(c("TRRUST.ents", "TRRUST.rels"), function(x) {
    read.table(paste0("path/to/CIEdata/", x),
               header=T, sep="\t")
})
names(trrust)  <- c("ents", "rels")

We can then graph the results. For more information on graphing options type ?createCytoGraph in an R console where CIE is loaded.

createCytoGraph(enrichment=tissChIP.myc, ents=tissChIP$ChIPall.ents,
                rels=tissChIP$ChIPall.rels, DGEs=dge)

createCytoGraph(enrichment=string.myc, ents=string$ents,
                rels=string$rels, DGEs=dge)

createCytoGraph(enrichment=trrust.myc, ents=trrust$ents,
                rels=trrust$rels, DGEs=dge)

This creates the graphs shown below.

Graph of enrichment results

Pathway Enrichment

To identify pathways in which our top regulators play a role we use a function which sends a request to Reactome.

Tissue-Corrected ChIP

The function call based on our variable names is as shown below, which runs pathway enrichment on the top twenty regulators.

pTcMYC  <- pathwayEnrichment(tissChIP.myc$name[1:20],)

The output table is shown below

Pathway enrichment on enrichment with Tissue-Corrected ChIP Atlas

STRINGdb

The function call here is the same, but as we are using a different enrichment table the variable name is different

pStMYC  <- pathwayEnrichment(string.myc$name[1:20],)
Pathway enrichment on enrichment with STRINGdb

TRRUST

The final result shows that even though TRRUST did not return MYC as one of its top regulators, it returned members of some of the same top regulatory networks as Tissue Corrected ChIP Atlas. Tissue Corrected ChIP Atlas was able to recover MYC as a significant regulator.

pTrMYC  <- pathwayEnrichment(trrust.myc$name[1:20],)
Pathway enrichment on enrichment with STRINGdb