From a0070792b06411db3376a9fa8fbb2b48a0ae7a3c Mon Sep 17 00:00:00 2001 From: dataMaster-Kris Date: Sun, 8 Nov 2020 14:14:04 -0800 Subject: [PATCH] scnetviz use case #1 --- single-cell-analysis/Session_4/use_case_1.Rmd | 65 ++++ .../Session_4/use_case_1.html | 280 ++++++++++++++++++ 2 files changed, 345 insertions(+) create mode 100644 single-cell-analysis/Session_4/use_case_1.Rmd create mode 100644 single-cell-analysis/Session_4/use_case_1.html diff --git a/single-cell-analysis/Session_4/use_case_1.Rmd b/single-cell-analysis/Session_4/use_case_1.Rmd new file mode 100644 index 0000000..5d1d5f9 --- /dev/null +++ b/single-cell-analysis/Session_4/use_case_1.Rmd @@ -0,0 +1,65 @@ +--- +title: "scNetViz: Use case #1" +author: "Krishna Choudhary, Alex Pico" +output: html_document +--- + +```{r setup, include=FALSE} +knitr::opts_chunk$set(echo = TRUE) +``` + + + +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 +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. + + +```{r} +#Load data with Accession number E-GEOD-81383 +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 + +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 + +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 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. + +```{r} +RCy3::commandsRun('string retrieve enrichment allNetSpecies=Homo sapiens') +``` + +Visit the [scNetViz website](https://www.cgl.ucsf.edu/cytoscape/scNetViz/#networks) for more information. + + + + + + diff --git a/single-cell-analysis/Session_4/use_case_1.html b/single-cell-analysis/Session_4/use_case_1.html new file mode 100644 index 0000000..ff0f8bb --- /dev/null +++ b/single-cell-analysis/Session_4/use_case_1.html @@ -0,0 +1,280 @@ + + + + + + + + + + + + + + +scNetViz: Use case #1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +

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

+

Use the accession number of single-cell experiment to pull data from the Single-Cell Experiment Atlas of EMBL-EBI.

+
#Load data with Accession number E-GEOD-81383
+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

+

Run differential expression analysis for the row with true value of sel.K (default).

+
RCy3::commandsRun('scnetviz calculate diffexp accession=E-GEOD-81383')
+
+
+

Step 3b

+

Fetch protein-protein interaction networks from the STRING database.

+
RCy3::commandsRun('scnetviz create network accession=E-GEOD-81383')
+

The following command runs Steps 3a-3b simultaneously.

+
RCy3::commandsRun('scnetviz create all experiment=E-GEOD-81383')
+
+
+

Step 4

+

Check the networks available in the current Cytoscape session.

+
RCy3::commandsRun('network list')
+
## [1] "Cluster 4"               "Cluster (k = 4) Network"
+## [3] "Cluster 2"               "Cluster 3"              
+## [5] "Cluster 1"
+

Perform functional enrichment analysis for the network selected in the current session. This uses the stringApp. 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.

+
RCy3::commandsRun('string retrieve enrichment allNetSpecies=Homo sapiens')
+
## [1] "Enrichment results summary:"                
+## [2] "ppiEnrichment=1.0E-16"                      
+## [3] "enrichmentNodes=183"                        
+## [4] "enrichmentExpectedEdges=120"                
+## [5] "enrichmentEdges=320"                        
+## [6] "enrichmentClusteringCoeff=0.424785293637753"
+## [7] "enrichmentAvgDegree=3.49726775956284"
+

Visit the scNetViz website for more information.

+
+ + + + +
+ + + + + + + + + + + + + + +