Skip to content

Commit

Permalink
Update Wikipathways-data-visualization-basic.Rmd
Browse files Browse the repository at this point in the history
Consolidate node border color updates to the same code chunk, some minor text updates.
  • Loading branch information
khanspers committed Jul 28, 2023
1 parent 33c33b2 commit 30edfab
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cytoscapePing()

For this vignette, you’ll need the following apps:

* the [wikiPathways](https://apps.cytoscape.org/apps/wikipathways) app,
* The [wikiPathways](https://apps.cytoscape.org/apps/wikipathways) app,

```{r}
#available in Cytoscape 3.7.0 and above
Expand All @@ -58,10 +58,10 @@ installApp('WikiPathways')
RCy3::commandsRun('wikipathways import-as-pathway id=WP179')
```

The data we will be using for this workflow (E-GEOD-68086.csv) is from a study investigating the RNA-seq signatures of platelets from patients with various types of cancer, in an effort to develop a platelet-based diagnostic (Best et el., 2015). The data was downloaded from Expression Atlas.
The data we will be using for this workflow (E-GEOD-68086.csv) is from a study investigating the RNA-seq signatures of platelets from patients with various types of cancer, in an effort to develop a platelet-based diagnostic ([Best et el., 2015](https://www.cell.com/cancer-cell/fulltext/S1535-6108(15)00349-9)). The data was downloaded from [Expression Atlas](https://www.ebi.ac.uk/gxa/experiments/E-GEOD-68086/Downloads).

```{r}
df <- read.csv(file="https://cytoscape.github.io/cytoscape-tutorials/protocols/data/E-GEOD-68086.csv", stringsAsFactors = FALSE)
df <- read.csv(file="https://cytoscape.github.io/cytoscape-tutorials/protocols/data/E-GEOD-68086.csv", stringsAsFactors = FALSE)
RCy3::loadTableData(df, data.key.column = "Gene.ID", table.key.column = "Ensembl" )
Expand All @@ -77,16 +77,17 @@ RCy3::setNodeColorMapping('X.breast.carcinoma..vs..normal...foldChange', colors=

# Data Visualization: Node Border Width

We also have a significance measure for the fold change, which we can add to our visualization. For this, we will use both Node Border Width and Node Border Size to visualize the p value.
We also have a significance measure for the fold change, which we can add to our visualization. For this, we will use both Node Border Width and Node Border Color to visualize the p value. Let's start with Node Border Width:
```{r}
RCy3::setNodeBorderWidthMapping('X.breast.carcinoma..vs..normal..pValue', table.column.values=c(0,0.05), widths=c(5,5,1,1), mapping.type='c', style.name="WikiPathways")
RCy3::setNodeBorderColorDefault('#5A5A5A',style.name="WikiPathways")
```

# Data Visualization: Node Border Color

Significant genes now have a thicker node border, but we can also add color to further visualize significant nodes. We will set the default Node Border Color to dark grey, then update the Node Border Color for significant nodes to pink:
```{r results=FALSE}
RCy3::setNodeBorderColorDefault('#5A5A5A',style.name="WikiPathways")
RCy3::setNodeBorderColorMapping('X.breast.carcinoma..vs..normal..pValue', c(0, 0.05,0.05), c('#FC0FC0', '#FC0FC0', '#5A5A5A'), mapping.type='c', style.name="WikiPathways")
```

Expand Down

0 comments on commit 30edfab

Please sign in to comment.