moca.plotter package

Submodules

moca.plotter.plotter module

Generate conservation plots

moca.plotter.plotter.create_annnotation_plot(matplot_dict, json_annotation)[source]
moca.plotter.plotter.create_bar_plot(logo_plot, X_right, height_px, total_sequences, all_meme_occurrences, motif_number, motif_evalue)[source]
moca.plotter.plotter.create_enrichment_plot(matplot_dict, motif_number, centrimo_txt, centrimo_stats)[source]
moca.plotter.plotter.create_logo_plot(matplot_dict, meme_dir, logo_path, motif_length)[source]

Create stem plot for phylop/scores scoresi

Parameters:matplot_dict (dict like) –
A dict like object with the following fields:
{‘figure’: plt.figure, ‘gridspec’: plt.gridspec, ‘shareX’: plt.axes}

where ‘gridspec’ represents the grid specification and shareX represents the axis to share X axis with.

moca.plotter.plotter.create_ols_legend_plot(matplot_dict, motif_freq, sample_scores, control_scores, flank_length, legend_title)[source]
moca.plotter.plotter.create_plot(meme_file, plot_title, output_dir=None, centrimo_dir=None, motif_number=1, flank_length=5, sample_score_files=[], control_score_files=[], reg_plot_titles=[], annotate=None)[source]

Create plot :param meme_file: Path to meme.txt :type meme_file: string :param peak_file: Path to summit file :type peak_file: string :param centrimo_dir: Path to centrimo’s output directory :type centrimo_dir: string :param motif_number: 1-based number of motif in the motif file :type motif_number: int :param sample_score_files: Path to conservation scores files for sample :type sample_score_files: list :param control_score_files: Path to conservation score files for control :type control_score_files: list :param legend_titles: List of legend titles :type legend_titles: list

moca.plotter.plotter.create_scatter_plot(matplot_dict, motif_freq, sample_scores, control_scores, flank_length, num_occurrences, y_label)[source]
moca.plotter.plotter.create_stemplot(matplot_dict, X_values, Y_values, motif_length, legend_title, flank_length=0)[source]

Create stem plot for phylop/scores scoresi

Parameters:
  • matplot_dict (dict like) –
    A dict like object with the following fields:
    {‘figure’: plt.figure, ‘gridspec’: plt.gridspec, ‘shareX’: plt.axes}

    where ‘gridspec’ represents the grid specification and shareX represents the axis to share X axis with.

  • figure (plt.figure) – matplotlib figure
  • X_values (np.array) – Array of X values
  • Y_values (np.array) – Array of Y-values
  • motif_length (int) – Motif length(redundant)
  • flank_length (int) – Number of flanking sites
moca.plotter.plotter.init_figure(meme_dir=None, X_values=None, motif=1, subplot_ncols=None, annotate=False)[source]

Initialize plot based on logo size

moca.plotter.plotter.save_figure(fig, ax, name, form)[source]

Save figure to file

moca.plotter.plotter.setp_lines(stemlines, markerline, baseline)[source]

Set up format for stem plots

moca.plotter.plotter.setup_matplotlib()[source]

Setup matplotlib

Module contents