... | ... |
@@ -6,7 +6,7 @@ Version: 1.31.0 |
6 | 6 |
Date: 2015-12-25 |
7 | 7 |
Author: Diego Diez |
8 | 8 |
Depends: R (>= 2.10), igraph (>= 1.0) |
9 |
-Imports: AnnotationDbi, DBI, RSQLite |
|
9 |
+Imports: methods, AnnotationDbi, DBI, RSQLite |
|
10 | 10 |
Suggests: RUnit, BiocGenerics, MotifDb, graph, PWMEnrich, biomaRt, |
11 | 11 |
knitr, Biostrings, BSgenome.Mmusculus.UCSC.mm8.masked, org.Hs.eg.db, org.Mm.eg.db, |
12 | 12 |
ggplot2 |
... | ... |
@@ -137,13 +137,12 @@ annotateTRM = function(g, target) { |
137 | 137 |
else |
138 | 138 |
default |
139 | 139 |
} |
140 |
- |
|
141 | 140 |
plotTRM = function(g, layout = layout.fruchterman.reingold, mar = .5, vertex.col, vertex.cex, vertex.lwd, edge.col, edge.lwd, edge.lty, label = TRUE, label.cex, label.col, label.pos = NULL, label.offset = 1.5, adjust.label.col = FALSE, normalize.layout=TRUE) { |
142 | 141 |
|
143 |
- if(class(layout) == "function") |
|
142 |
+ if(is(layout, "function")) |
|
144 | 143 |
l = layout(g) |
145 | 144 |
else |
146 |
- l = layout |
|
145 |
+ l = as.matrix(layout) |
|
147 | 146 |
|
148 | 147 |
# normalize layout. |
149 | 148 |
if(normalize.layout) |