0
$\begingroup$

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

$\endgroup$
1
  • $\begingroup$ 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. $\endgroup$
    – Community Bot
    Jun 8, 2022 at 17:53

3 Answers 3

1
$\begingroup$

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: gravis example

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.

$\endgroup$
0
$\begingroup$

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.

$\endgroup$
0
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.