From 3 gene lists (lung, nasal, gut), how to make this gene overlap network plot?
This image is figure 4a from: https://www.nature.com/articles/s41591-020-01227-z
Bioinformatics Stack Exchange is a question and answer site for researchers, developers, students, teachers, and end users interested in bioinformatics. It only takes a minute to sign up.
Sign up to join this communityFrom 3 gene lists (lung, nasal, gut), how to make this gene overlap network plot?
This image is figure 4a from: https://www.nature.com/articles/s41591-020-01227-z
I'm the author of gravis, an open source package for interactive graph visualization in Python.
Here's a quick attempt to reproduce a part of the figure you've provided:
import gravis as gv
import networkx as nx
s1 = 40
c1 = 'white'
s2 = 20
c2 = '#ffd703'
s3 = 20
c3 = 'orange'
s4 = 20
c4 = 'red'
g = nx.Graph()
g.add_node('Lung', color=c1, size=s1, border_size=1)
g.add_node('Nasal', color=c1, size=s1, border_size=1)
g.add_node('Gut', color=c1, size=s1, border_size=1)
g.add_node('MDFI', color=c2, size=s2)
g.add_node('LOXL1', color=c2, size=s2)
g.add_node('CNBP', color=c2, size=s2)
g.add_node('C3', color=c3, size=s3)
g.add_node('CA2', color=c3, size=s3)
g.add_node('SEPP1', color=c3, size=s3)
g.add_node('TFF3', color=c4, size=s4)
g.add_node('PTMA', color=c4, size=s4)
g.add_edge('Lung', 'MDFI')
g.add_edge('Nasal', 'LOXL1')
g.add_edge('Gut', 'CNBP')
g.add_edge('Lung', 'C3')
g.add_edge('Nasal', 'C3')
g.add_edge('Lung', 'CA2')
g.add_edge('Gut', 'CA2')
g.add_edge('Nasal', 'SEPP1')
g.add_edge('Gut', 'SEPP1')
g.add_edge('Lung', 'TFF3')
g.add_edge('Nasal', 'TFF3')
g.add_edge('Gut', 'TFF3')
g.add_edge('Lung', 'PTMA')
g.add_edge('Nasal', 'PTMA')
g.add_edge('Gut', 'PTMA')
gv.d3(g)
Resulting output in a web browser:
I've moved the nodes manually a bit so that the layout resembles the provided image. Once everything looks as intended, a static image can be exported with a single button click on the right-hand side.
There are many other ways to produce static graph visualizations, e.g. programmatically with other Python libraries mentioned before, or interactively in standalone tools such as Gephi, Cytoscape or Tulip.
You could use OmniGraffle to make this figure.
Objects in OmniGraffle have so-called magnets to which you can attach lines, which can join two objects.
Once you have objects joined, you could group them and position them as desired.
As you drag an object, any attached lines will also change their position as needed. You can drag groupings of objects (e.g., conditions or other categories of objects), which does the same thing.
You can export an illustration to PDF or SVG format from OmniGraffle, which will let you do any further work in Adobe Illustrator or other vector illustration tools, or share the illustration with colleagues over the web, for instance.
This question is a bit difficult to fathom, but essentially I think the answer you are look for is called network theory. Its quite simple, but alas not fashionable. You'll find an introduction here and try and avoid 'directed graphs' because that gets complicated.
The alternative way is to use Google fusion tables, which incorporates network analysis, which is really easy to use and investigate. Its very interactive. You'll find more information here, https://support.google.com/fusiontables/answer/2566732?hl=en
Thats it and nothing more, undirected network theory is pretty simple. Its does not tell you very much (in my opinion), but it makes pretty diagrams.
Please note there is an analysis called 'Graph theory' and is not needed here. Whilst this has some similarity to 'network theory' it is distinct and the two shouldn't be confused.