qa.plot¶
Prebuilt vizualization functions.
Module Contents¶
Functions¶
|
General plotting parameters for the Kulik Lab. |
|
Generates formatted heat maps. |
|
General set up to create an attractive parity plot. |
|
Creates a charge distribution plot with one residue on each axis. |
|
Creates a plot with the features on the x-axis and their importance on the y |
|
Plots the ESP for one single charge scheme as a barchart with error bars. |
|
Plots the ESP for all charge schemes as a barchart with error bars. |
|
Plots a bar plot of the RMSD for each analog with its standard error. |
|
Compares the charge fluctuations of two residues against time |
|
Creates a scatter plot for a distance and the corresponding ESP. |
|
Creates a KDE plot for a distance and the corresponding ESP. |
- qa.plot.format_plot() None¶
General plotting parameters for the Kulik Lab.
- qa.plot.heatmap(data: str, residues: List[str], delete: List[int] = [], out_file: str = 'heatmap', v=[-0.4, 0.4]) None¶
Generates formatted heat maps.
Uses the Kulik Lab figure formatting standards.
- Parameters:
data (str) – The name of the data file, which can be a data or a dat file.
delete (List[int]) – A list of the amino acids you would like removed indexed at zero.
out_file (str) – The name you would like the image saved as.
Examples
heatmap(data=”cacovar.dat”, protein=”mc6sa”, delete=[0,15,16,27,28,29], out_file=”matrix_geom.svg”)
- qa.plot.get_parity_plot(x: List[int], y: List[int]) None¶
General set up to create an attractive parity plot.
- Parameters:
x (list[int]) – List of x data points.
y (list[int]) – List of y data points.
- qa.plot.get_charge_distributions(charge_df, out_file, res_x, res_y, ext, axes_range) None¶
Creates a charge distribution plot with one residue on each axis.
- Parameters:
charge_pd (pd.DataFrame) – A dataframe with two columns, each corresponding to a residue.
See also
- qa.plot.plot_feature_importance(models: List[str], template: List[str], mutations: List[str], by_atom=False) None¶
Creates a plot with the features on the x-axis and their importance on the y
- Parameters:
models (List[str]) – A list of the different models that were trained and tested.
template (str) – The name of the template pdb for the protein of interest.
See also
- qa.plot.esp_separate_barchart() None¶
Plots the ESP for one single charge scheme as a barchart with error bars.
The ESP analysis outputs multicolumn dataframes for components. This allows us to compare metal-centered ESP contributions for components.
- qa.plot.esp_combined_barchart(schemes, width=6.5, height=4) None¶
Plots the ESP for all charge schemes as a barchart with error bars.
The ESP analysis outputs multicolumn dataframes for components. This allows us to compare metal-centered ESP contributions for components. This combined version also allows us to compare different charge schemes.
Paramers¶
- schemesList of strings
A list of the names of the files that you would like to plot.
Notes
After running qa.manage.collect_esp_components(first, last, step), csv files for each charge scheme can be generate in the replicate directory. Those files can then be moved to another directory and run this script.
- qa.plot.plot_rmsd(rmsd_list, labels)¶
Plots a bar plot of the RMSD for each analog with its standard error.
- Parameters:
rmsd_list (List[List[float]]) – List of lists where each list represents an analog, and each list contains RMSDs for each frame.
labels (List[str]) – List of labels for the x-axis, corresponding to the analog names.
See also
- qa.plot.time_coupling_plot(charge_df, out_file, res_x, res_y, ext) None¶
Compares the charge fluctuations of two residues against time
- Parameters:
charge_df (pd.DataFrame) – A dataframe with two columns, each corresponding to a residue.
See also
- qa.plot.esp_dist_plot(esp_choice, xlim=None, ylim=None, color_map='viridis', custom_colors=None)¶
Creates a scatter plot for a distance and the corresponding ESP.
- Parameters:
esp_choice (int) – Column index for the esp_data to be plotted.
xlim (tuple, optional) – Limits for x-axis in the form (xmin, xmax). If not provided, defaults to None.
ylim (tuple, optional) – Limits for y-axis in the form (ymin, ymax). If not provided, defaults to None.
color_map (str, optional) – Name of the Matplotlib color map. Defaults to ‘viridis’.
custom_colors (list of str, optional) – List of color hex codes for custom color map. If provided, will override color_map.
- qa.plot.esp_kde_dist_plot(esp_choice, xlim=None, ylim=None, color_map='viridis')¶
Creates a KDE plot for a distance and the corresponding ESP.
- Parameters:
esp_choice (int) – Column index for the esp_data to be plotted.
xlim (tuple, optional) – Limits for x-axis in the form (xmin, xmax). If not provided, defaults to None.
ylim (tuple, optional) – Limits for y-axis in the form (ymin, ymax). If not provided, defaults to None.
color_map (str, optional) – Name of the Matplotlib color map. Defaults to ‘viridis’.