hybkit.plot

Methods for plotting analyses of HybRecord and FoldRecord objects.

hybkit.plot.COLOR_DICT = {'Blue': '#0072B2', 'Bluish Green': '#009E73', 'Orange': '#E69F00', 'Reddish Purple': '#CC79A7', 'Sky Blue': '#56B4E9', 'Vermilion': '#D55E00', 'Yellow': '#F0E442'}

Default Colors for colored plots: Colors selected based on "Points of view: Color blindness" by Bang Wong, Nature Methods, 2011. Colors in RGB nomenclature (1-255): Black (0,0,0), Orange (230,159,0), Sky Blue (86,180,233), Bluish Green (0,158,115), Yellow (240,228,66), Blue (0,114,178), Vermilion (213,94,0), Reddish Purple (204,121,167)

hybkit.plot.COLOR_LIST = ['#0072B2', '#D55E00', '#009E73', '#CC79A7', '#E69F00', '#56B4E9', '#F0E442']

List of default colors for colored plots.

hybkit.plot.ENERGY_HIST_RC_PARAMS = {'axes.labelweight': 'bold', 'axes.titlepad': 15, 'axes.titlesize': 'large', 'axes.titleweight': 'bold', 'figure.dpi': 1200, 'figure.figsize': [6.4, 4.8]}

Default mpl rcParams for energy analysis histograms.

hybkit.plot.TYPE_PIE_SINGLE_RC_PARAMS = {'axes.labelweight': 'bold', 'axes.titlepad': 15, 'axes.titleweight': 'bold', 'figure.dpi': 1200, 'figure.figsize': [6.4, 4.8]}

Default mpl rcParams for type analysis pie charts.

hybkit.plot.TYPE_PIE_DUAL_RC_PARAMS = {'axes.labelweight': 'bold', 'axes.titlepad': 15, 'axes.titleweight': 'bold', 'figure.dpi': 1200, 'figure.figsize': (8, 4.8)}

Default mpl rcParams for type analysis pie charts.

hybkit.plot.TARGET_PIE_RC_PARAMS = {'axes.labelweight': 'bold', 'axes.titlepad': 15, 'axes.titleweight': 'bold', 'figure.dpi': 1200, 'figure.figsize': (9.6, 4.8)}

Default mpl rcParams for target analysis pie charts.

hybkit.plot.FOLD_MATCH_HIST_RC_PARAMS = {'axes.labelweight': 'bold', 'axes.titlepad': 15, 'axes.titlesize': 'large', 'axes.titleweight': 'bold', 'figure.dpi': 1200, 'figure.figsize': [6.4, 4.8]}

Default mpl rcParams for fold match analysis histograms.

hybkit.plot.FOLD_NT_COUNTS_HIST_RC_PARAMS = {'axes.labelweight': 'bold', 'axes.titlepad': 15, 'axes.titlesize': 'large', 'axes.titleweight': 'bold', 'figure.dpi': 1200, 'figure.figsize': [6.4, 4.8]}

Default mpl rcParams for fold nt counts analysis histograms.

hybkit.plot.PIE_DEFAULTS = {'COLORS': ['#0072B2', '#D55E00', '#009E73', '#CC79A7', '#E69F00', '#56B4E9', '#F0E442'], 'MIN_WEDGE_SIZE': 0.04, 'OTHER_THRESHOLD': 0.05, 'SETTINGS': {'autopct': '%1.1f%%', 'counterclock': False, 'shadow': False, 'startangle': 90}}

Default Pie Chart Plot Settings.

hybkit.plot.BAR_DEFAULTS = {'BAR_ALIGN': 'edge', 'BAR_EDGE_COLOR': None, 'BAR_WIDTH': 0.9}

Default Bar Chart Plot Settings.

hybkit.plot.BAR_INT_DEFAULTS = {'BAR_ALIGN': 'center', 'BAR_EDGE_COLOR': None, 'BAR_WIDTH': 0.9}

Default Bar Chart of Integer Plot Settings.

hybkit.plot.ENERGY_DEFAULTS = {'MIN_COUNT': 0, 'MIN_DENSITY': 0.0, 'XLABEL': 'Hybrid Gibbs Free Energy (kcal/mol)', 'YLABEL': 'Hybrid Count'}

Default Bar Chart Plot Settings for Energy Histograms.

hybkit.plot.energy_histogram(results: Dict[str, Any], plot_file_name: str, title: str, name: Optional[str] = None, rc_params: Dict[str, Any] = {'axes.labelweight': 'bold', 'axes.titlepad': 15, 'axes.titlesize': 'large', 'axes.titleweight': 'bold', 'figure.dpi': 1200, 'figure.figsize': [6.4, 4.8]}, bar_params: Dict[str, Any] = {'BAR_ALIGN': 'edge', 'BAR_EDGE_COLOR': None, 'BAR_WIDTH': 0.9}) None

Plot histogram of hybrid energies from an Analysis fold analysis.

