How to create a GO Network in Cytoscape?
2
2
Entering edit mode
8.6 years ago
jeremy.cox.2 ▴ 130

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.

Cytoscape GO GO-terms • 8.3k views
ADD COMMENT
1
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY
3
Entering edit mode
8.6 years ago
jeremy.cox.2 ▴ 130

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

Hello, I am having kind of the same thing to do. highlight specific GO terms on a bigger GO term network. Did you finally do that ? "Even better, I would like to be able to create the entire GO metabolic network and then highlight my terms in that network."

ADD REPLY
0
Entering edit mode
8.6 years ago

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 1815 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