---
title: "Intro"
author: "Ayman Y"
date: "June 10, 2019"
output: html_document
runtime: shiny
---

## **Introduction**

---

This web-based interactive application wraps the popular <a href="https://bioconductor.org/packages/release/bioc/html/clusterProfiler.html" target="_blank"><strong>clusterProfiler</strong></a> package which implements methods to analyze and visualize functional profiles of genomic coordinates, genes and gene clusters.

Users can upload their own differential gene expression (DGE) data from <a href="https://bioconductor.org/packages/release/bioc/html/DESeq2.html" target="_blank"><strong>DESeq2</strong></a> or import data from the upstream <a href="http://nasqar.abudhabi.nyu.edu/deseq2shiny/" target="_blank"><strong>Deseq2Shiny</strong></a> app.

This application is meant to provide an intuitive interface for researchers to easily perform **Over-representation analysis** of GO-Terms and KEGG pathways with no prior programming experience in R.

Visuals produced include dot plots, wordclouds, category net plots, enrichment map plots, GO induced graphs, and enriched KEGG pathway plots using the  <a href="https://bioconductor.org/packages/release/bioc/html/pathview.html" target="_blank"><strong>Pathview package</strong></a>.

The application follows this <a href="https://learn.gencore.bio.nyu.edu/rna-seq-analysis/over-representation-analysis/" target="_blank">tutorial</a> closely

See **Figure 1** below for example output plots (Click on image to enlarge).

<div class="col-md-12"><hr ></div>

<div class="col-md-12">
<p><strong><em>Figure 1: Example plots</em></strong></p>
</div>

<div class="">
<div class="row">
<div class="col-md-4">

<a href="#" class="pop">
    <div class="BoxArea4" style="width: 100%;max-width:300px;margin: 0 auto;display: block;">
    <h5 class="text-center">Bar Plot</h5>
    <img src="www/barplot.png" alt="Workflow" style="width: 100%;max-width:300px;margin: 0 auto;display: block;"/>
    </div>
</a>
</div>

<div class="col-md-4">
<a href="#" class="pop">
    <div class="BoxArea4" style="width: 100%;max-width:300px;margin: 0 auto;display: block;">
    <h5 class="text-center">Dot plot</h5>
    <img src="www/dotplot.png" alt="Workflow" style="width: 100%;max-width:300px;margin: 0 auto;display: block;"/>
    </div>
</a>
</div>

<div class="col-md-4">
<a href="#" class="pop">
    <div class="BoxArea4" style="width: 100%;max-width:300px;margin: 0 auto;display: block;">
    <h5 class="text-center">Category Netplot</h5>
    <img src="www/cnetplot.png" alt="Workflow" style="width: 100%;max-width:300px;margin: 0 auto;display: block;"/>
    </div>
</a>
</div>

</div>

<div class="row">

<div class="col-md-4">
<a href="#" class="pop">
    <div class="BoxArea4" style="width: 100%;max-width:300px;margin: 0 auto;display: block;">
    <h5 class="text-center">GO induced graph</h5>
    <img src="www/goplot.png" alt="Workflow" style="width: 100%;max-width:300px;margin: 0 auto;display: block;"/>
    </div>
</a>
</div>

<div class="col-md-4">
<a href="#" class="pop">
    <div class="BoxArea4" style="width: 100%;max-width:300px;margin: 0 auto;display: block;">
    <h5 class="text-center">Pathview plot</h5>
    <img src="www/pathview.png" alt="Workflow" style="width: 100%;max-width:300px;margin: 0 auto;display: block;"/>
    </div>
</a>
</div>

<div class="col-md-4">
<a href="#" class="pop">
    <div class="BoxArea4" style="width: 100%;max-width:300px;margin: 0 auto;display: block;">
    <h5 class="text-center">Word Cloud</h5>
    <img src="www/wordcloud.png" alt="Workflow" style="width: 100%;max-width:300px;margin: 0 auto;display: block;"/>
    </div>
</a>
</div>

</div>
</div>
<div class="modal fade" id="imagemodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">              
      <div class="modal-body">
      	<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <img src="" class="imagepreview" style="width: 100%;" >
      </div>
    </div>
  </div>
</div>


<div class="col-md-12"><hr style="border-top: none;"></div>

## **Input Data Types**

---

This application accepts the following types of input data:

### 1. Example data (Demo):

- For demo purposes, you can select "Example data"

- You can follow the steps afterwards to run the analysis mirroring the <a href="https://learn.gencore.bio.nyu.edu/rna-seq-analysis/over-representation-analysis/" target="_blank">tutorial</a> in order to get familiar with the app

### 2. Upload your own data (gene counts):

<div class="row">

<div class="col-md-6">
<ul>
<li><p>A .csv/.txt file that contains a <strong>table of differential gene expression (DGE) data</strong></p></li>
<li><p>Eg. the output of DESeq2 </p></li>
<li><p>The file can be either <strong>comma or tab delimited</strong></p></li>
<li><p>The required columns are <strong>Gene name/id, Log2 Fold Change, p-adjusted values </strong></p></li>
<li><p>You will have to select the column names that match the above required columns </strong></p></li>
<li><p>For a sample file, click <a href="www/exampleData/drosphila_example_de.csv" target="_blank">here</a></p></li>
</ul>
</div>


<div class="col-md-6">

<p><strong><em>Figure 2: Eg. DGE data file</em></strong></p>
<div class="BoxArea4" style="width: 100%;margin: 0 auto;display: block;">
    <img src="www/sampleTable.png" alt="Sample file" style="width: 100%;"/>
</div>


</div>

</div>


<div class="col-md-12"><hr style="border-top: none;"></div>
## **Run Results**
---
### 1. Data Output
The output results will be either displayed and/or is downloadable
- EnrichGo results table
- EnrichKEGG results table

### 2. Visualization
Various forms of visualizations are included for either Go/KEGG:

* Bar Plot
* Dot Plot
* Enrichment Plot Map
* Enriched GO induced graph (goplot, GO only)
* Enriched GO induced graph (cnetplot)
* Pathview Plots (KEGG)
* Word Clouds


---

