Gene Networks Intersection
2
0
Entering edit mode
12.0 years ago

Hi,

I am working on comparing two gene lists, I want to know if there is a fast way of representing these networks as Graphs (simple ones, may be like some cytoscape plugin are doing already, the ideal is a KEGG-like network), and highlighting common nodes between these graphs ?

Any idea on an existing tool that can do that already ? Any suggestion is welcome

Thanks

Rad

• 2.9k views
ADD COMMENT
3
Entering edit mode
12.0 years ago

I don't know if it fits what you want to do, but if you start with two gene lists:

  • you may try first to look for KEGG pathways enriched in your lists
  • if pathway are in common, you can use iSubpathwayminer to represent KEGG graphs in R
  • then you can color nodes according to list one or list two if they are exclusive ?
  • or according to fold change in list one, and then in a second graph according to FC in list two, then compare visually the two graphs.

Here is a script (i don't remember where i found it initially ? maybe here on biostar ?) that allows to look for kegg enrichment, and then plot graphs, and color nodes according to fold-change. I used it to compare the same graph in various conditions in an analysis.

library(iSubpathwayMiner)

# and other libraries you might need

nonMetabolicKO=get("nonMetabolicKO",envir=k2ri)
graphList=getNonMetabolicGraph(nonMetabolicKO)

Here, ind contains the indices of the selected genes (eg list 1). I use it to get entrezIDs.

geneList=as.vector(names$ENTREZID)[ind]

ann = identifyGraph(geneList,graphList,type="gene")      
result=printGraph(ann,detail=T)
result[1:10,1:6]

Here, you will get a list of pathways. Do the same for list 2, and then copy the pathway IDs you want to plot.

allFC is a list that contains the ratios vectors for the three comparisons i made

allFC = list(FC.1,FC.2,FC.3)
FCnames = c("Comparison 1","Comparison 2","Comaprison 3")
for(aGraph in c("04660")) {  ##  "04660" is the KEGG pathway ID I want to plot

  g = graphList[[aGraph]]

  #plotGraph(g,vertex.label=getNodeLabel)

  list = getNodeLabel(g,type="symbol",displayNumber=10)


  for(i in 1:3) {
    cols = vector(length=length(list))
    fcs = vector(length=length(list))
    for(s in 1:length(list)) {
      ss = unlist(strsplit(list[s],","))

All genes in the pathway are not in GeneList. For example, I may have selected genes with a ratio above 2, but some genes in the pathway have a fold change of 1.6. I have to get the fold changes for all the genes of the pathway. That's why I computed first FC1, FC2 and FC3 for the whole dataset. Then, I have in names$SYMBOL the gene symbols ordered in the same way. The following line get the fold change for the genes of the pathway. (It is far from perfect, as when there is more than one probe for a given gene, the FC of the first probe found is used ....this should be improved).

      fc = allFC[[i]][match(ss,names$SYMBOL)]  
      if(length(na.omit(fc)) > 0) {
        fcs[s] = fc[which(abs(fc) == max(abs(fc),na.rm=T))]
      }
      else {
        fcs[s] = NA
      }
  }
  fcs = fcs/max(abs(fcs),na.rm=T)
  fcs = (fcs + 1)/2

(colorpanel functions comes from made4 library)

  cols =  colorpanel(32,"blue","lightgray","red")[1+fcs*31] 
  cols[whichis.na(cols) == TRUE)] = "white"

  plotAnnGraph(paste("path:",aGraph,sep=""),graphList,ann,vertex.label=getNodeLabel,
             vertex.color=cols)


  }
}

This is not perfect, but maybe it can help you ?

Julien

ADD COMMENT
0
Entering edit mode
12.0 years ago
Rad ▴ 810

Awesome ! Thanks Julien, with a couple of things to add I think it will be a good start, thanks.

ADD COMMENT

Login before adding your answer.

Traffic: 1925 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6