Parameters
  • results (dict) -- Dictionary of energy counts from an Analysis fold analysis (Key: binned_energy_vals).

  • plot_file_name (str) -- Name of output file.

  • title (str) -- Title of plot.

  • name (str, optional) -- Name of analysis to be included in plot title.

  • rc_params (dict, optional) -- Dictionary of mpl rcParams. Defaults to ENERGY_HIST_RC_PARAMS.

  • bar_params (dict, optional) -- Dictionary of bar plot parameters. Defaults to BAR_DEFAULTS.

hybkit.plot.type_count(results: Counter, plot_file_name: str, title: str, name: Optional[str] = None, join_entries: bool = False, rc_params: Dict[str, Any] = {'axes.labelweight': 'bold', 'axes.titlepad': 15, 'axes.titleweight': 'bold', 'figure.dpi': 1200, 'figure.figsize': [6.4, 4.8]}) None

Plot pie chart of hybrid type counts from an Analysis type analysis.

Parameters
  • results (Counter) -- Counter Object of type counts from an Analysis type analysis.

  • plot_file_name (str) -- Name of output file.

  • title (str) -- Title of plot.

  • name (str, optional) -- Name of analysis to be included in plot title.

  • join_entries (bool, optional) -- If True, join two-tuple pairs into a single string for plot labels.

  • rc_params (dict, optional) -- Dictionary of mpl rcParams. Defaults to TYPE_PIE_RC_PARAMS.

hybkit.plot.type_count_dual(results: Counter, plot_file_name: str, title: str, name: Optional[str] = None, join_entries: bool = False, rc_params: Dict[str, Any] = {'axes.labelweight': 'bold', 'axes.titlepad': 15, 'axes.titleweight': 'bold', 'figure.dpi': 1200, 'figure.figsize': (8, 4.8)}) None

Plot pie chart of hybrid type counts from an Analysis type analysis.

Parameters
  • results (Counter) -- Counter Object of type counts from an Analysis type analysis.

  • plot_file_name (str) -- Name of output file.

  • title (str) -- Title of plot.

  • name (str, optional) -- Name of analysis to be included in plot title.

  • join_entries (bool, optional) -- If True, join two-tuple pairs into a single string for plot labels.

  • rc_params (dict, optional) -- Dictionary of mpl rcParams. Defaults to TYPE_PIE_RC_PARAMS.

hybkit.plot.target_count(*args, **kwargs) None

Plot pie chart of target counts from an Analysis type analysis.

Parameters
  • results (Counter) -- Counter Object of type counts from an Analysis type analysis.

  • plot_file_name (str) -- Name of output file.

  • title (str) -- Title of plot.

  • name (str, optional) -- Name of analysis to be included in plot title.

  • join_entries (bool, optional) -- If True, join two-tuple pairs into a single string for plot labels.

  • rc_params (dict, optional) -- Dictionary of mpl rcParams. Defaults to TARGET_PIE_RC_PARAMS.

hybkit.plot.fold_match_counts_histogram(results: Counter, plot_file_name: str, title: str, name: Optional[str] = None, is_prop: bool = False, rc_params: Dict[str, Any] = {'axes.labelweight': 'bold', 'axes.titlepad': 15, 'axes.titlesize': 'large', 'axes.titleweight': 'bold', 'figure.dpi': 1200, 'figure.figsize': [6.4, 4.8]}, bar_params: Dict[str, Any] = {'BAR_ALIGN': 'center', 'BAR_EDGE_COLOR': None, 'BAR_WIDTH': 0.9}) None

Plot histogram of predicted miRNA/target match count.

Parameters
  • results (Counter) -- Counter Object of match counts from an Analysis type analysis.

  • plot_file_name (str) -- Name of output file.

  • title (str) -- Title of plot.

  • is_prop (bool, optional) -- If True, y axis is proportion.

  • name (str, optional) -- Name of analysis to be included in plot title.

  • rc_params (dict, optional) -- Dictionary of mpl rcParams. Defaults to FOLD_MATCH_HIST_RC_PARAMS.

  • bar_params (dict, optional) -- Dictionary of bar plot parameters. Defaults to BAR_INT_DEFAULTS.

hybkit.plot.fold_mirna_nt_counts_histogram(*args, **kwargs) None

Plot histogram of predicted miRNA/target match count.

Parameters
  • results (Counter) -- Counter Object of match counts from an Analysis type analysis.

  • plot_file_name (str) -- Name of output file.

  • title (str) -- Title of plot.

  • is_prop (bool, optional) -- If True, y axis is proportion.

  • name (str, optional) -- Name of analysis to be included in plot title.

  • rc_params (dict, optional) -- Dictionary of mpl rcParams. Defaults to FOLD_NT_COUNTS_HIST_RC_PARAMS.

  • bar_params (dict, optional) -- Dictionary of bar plot parameters. Defaults to BAR_INT_DEFAULTS.