knitr::opts_chunk$set(warning = FALSE, message = FALSE, results = "hold", eval = TRUE)

````{=html}

## Introduction

**VAM** [@Frost2020.02.18.954321] and **GSVA** [@Hanzelmann2013] are popular methods for GSE (Gene Set Enrichment) and allows the identification of changes in pathway activity in RNA-Seq data. Overall, gene sets can be uploaded or selected from the available databases ([How to *Import Genesets*?](import_genesets.html)), and the pathway analysis method can be run on the selected gene sets which can eventually be visualized using Violin plot.  

To view detailed instructions on how to use these methods, please select "Interactive Analysis" for using pathway analysis in Shiny application or "Console Analysis" for using these methods on R console from the tabs below:

## Workflow Guide

````{=html}
<div class="tab">
  <button class="tablinks" onclick="openTab(event, 'interactive')" id="ia-button">Interactive Analysis</button>
  <button class="tablinks" onclick="openTab(event, 'console')" id="console-button">Console Analysis</button>
</div>

<div id="interactive" class="tabcontent">

Entry of The Panel

From anywhere of the UI, the panel for pathway analysis can be accessed from the top navigation panel at the circled tab shown below.

PathwayEntry\

The UI is constructed in a sidebar style, where the left-sided sidebar works for setting the parameters and running the pathway analysis, and the right part main panel is for visualization checking.

Run Pathway Analysis

1. Choose An Algorithm

PathwayAlgo\

For running any types of pathway analysis, there are always three essential inputs that users should be sure with:

After the pathway analysis method is confirmed, the lower part will dynamically switch to the method specific settings.

2. Parameter Settings

````{=html}

VAM

![VAMParameter](ui_screenshots/pathwayAnalysis/path_ui_VAM.PNG)\

When the selected algorithm is "VAM" , the parameter settings will look like the figure above. The method specific parameters include:

- `center`, If True, values will be mean centered when computating the Mahalanobis statistic.
- `gamma`, If True, a gamma distribution will be fit to the non-zero squared Mahalanobis distances computed from a row-permuted version of the gene expression matrix. The estimated gamma distribution will be used to compute a one-sided p-value for each cell. If False, the p-value will be computed using the standard chi-square approximation for the squared Mahalanobis distance (or non-central if center = FALSE).  

````{=html}
</details>
<details>
  <summary><b>GSVA</b></summary>

GSVAParameter\

When the selected algorithm is "GSVA", no additional parameter settings exist other than the three essential inputs common for both VAM and GSVA.

````{=html}


**3. Visualization**

![Pathwayresult](ui_screenshots/pathwayAnalysis/path_ui_result.PNG)\

The visualization is implemented with a plotting of cell by geneset matrix score.


````{=html}
<div class = "offset">
<details>
  <summary><b>Detail</b></summary>

Pathwayvisualization\

The parameter panel for visualization comprises of:

````{=html}

wzxhzdk:4 ```{R pathPrep} sce <- scaterlogNormCounts(sce, assayName = "logcounts") sce <- importGeneSetsFromMSigDB(inSCE = sce, categoryIDs = "H", species = "Homo sapiens", mapping = "gene_symbol", by = "rownames") wzxhzdk:5 ````{=html} wzxhzdk:6 ```{R path_GSVA, eval=FALSE} # Directly use an assay # not run sce <- runGSVA(inSCE = sce, geneSetCollectionName = "H", useAssay = "logcounts") wzxhzdk:7 In the example above, `"VAM_H_CDF"` is the name of the result generated by VAM, where `"HALLMARK_INFLAMMATORY_RESPONSE"` is a geneset from geneset collection `"H"`, imported at the very beginning. Users can also set argument `groupby` to a `colData` variable for clusters or any biological conditions, in order to group the scores into multiple violin plots. To get the names of all pathway analysis results: ```{R pathRes} getPathwayResultNames(sce) wzxhzdk:8 ````{=html}

````

References



compbiomed/singleCellTK documentation built on May 8, 2024, 6:58 p.m.