mdciao.flare

Produce flare-plots, where the residues are drawn on a circle and connected with lines of varying opacity.

It is inspired by the impressive plots produced by FlarePlots, for which you’ll find a live-demo here.

Credit should go to the authors for creating these tools and the beautiful (and useful!) plots. These tools offer many more functionalities and have become standard in many applications and databases.

However, to achieve better compatibility with the rest of mdciao and to allow other types of customization, this clean-room implementation in Python was written from scratch. The only special dependency is for the Bezier curves, which is provided by the python module Bezier.

Note

Flareplots are a type of Chord-diagrams, for which many libraries exist. If you think there’s a better way of doing what these methods are trying to do, please do contact me about it!

freqs2flare

Plot contact frequencies as flare plots.

circle_plot_residues

Circular background that serves as background for flare-plots.

freqs2chord

Coarse-grain the per-residue frequencies into a per-fragment chord-diagram.

add_bezier_curves

Generate and plot bezier curves using bezier.Curves as a base class

add_fragment_labels

Add fragment labels to a flareplot