hybkit.plot

Methods for plotting analyses of HybRecord and FoldRecord objects.

hybkit.plot.type_count(type_counter, plot_file_name, name=None, title='Hybrid Types', other_threshhold=0.1, min_wedge_size=0.04, plot_file_type='png', dpi=1200, rc_params={'axes.labelweight': 'bold', 'axes.titleweight': 'bold'}, plot_settings={'autopct': '%1.1f%%', 'counterclock': False, 'shadow': False, 'startangle': 90})

Plot the counts of types resulting from the TypeAnalysis.

Parameters
  • type_counter (Counter) – Counter containing type information from TypeAnalysis.

  • plot_file_name (str) – File name for output plots.

  • name (str, optional) – name to prepend to title.

  • title (str, optional) – Title / header for plot.

  • other_threshhold (float, optional) – Total fraction at which to begin the “other” wedge. Setting to 0.0 disables the “other” wedge based on a threshhold.

  • min_wedge_size (float, optional) – Minimum wedge fraction at which to add to the “other” wedge. Setting to 0.0 disables the “other” wedge based on minimum wedge size.

  • plot_file_type (str, optional) – File type for saving of plots. Options: {‘png’, ‘ps’, ‘pdf’, ‘svg’}

  • dpi (int, optional) – DPI for saving of plots.

  • rc_params (dict, optional) – Dict of keys and values of settings to pass to the matplotlib.rcParams.update() method.

  • plot_settings (dict, optional) – Dict of keys and values of settings to pass to the matplotlib.plot() function

hybkit.plot.mirna(analysis, plot_file_name, title='Hybrid Types', other_threshhold=0.1, min_wedge_size=0.04, plot_file_type='png', dpi=1200, rc_params={'axes.labelweight': 'bold', 'axes.titleweight': 'bold'}, plot_settings={'autopct': '%1.1f%%', 'counterclock': False, 'shadow': False, 'startangle': 90})

Plot the results of the MirnaAnalysis.

Parameters
  • analysis (Analysis) – Analysis that includes attributes of MirnaAnalysis.

  • plot_file_name (str) – File name for output plot.

  • title (str, optional) – Title / header for plot.

  • other_threshhold (float, optional) – Total fraction at which to begin the “other” wedge. Setting to 0.0 disables the “other” wedge based on a threshhold.

  • min_wedge_size (float, optional) – Minimum wedge fraction at which to add to the “other” wedge. Setting to 0.0 disables the “other” wedge based on minimum wedge size.

  • plot_file_type (str, optional) – File type for saving of plots. Options: {‘png’, ‘ps’, ‘pdf’, ‘svg’}

  • dpi (int, optional) – DPI for saving of plots.

  • rc_params (dict, optional) – Dict of keys and values of settings to pass to the matplotlib.rcParams.update() method.

  • plot_settings (dict, optional) – Dict of keys and values of settings to pass to the matplotlib.plot() function.

hybkit.plot.target(mirna_counts, plot_file_name, name=None, title='Targets', other_threshhold=0.1, min_wedge_size=0.04, plot_file_type='png', dpi=1200, rc_params={'axes.labelweight': 'bold', 'axes.titleweight': 'bold'}, plot_settings={'autopct': '%1.1f%%', 'counterclock': False, 'shadow': False, 'startangle': 90, 'textprops': {'size': 'small'}})

Plot the targets of a single mirna from the MirnaAnalysis.

Parameters
  • mirna_counts (Counter) – Counter of targets of a mirna produced by TargetAnalysis.

  • plot_file_name (str) – File name for output plot.

  • name (str, optional) – Name of analysis

  • title (str, optional) – Title / header for plot.

  • other_threshhold (float, optional) – Total fraction at which to begin the “other” wedge. Setting to 0.0 disables the “other” wedge based on a threshhold.

  • min_wedge_size (float, optional) – Minimum wedge fraction at which to add to the “other” wedge. Setting to 0.0 disables the “other” wedge based on minimum wedge size.

  • plot_file_type (str, optional) – File type for saving of plots. Options: {‘png’, ‘ps’, ‘pdf’, ‘svg’}

  • dpi (int, optional) – DPI for saving of plots.

  • rc_params (dict, optional) – Dict of keys and values of settings to pass to the matplotlib.rcParams.update() method.

  • plot_settings (dict, optional) – Dict of keys and values of settings to pass to the matplotlib.plot() function.

hybkit.plot.target_type(target_type_count, plot_file_name, name=None, title='Target Types', other_threshhold=0.1, min_wedge_size=0.04, plot_file_type='png', dpi=1200, rc_params={'axes.labelweight': 'bold', 'axes.titleweight': 'bold'}, plot_settings={'autopct': '%1.1f%%', 'counterclock': False, 'shadow': False, 'startangle': 90, 'textprops': {'size': 'small'}})

Plot the targets types of a single mirna from the TargetAnalysis.

Parameters
  • target_type_count (Counter) – Counter with types of targets for miRNAs from TargetAnalysis.

  • plot_file_name (str) – File name for output plot.

  • name (str) – Name of analysis to plot for title.

  • title (str, optional) – Title / header for plot (replaces default title).

  • other_threshhold (float, optional) – Total fraction at which to begin the “other” wedge. Setting to 0.0 disables the “other” wedge based on a threshhold.

  • min_wedge_size (float, optional) – Minimum wedge fraction at which to add to the “other” wedge. Setting to 0.0 disables the “other” wedge based on minimum wedge size.

  • plot_file_type (str, optional) – File type for saving of plots. Options: {‘png’, ‘ps’, ‘pdf’, ‘svg’}

  • dpi (int, optional) – DPI for saving of plots.

  • rc_params (dict, optional) – Dict of keys and values of settings to pass to the matplotlib.rcParams.update() method.

  • plot_settings (dict, optional) – Dict of keys and values of settings to pass to the matplotlib.plot() function.

hybkit.plot.fold(analysis, plot_file_name, name=None, title='Bound miRNA by Position', data_format='-', min_fraction_size=0.01, plot_file_type='png', dpi=1200, rc_params={'axes.labelsize': 'large', 'axes.labelweight': 'bold', 'axes.titlesize': 'x-large', 'axes.titleweight': 'bold', 'xtick.labelsize': 'large', 'ytick.labelsize': 'large'})

Plot the bound percentage of mirna by base from the FoldAnalysis.

Parameters
  • analysis (FoldAnalysis) – Analysis that includes attributes of FoldAnalysis.

  • plot_file_name (str) – File name for output plot.

  • name (str, optional) – name to prepend to title.

  • title (str, optional) – Title / header for plot (replaces default title).

  • data_format (str, optional) – matplotlib line/data format.

  • min_fraction_size (float, optional) – Minimum fraction to include at tail end of plot. Setting to 0 includes all bases evaluated.

  • plot_file_type (str, optional) – File type for saving of plots. Options: {‘png’, ‘ps’, ‘pdf’, ‘svg’}

  • dpi (int, optional) – DPI for saving of plots.

  • rc_params (dict, optional) – Dict of keys and values of settings to pass to the matplotlib.rcParams.update() method.