How can I construct the adjacency matrix for gene ontology between genes
1
0
Entering edit mode
22 months ago

Hi, I've been trying construct the adjacency matrix by counting the matched GO terms between two genes.

For example, when I insert three genes, the result should be like this:

Genes: {7038, 7157, 472}

GO: Biological Function (BF)

enter image description here

Each number represents the matched number of gene ontology term between two genes.

Unfortunately, there are huge number of genes, I need the tool that calculate it automatically.

Which tool or python package can do this job?

GeneOntology python GO • 958 views
ADD COMMENT
1
Entering edit mode
22 months ago
barslmn ★ 2.3k

Networkx has a function called adjacency_matrix. Here is an example with obonet and networkx.

ADD COMMENT
0
Entering edit mode

Thank you for your answer! Can I ask one more question?

I guess that obonet represents the network containing nodes (=GO term) and edges (=hierarchical relation).

But I need gene-gene adjacency matrix. If two genes have a common GO term, the value of them is set to 1 in the matrix.

Can obonet and networkx make this matrix?

ADD REPLY
0
Entering edit mode

I don't know really. GO has annotation files with the gene symbols. Maybe something can be written from that file if you can't find a tool that already does this.

ADD REPLY

Login before adding your answer.

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