Question: How to create a GO Network in Cytoscape?
0
gravatar for jeremy.cox.2
2.8 years ago by
jeremy.cox.290
United States
jeremy.cox.290 wrote:

Hello all,

I have a list of GO terms and I would like to create the corresponding network. Even better, I would like to be able to create the entire GO metabolic network and then highlight my terms in that network.

I have two challenges: I am studying Microbiome, which is largely unknown/predicted genes, so I have derived GO terms from blastX homology hits / Blast2GO. So this means (1) I do not have a specific organism to select, (2) I do not have gene names, and (3) I have only GO terms.

Now Cytoscape has many wonderful GO enrichment tools, and I was advised to use these by my colleagues.

But I can't seem to find a method to create a Network from GO terms or import the full GO network.

go cytoscape go-terms • 2.7k views
ADD COMMENTlink modified 2.8 years ago • written 2.8 years ago by jeremy.cox.290

In cytoscape there are some plugins like ClueGO and EnrichmentMap, but I have never used them for my purpose. I am just thinking of how to put the relations of GO terms to get the edges and connection for making the graph. That is what will build the network , which usually one can make from gene lists putting them either in stringdb or with cytoscape with GO plugins and then build the relationships. But since you do not have gene lists so you directly want to do it with GO terms there needs to be some association score so that you can associate an enrichment score or association score of your GO terms with that of the entire GO master file that you have for metabolites. Then you should be able to have for your GO term list enrichment score and p-value which can then be put to cytoscape to make the necessary relations for defining the edge and produce a network. This is what is coming to my mind as of now. If this does not work you can always take a look at this thread and see if you can get some idea.

I think this link should be helpful. You would need to map the GO terms to create some metric of enrichment and association with GOSlims so that you can then import them to the Cytoscape to build the network associations and and then visualize. Hope these helps.

ADD REPLYlink written 2.8 years ago by ivivek_ngs4.7k

Gene ontology tool list has helped. I found GOBU there... which allows me to import GO terms. Problem is, the manual doesn't specify their custom file format.

I think I could simply create my own tree using the go.obo data file. Then I just need to put into a format Cytoscape understands.

ADD REPLYlink written 2.8 years ago by jeremy.cox.290
2
gravatar for jeremy.cox.2
2.8 years ago by
jeremy.cox.290
United States
jeremy.cox.290 wrote:

This is how I accomplished the task of making the GO network in Cytoscape.

1) Download go.obo from http://geneontology.org/page/download-ontology 2) Run my python script to convert go.obo to GO.cytoscape.sif file 3) Cytoscape -> Import -> Network -> File, select the GO.cytoscape.sif file

PRESTO, the full network is loaded!

As far as my goal not being clear, yes my end game is exactly to do a comparison / enrichment analysis. But the network needed to exist before I could do that. I honestly don't know the next step at this juncture... still learning. Next step will be to create sub-graphs representing new input file GO terms (for multiple treatments), and then compare them.

import re

if __name__ == "__main__":

    inputOBO = "E:/go.obo"
    outputSIF = "E:/GO.cytoscape.sif"

    outF = open(outputSIF, "w")


    newTerm = False
    GOvalue = "initilize"
    isAfound = False

    for line in open(inputOBO, "r"):
        if newTerm: #expect id: value line
            GOvalue = line[4:-1]
            newTerm = False
            isAfound = False

        if line == "[Term]\n":
            newTerm = True
        if line == "[Typedef]\n":
            break   #read all the nodes, don't need type defs
        if line == "\n":    #end of entry
            isAfound = False
        elif re.search("^is_a:",line) != None:
            isAfound = True

        if isAfound:
            splits = line.split()
            outLine="\n"
            if splits[0] == "relationship:":  
                outLine = GOvalue + "\t" + splits[1] + "\t" + splits[2] + "\n"
                outF.write( outLine )
            elif splits[0] == "intersection_of:" or splits[0][:5] == "creat":
                #do nothing, don't use
                outLine=outLine
            else:
                outLine = GOvalue + "\t" + splits[0] + "\t" + splits[1] + "\n"
                outF.write( outLine )
ADD COMMENTlink modified 2.8 years ago • written 2.8 years ago by jeremy.cox.290

You don't need a graph for enrichment analysis unless there's something I am missing. Let's say you got a list of GO terms for organism A and another one for B, you can directly compare these two lists using a hypergeometric test (e.g. Fisher's exact test). A graph could be useful for visualization purposes if it's not too big.

ADD REPLYlink written 2.8 years ago by Jean-Karim Heriche18k
0
gravatar for Jean-Karim Heriche
2.8 years ago by
EMBL Heidelberg, Germany
Jean-Karim Heriche18k wrote:

Just make the network you want/need with a script, save to a file and import into Cytoscape.
It seems your problem is that you don't have network information about your genes. One option is to transfer this information by homology i.e. connect two genes in your data set if two known homologs can be linked. What kind of information you consider to make a link is up to you depending on the question you're interested in. Another option, which may be what you're asking about, would be to make a graph of GO terms and show the genes as attributes of the terms. The ontology being a graph, you could just import it into Cytoscape from a compatible file format. As an alternative you could link the GO terms by some measure of semantic similarity.
However, note that the two options don't show the same information. The first one will show the distribution of GO terms relative to the gene information you used to build the graph. The second one will show you the distribution of genes on the ontology.
As for doing enrichment analysis, you need at least two lists to compare one against the other. You only mention one list so what you're trying to achieve is not clear.

ADD COMMENTlink modified 2.8 years ago • written 2.8 years ago by Jean-Karim Heriche18k

Your answer was helpful, thank you. I ultimately made a script to generate the network! The key problem was I didn't have ANY genes identified, not that I don't have network information for them. The organisms I am studying don't have annotated genes. So I literally only have GO terms to build a network.

ADD REPLYlink written 2.8 years ago by jeremy.cox.290

About how many go terms are we talking about? And does it has t be cytoscape? - I don't really know it, so does it have any advantages? (or in other terms, what are you trying to accomplish with this network?)

ADD REPLYlink written 2.8 years ago by LLTommy1.2k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2522 users visited in the last hour