Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Commit

Permalink
#12 Add "Set the Node Shape"
Browse files Browse the repository at this point in the history
  • Loading branch information
kozo2 committed Dec 1, 2019
1 parent 124aa49 commit 2051f32
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions mapping-data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ The exercises require you to have certain R packages installed.

```{r}
install.packages("httr")
install.packages("dplyr")
```

# Loading Network
Expand Down Expand Up @@ -127,3 +128,25 @@ setNodeColorDefault('#A9A9A9')
```{r}
fitContent()
```

# Set the Node Shape

We imported both expression measurement values and corresponding significance values.
We can use the significance values to change the shape of the nodes so that measurements we have confidence in appear as squares while potentially bad measurements appear as circles.

The following code maps the node with gal80Rsig value less than 0.05 to RECTANGLE shape, with greater than 0.05 to ELLIPSE shape.

```{r}
gal80rsig.score.table <- getTableColumns('node', 'gal80Rsig')
```

```{r}
getNodeShapes()
```

```{r}
setNodeShapeMapping('SUID', row.names(gal80rsig.score.table), ifelse(gal80rsig.score.table$gal80Rsig < 0.05, "RECTANGLE", "ELLIPSE"))
```

- Verify that some nodes now have a square shape.

0 comments on commit 2051f32

Please sign in to comment.