mapDGEobj: Function mapDGEobj

Description Usage Arguments Value Author(s) Examples

View source: R/graphDGEobj.R

Description

Reads a DGEobj and produces a node pair file defining parent/child relationships between data items in the DGEobj. Plot them with Function graphDGEobj.

Usage

1
mapDGEobj(dgeObj, directed = TRUE)

Arguments

DGEobj

A workflow object of DGEobj class data.

Value

A class igraph network object.

Author(s)

John Thompson, jrt@thompsonclan.org

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
25
26
27
28
29
30
31
32
33
34
35
  library(igraph)
  library(RColorBrewer)

  # Prepare an iGraph object for plotting
  mynet <- mapDGEobj(dgeObj)

  #define a layout
  lay.sug <- layout_with_sugiyama(mynet)

  #2D Plot
  plot(mynet,
       edge.arrow.size=.3,
       vertex.color="dodgerblue2",
       vertex.frame.color="dodgerblue4",
       layout=lay.sug$layout)

  #2D Plot; colorby the basetype attribute
  pal <- brewer.pal(length(unique(V(mynet)$basetype)), "Set1")
  myPallet <- pal[as.numeric(as.factor(vertex_attr(mynet, "basetype")))]

  plot(mynet,
       edge.arrow.size=.3,
       vertex.color = myPallet,
       vertex.label.family = "Helvetica",
       layout=lay.sug$layout
       )

  #2D Interactive plot
  plotHandle <- tkplot(net,
                       vertex.color=myPallet,
                       vertex.frame.color="dodgerblue4",
                       canvas.width = 800,
                       canvas.height = 800,
                       layout=lay.sug$layout)
  tk_close(plotHandle)

jrthompson54/DGE.Tools2 documentation built on May 12, 2021, 8:47 p.m.