Entering edit mode
Loren Engrav
★
1.0k
@loren-engrav-2040
Last seen 10.3 years ago
So am doing GO graphing and I have done
> bpCutLeaves <- scan(file="343afterDupesNotCut.txt", what =
"character")
Read 343 items
> bpCutLeavestree <- GOGraph(bpCutLeaves, GOBPPARENTS)
> postscript ("bpCutLeavestreeTest.ps", width=100, height = 100,
paper="special"); plot (bpCutLeavestree); dev.off()
quartz
2
> bpCutLeavestree
A graphNEL graph with directed edges
Number of Nodes = 1456
Number of Edges = 2418
And the postscript file is very nice
But I need the 343 leaves colored red (over expression) and blue
(under
expression)
So from Rgraphviz documentation I do
> nAttrs <- list()
> nAttrs$color <- scan(file="343forColorBB.txt", what="character")
Read 343 items
> nAttrs$fillcolor <- scan(file="343forColorBB.txt", what="character")
Read 343 items
Where in 343ForColorBB.txt I set the 343 to red or blue, it is a text
file
with 343 items like GO:0000002="red"
Then I do
> postscript ("bpCutLeavestreeTest.ps", width=100, height = 100,
paper="special"); plot (bpCutLeavestree, nodeAttrs = nAttrs);
dev.off()
But it returns
Error in buildNodeList(graph, nodeAttrs, subGList, attrs$node) :
the character vector must have names
I am stuck...
What have I left out
Thank you
Loren Engrav
Univ Wash
Seattle