[BioC] GO graph plotting with some in color

Loren Engrav engrav at u.washington.edu
Sat Nov 24 19:50:19 CET 2007


Followup to this issue

I can move the color data from Excel to BBedit
Then edit till I have the string like GO:0004198="red", GO:004199="blue"
Then copy paste into the c function and the error below does not occur and I
obtain red and blue nodes, which is cool

This may be good enough. But can I set up a text file in some form and then
read or scan or something the data in?

I have tried scan and read.delim and googled, etc but have failed

Thank you
=========================================

> From: Loren Engrav <engrav at u.washington.edu>
> Date: Fri, 23 Nov 2007 13:31:32 -0800
> To: <bioconductor at stat.math.ethz.ch>
> Conversation: GO graph plotting with some in color
> Subject: [BioC] GO graph plotting with some in color
> 
> 
> 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
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor



More information about the Bioconductor mailing list