Skip to content

Commit

Permalink
Plotting bug fixes
Browse files Browse the repository at this point in the history
Display and plotting fixes for batch report labels, and general plots, as well as a matplotlib deprecation fix
  • Loading branch information
kclem committed Aug 20, 2021
1 parent 3f11475 commit 8e8a65c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions CRISPResso2/CRISPRessoBatchCORE.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,10 @@ def main():
window_nuc_conv_plot_names = []
nuc_conv_plot_names = []

crispresso2_info['summary_plot_titles'] = {}
crispresso2_info['summary_plot_labels'] = {}
crispresso2_info['summary_plot_datas'] = {}

#report for amplicons that appear multiple times
for amplicon_index, amplicon_seq in enumerate(all_amplicons):
#only perform comparison if amplicon seen in more than one sample
Expand Down Expand Up @@ -487,9 +491,6 @@ def main():
crispresso2_info['modification_frequency_summary_filename'] = os.path.basename(modification_frequency_summary_filename)
crispresso2_info['modification_percentage_summary_filename'] = os.path.basename(modification_percentage_summary_filename)

crispresso2_info['summary_plot_titles'] = {}
crispresso2_info['summary_plot_labels'] = {}
crispresso2_info['summary_plot_datas'] = {}

#if guides are all the same, merge substitutions and perform base editor comparison at guide quantification window
if guides_all_same and consensus_guides != []:
Expand Down
1 change: 1 addition & 0 deletions CRISPResso2/CRISPRessoPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1478,6 +1478,7 @@ def plot_global_frameshift_analysis(
(0.99607843, 0.90980392, 0.78431373, 0.8),
],
autopct='%1.1f%%',
normalize=False,
)

ax.set_axis_off()
Expand Down
2 changes: 1 addition & 1 deletion CRISPResso2/CRISPRessoReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def add_fig_if_exists(fig_name, fig_root, fig_title, fig_caption, fig_data,
global_fig_names= []
for fig in ['1a', '1b', '1c', '1d', '5a', '6a', '8a', '11c']:
fig_name = 'plot_'+ fig
if fig_name + '_root' in run_data:
if fig_name + '_root' in run_data['results']['general_plots']:
add_fig_if_exists(fig_name, run_data['results']['general_plots'][fig_name + '_root'], 'Figure ' + fig, run_data['results']['general_plots'][fig_name + '_caption'], run_data['results']['general_plots'][fig_name+'_data'],
global_fig_names, fig_locs, fig_titles, fig_captions, fig_datas)

Expand Down

0 comments on commit 8e8a65c

Please sign in to comment.