<p>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 <a href="https://trenton3983.github.io/files/projects/2020-05-21_intro_to_network_analysis_in_python/2020-05-21_intro_to_network_analysis_in_python.html" rel="nofollow noreferrer">here</a> and try and avoid 'directed graphs' because that gets complicated.</p>
<p>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,
<a href="https://support.google.com/fusiontables/answer/2566732?hl=en" rel="nofollow noreferrer">https://support.google.com/fusiontables/answer/2566732?hl=en</a></p>
<p>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.</p>
<p>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.</p>

CC BY-SA 4.0
2022-06-09T02:04:44.007Z
2022-06-09T03:55:45.497Z
2022-06-09T03:55:45.497Z
M__
<p>You could use <a href="https://www.omnigroup.com/omnigraffle" rel="nofollow noreferrer">OmniGraffle</a> to make this figure.</p>
<p>Objects in OmniGraffle have so-called magnets to which you can attach lines, which can join two objects.</p>
<p>Once you have objects joined, you could group them and position them as desired.</p>
<p>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.</p>
<p>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.</p>

CC BY-SA 4.0
2022-06-09T01:59:04.423Z
2022-06-09T01:59:04.423Z
Alex Reynolds
<p>I'm the author of <a href="https://robert-haas.github.io/gravis-docs/" rel="nofollow noreferrer">gravis</a>, an open source package for interactive graph visualization in Python.</p>
<ul>
<li>It can visualize directed and undirected graphs (=having edges with or without arrows) as well as multigraphs (=having more than one edge between a pair of nodes).</li>
<li>It allows to control visual properties such as node sizes, colors, shapes or edge widths and color with data.</li>
<li>It recognizes graph objects from various network analysis packages such as NetworkX, igraph, graph-tool and others.</li>
<li>The output is based on web technologies (HTML/JS/CSS), so it can be viewed in a browser or Jupyter notebook. There is also support for exporting static images (JPG, PNG, SVG).</li>
<li>It comes with many examples on the documentation site.</li>
</ul>
<p>Here's a quick attempt to reproduce a part of the figure you've provided:</p>
<pre><code>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)
</code></pre>
<p>Resulting output in a web browser:
<a href="https://i.sstatic.net/PlQqj.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/PlQqj.png" alt="gravis example" /></a></p>
<p>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.</p>
<p>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.</p>

CC BY-SA 4.0
2022-06-10T18:29:59.357Z
2022-06-10T18:29:59.357Z
Robert Haas
<p>From 3 gene lists (lung, nasal, gut), how to make this gene overlap network plot?</p>
<p>This image is figure 4a from: <a href="https://www.nature.com/articles/s41591-020-01227-z" rel="nofollow noreferrer">https://www.nature.com/articles/s41591-020-01227-z</a></p>
<p><a href="https://i.sstatic.net/gRYmz.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/gRYmz.png" alt="gene overlap of 3 gene lists" /></a></p>

CC BY-SA 4.0
2022-06-08T17:53:16.803Z
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Community
<visualization>
How to make a network overlap of gene lists across 3 conditions like this image?
# How to make a network overlap of gene lists across 3 conditions like this image?

(Asked by: username_0 on 2022-06-08)

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>

[![gene overlap of 3 gene lists](https://i.sstatic.net/gRYmz.png)](https://i.sstatic.net/gRYmz.png)

**Tags:** visualization
> **Comments:**
> **username_1**: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.  

---

## 3 answers

### Answer by username_4 on 2022-06-10. Score: 1

I'm the author of gravis, an open source package for interactive graph visualization in Python.

It can visualize directed and undirected graphs (=having edges with or without arrows) as well as multigraphs (=having more than one edge between a pair of nodes).
It allows to control visual properties such as node sizes, colors, shapes or edge widths and color with data.
It recognizes graph objects from various network analysis packages such as NetworkX, igraph, graph-tool and others.
The output is based on web technologies (HTML/JS/CSS), so it can be viewed in a browser or Jupyter notebook. There is also support for exporting static images (JPG, PNG, SVG).
It comes with many examples on the documentation site.

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.


---

### Answer by username_2 on 2022-06-09. Score: 0

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](https://trenton3983.github.io/files/projects/2020-05-21_intro_to_network_analysis_in_python/2020-05-21_intro_to_network_analysis_in_python.html) 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.


---

### Answer by username_3 on 2022-06-09. Score: 0

You could use [OmniGraffle](https://www.omnigroup.com/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.


---

