This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Plot the correlations between OTUs and genes

Hi,

I had a table of genes (functions) and OTUs across samples. I read that computing the correlations between these OTUs and genes is a way to assign genes to OTUs. That's what I did, I get a table like this (I selected the correlations above 0.9) :

60  OTU0112 OTU4550 0.928
61  OTU0127 OTU4550 0.917
62  OTU0132 OTU4550 0.903
63  OTU0004 OTU4554 0.914
64  OTU0112 OTU4554 0.912
65  OTU0132 OTU4554 0.904
66  OTU4550 OTU4554 0.938
67  OTU4814 OTU4815 0.905
68   K00013  K00029 0.940
69   K00024  K00031 0.917
70   K00024  K00052 0.947

Then, I want to plot this table with igraph . I have two questions :

  • my table is very huge, I only show a small part : is it meaningful to create a network with a very huge table? And if yes, does igraph is enough powerful for that?
  • if it works, I will get OTUs (which will represent main nodes) with genes "around" these OTUs. Is it right to say "if K00024 is close to OTU4554, so the gene K00024 belongs to the OTU4554?"

Thanks

igraph correlation network

If you remove KO-KO and OTU-OTU edges (like you show here) how many KO-OTU high correlations are left?

If I only keep KO-OTU high correlations (>0.9), I have 38 rows (for an input file of 7771 rows)

Well, there you go. And since you have the sequences you can search the KO's in the genomes to make sure they are coded there.

But I have a last question : does the OTU numerotation is significant? I mean, does OTU0001 is related to one species in particular?

Well, you should know that, or whoever declared the OTUs. Usually it should be one strain or species, if anyone can really tell what a bacterial strain is. I can't

It's not me who built the OTUs, that's why I asked. Moreover, do you know if it possible to extract the information from the graph? For example, we can see that the OTU1891 is only correlated with the KO1848 (in the center of the graph) , and that's make a cluster. Could I get like a list or data.frame with the clusters represented with this network?

You can take the pairs, make sure OTUs are in one column and KOs in the other and then aggregate on the OTU and get specific clusters. I figured you didn't generate the OTUs, just tried to nudge you to talk to the one that did it and consult him/her, might be more useful than asking strangers for help over the internet.

Yes, you're right, I will. I've got a last question : is there a limit to consider to what extent a KO is correlated to OTU? For example, can I say that in the cluster on the top left, the highest up KO (K02889) is correlated to the OTU0095 although there are 3 edges between them, and another OTU between them?

I don't know, it might be that two OTUs are correlated and only one has the KO, might be another complexity. Best option is to look at the genomes.

1 answer

My network looks like this

Log in to answer this question.