GraphInCytoscape: GraphInCytoscape

Description Usage Arguments Value Note Author(s) Examples

View source: R/SCRNA.R

Description

Graphs a functional Module (igraph) from scPPIN in Cytoscape. The more red the node the more highly expressed it is. If node is an ellipse it is a TF else it's not. Edge thickness corresponds to the correlation between the two nodes the thicker the more highly correlated. Edge color corresponds to correlation, the more red the more positively correlated the more blue the more negatively correlated.

Usage

1

Arguments

FM

functional Module from scPPIN to be graphed

name

name of cluster being graphed

Value

No return value simply graphs the cluster as a network in Cytoscape

Note

to use Cytoscape must be installed and opened. Called by getCyGraph

Author(s)

Matt Heffernan, University of Illinois at Chicago

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

GraphInCytoscape <- function(FM=FM0, name="endothelial")

## The function is currently defined as
function(FM, name)
{
  createNetworkFromIgraph(FM, title= name)
  
  setNodeColorMapping('nodeScore', c(min(V(FM)$nodeScore), mean(V(FM)$nodeScore), max(V(FM)$nodeScore)), c('#F5EDDD', '#F59777', '#F55333'))
  TFs <- readLines("TFs.txt")
  table <- as_data_frame(FM,what=c("vertices"))
  filtered <- table[table$name 
  TF <- filtered[,'name']
  setNodeShapeBypass(node.names=TF, new.shapes="ELLIPSE")
  
  
  setEdgeLineWidthMapping('weight',c(min(E(FM)$weight), mean(E(FM)$weight), max(E(FM)$weight)), widths = c(1,10,20))
  setEdgeColorMapping('weight',c(min(E(FM)$weight), mean(E(FM)$weight), max(E(FM)$weight)), colors= c("#00008B", "#FFFFFF", "#EE4B2B"))
  
  
}

mheffe3/SCNVC documentation built on Dec. 21, 2021, 5:52 p.m.