[BioC] DEGraph graph format?

laurent jacob laurent.jacob at gmail.com
Fri Jun 8 22:30:35 CEST 2012


Hi Hamid,

2012/6/7 Hamid Bolouri <hbolouri at fhcrc.org>:

>>library(NCIgraphData)
>>data("NCI-cyList")
>> NCI.cyList[[1]]
> A graphNEL graph with directed edges
> Number of Nodes = 35
> Number of Edges = 40

The graphs NCI-cyList cannot directly be used with DEGraph: they are
raw representations of the NCI biopax files. In particular, the nodes
of the graph do not correspond to genes:

> library(graph)
> nodes(NCI.cyList[[1]])
 [1] "6749854621221256793-pid_m_25632-674985462-829166685-pid_m_100726"
 [2] "6749854621221256792-pid_m_25631-674985462-829166685-pid_m_100726"
 [3] "674985462-829169511-pid_m_100441-674985462-829143405-pid_m_101095"
 [4] "674985462-829168394-pid_m_100592-674985462-829143405-pid_m_101095"
 [5] "674985462-829169605-pid_m_100410-674985462-829143405-pid_m_101095"
[...]

which is why testOneGraph doesn't manage to associate the graph nodes
with exprData.

The package NCIgraph converts these raw graphs to gene graphs that can
be used with the DEGraph package:

library('NCIgraph')
grList <- getNCIPathways(cyList=NCI.cyList, verbose=verbose)$pList

Now on my computer testOneGraph fails on NCIgraph objects which have
zero or one gene in exprData. I couldn't figure why this is the case
now and wasn't the case when I wrote the package. It will be fixed in
the next release, in the meantime if you want to test all the pathways
in grList you can check whether
length(intersect(translateNCI2GeneID(gr), rownames(exprData))) > 1, if
yes call testOneGraph, if not return NULL. For example in the Loi2008
demo, replace

if(min(length(nodes(gr)),length(gr at edgeData@data))>0)

by

if(min(length(nodes(gr)),length(gr at edgeData@data))>0
  && length(intersect(translateNCI2GeneID(gr), rownames(exprData))) > 1)

Note that only 11 networks out of the 460 in grList will have strictly
more than one gene in common with the exprData of Loi2008.

Best,

Laurent

-- 
Laurent Jacob
Department of Statistics
UC Berkeley
http://cbio.ensmp.fr/~ljacob



More information about the Bioconductor mailing list