mirror of
https://github.com/gladstone-institutes/Bioinformatics-Workshops.git
synced 2025-11-30 09:45:43 -08:00
updated use case 1
This commit is contained in:
parent
a0070792b0
commit
73bfcef04c
2 changed files with 314 additions and 50 deletions
|
|
@ -8,11 +8,39 @@ output: html_document
|
|||
knitr::opts_chunk$set(echo = TRUE)
|
||||
```
|
||||
|
||||
This use case will demonstrate analyzing and visualizing single cell datasets from within Cytoscape to generate network views of clusters of differentiated genes per cell population. In order to control Cytoscape from R, we'll need to install the RCy3 pacakge:
|
||||
|
||||
# Installation
|
||||
```{r}
|
||||
if(!"RCy3" %in% installed.packages()){
|
||||
install.packages("BiocManager")
|
||||
BiocManager::install("RCy3")
|
||||
}
|
||||
library(RCy3)
|
||||
```
|
||||
|
||||
The whole point of RCy3 is to connect with Cytoscape, so you will need to install and launch Cytoscape:
|
||||
|
||||
* Download the latest Cytoscape from http://www.cytoscape.org/download.php
|
||||
* Complete installation wizard
|
||||
* Launch Cytoscape
|
||||
|
||||
```{r}
|
||||
cytoscapePing()
|
||||
```
|
||||
|
||||
For this use case, you'll also need two Cytoscape apps:
|
||||
* [scNetViz app](http://apps.cytoscape.org/apps/scnetviz) to work with single cell datasets in Cytoscape
|
||||
* [stringApp](https://apps.cytoscape.org/apps/stringapp) to perform enrichment analysis using the STRING webservice
|
||||
|
||||
```{r}
|
||||
installApp('scNetViz')
|
||||
installApp('STRINGapp')
|
||||
```
|
||||
|
||||
In this example, we will browse a single cell expression atlas, explore a particular dataset, perform differential expression analysis based on provided categories, generate networks from the top genes from each category, and functionally characterize and visualize the networks.
|
||||
|
||||
##Steps 1-2: Load data
|
||||
# Load single cell dataset
|
||||
Use the accession number of single-cell experiment to pull data from the [Single-Cell Experiment Atlas](https://www.ebi.ac.uk/gxa/sc/experiments) of EMBL-EBI.
|
||||
|
||||
|
||||
|
|
@ -23,37 +51,31 @@ RCy3::commandsRun('scnetviz load gxa experiment accession=E-GEOD-81383')
|
|||
|
||||
This loads the data and opens an experiment table with three tabs, named _TPM_, _Categories_, and _DiffExp_.
|
||||
|
||||
##Step 3a
|
||||
|
||||
# Perform differential expression analysis
|
||||
Run differential expression analysis for the row with `true` value of `sel.K` (default).
|
||||
```{r}
|
||||
RCy3::commandsRun('scnetviz calculate diffexp accession=E-GEOD-81383')
|
||||
```
|
||||
|
||||
##Step 3b
|
||||
|
||||
# Generate networks
|
||||
Fetch protein-protein interaction networks from the [STRING](https://string-db.org/) database.
|
||||
|
||||
```{r}
|
||||
RCy3::commandsRun('scnetviz create network accession=E-GEOD-81383')
|
||||
```
|
||||
|
||||
The following command runs Steps 3a-3b simultaneously.
|
||||
```{r}
|
||||
RCy3::commandsRun('scnetviz create all experiment=E-GEOD-81383')
|
||||
```
|
||||
|
||||
##Step 4
|
||||
|
||||
# Check resulting networks
|
||||
Check the networks available in the current Cytoscape session.
|
||||
```{r}
|
||||
RCy3::commandsRun('network list')
|
||||
```
|
||||
|
||||
Perform functional enrichment analysis for the network selected in the current session. This uses the [_stringApp_](https://www.cgl.ucsf.edu/cytoscape/stringApp/index.shtml). To view the results in the Cytoscape application, you may have to activate the _Show enrichment panel_ option under __STRING Enrichment__ sub-menu from __Apps__ from the menu bar.
|
||||
# Perform functional enrichment analysis
|
||||
Perform functional enrichment analysis for the network selected in the current session using the _stringApp_.
|
||||
|
||||
```{r}
|
||||
RCy3::commandsRun('string retrieve enrichment allNetSpecies=Homo sapiens')
|
||||
net.enr <- RCy3::commandsRun('string retrieve enrichment allNetSpecies=Homo sapiens')
|
||||
RCy3::commandsRun('string show enrichment')
|
||||
```
|
||||
|
||||
Visit the [scNetViz website](https://www.cgl.ucsf.edu/cytoscape/scNetViz/#networks) for more information.
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue