pylipid.api.LipidInteraction.plot_logo¶
- LipidInteraction.plot_logo(item, letter_map=None, color_scheme='chemistry', gap=2000, save_dir=None, fig_close=False, fig_format='pdf')[source]¶
Plot interactions using Logomaker.
Logomaker is a Python package for generating publication-quality sequence logos. This method adopts Logomaker to plot the interacting amino acids. The height of the amino acids illustrates the strength of the interaction. This plot can show the amino acids composition of lipid interactions and make the checking of chemical properties of lipid interaction easier.
color_scheme
specifies the colormaps to illustrate the chemical properties of amino acids. See here for a list of color scheme supported by Logomaker.letter_map
requires a python dictionary that maps the residue name to single letters (i.e. {“ALA”: “A”}). The 20 common amino acids are defined in this method. Other amino acids/residue names need to be defined using this parameter.The figures are saved with the file name of {item}_logo.{fig_format}. The formats supported by matplotlib.savefig() are allowed.
By default, the figures are saved in the directory of Figure_{lipid} under the root directory defined when the class
LipidInteraction
was initiated. It can be changed by providing to path tosave_dir
.The rest of the parameters are the same as
plot()
.- Parameters
item ({"Residence Time", "Duration", "Occupancy", "Lipid Count"}) – The interaction data to plot.
letter_map (dict or None, optional, default=None) – A python dictionary that maps the residue names to single letters.
color_scheme (str, optional, default="chemistry") – Logomaker color schemes. The default is ‘chemistry’.
save_dir (str, default=None) – The directory for saving the figures. By default, figures are saved in the directory of Figures_{lipid} under the root directory defined at the initialization of
LipidInteraction
.gap (int, default=200) – The gap in residue index to initiate a new figure.
fig_close (bool, default=False) – This parameter control whether to close the plotted figures using plt.close(). It can save memory if many figures are generated.
fig_format (str, default="pdf") – Figure format. Support formats included in matplotlib.
See also
pyipid.api.LipidInteraction.plot
Assisting function for plotting interaction data.
pylipid.plot.plot_residue_data_logo
Plot interactions using logomaker.Logo.