From 30c2d1c519d0e73e133db5eb96f61a8243d7752f Mon Sep 17 00:00:00 2001 From: Sam Date: Thu, 28 Mar 2024 13:28:52 -0600 Subject: [PATCH] CRISPResso pro changes --- CRISPResso2/CRISPRessoCORE.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CRISPResso2/CRISPRessoCORE.py b/CRISPResso2/CRISPRessoCORE.py index 9e8b315b..21d98a64 100644 --- a/CRISPResso2/CRISPRessoCORE.py +++ b/CRISPResso2/CRISPRessoCORE.py @@ -3615,11 +3615,11 @@ def count_alternate_alleles(sub_base_vectors, ref_name, ref_sequence, ref_total_ mod_df_for_plot = modification_percentage_summary_df.copy() mod_df_for_plot.insert(0, 'Batch', ref_name) - plot_root = _jp('2a.'+ref_plot_name + 'Nucleotide_percentage_quilt') + plot_root = _jp('2a.'+ ref_plot_name + 'Nucleotide_percentage_quilt') plot_2a_input = { 'nuc_pct_df': nuc_df_for_plot, 'mod_pct_df': mod_df_for_plot, - 'fig_filename_root': f'{_jp('2a.json')}' if not args.use_matplotlib and pro_installed else plot_root, + 'fig_filename_root': f'{_jp(f'plot_{os.path.basename(plot_root)}.json')}' if not args.use_matplotlib and pro_installed else plot_root, 'save_also_png': save_png, 'sgRNA_intervals': sgRNA_intervals, 'sgRNA_names': sgRNA_names, @@ -3662,11 +3662,11 @@ def count_alternate_alleles(sub_base_vectors, ref_name, ref_sequence, ref_total_ new_include_idx = [] for x in include_idxs_list: new_include_idx += [x - new_sel_cols_start] - plot_root = _jp('2b.'+ref_plot_name + 'Nucleotide_percentage_quilt_around_' + sgRNA_label) + plot_root = _jp('2b.'+ ref_plot_name + 'Nucleotide_percentage_quilt_around_' + sgRNA_label) plot_2b_input = { 'nuc_pct_df': nuc_df_for_plot.iloc[:, sel_cols], 'mod_pct_df': mod_df_for_plot.iloc[:, sel_cols], - 'fig_filename_root': plot_root, + 'fig_filename_root': f'{_jp(f'plot_{os.path.basename(plot_root)}.json')}' if not args.use_matplotlib and pro_installed else plot_root, 'save_also_png': save_png, 'sgRNA_intervals': new_sgRNA_intervals, 'sgRNA_names': sgRNA_names, @@ -4035,7 +4035,7 @@ def count_alternate_alleles(sub_base_vectors, ref_name, ref_sequence, ref_total_ plot_4g_input = { 'nuc_pct_df': hdr_nucleotide_percentage_summary_df, 'mod_pct_df': hdr_modification_percentage_summary_df, - 'fig_filename_root': plot_root, + 'fig_filename_root': f'{_jp(f'plot_{os.path.basename(plot_root)}.json')}' if not args.use_matplotlib and pro_installed else plot_root, 'save_also_png': save_png, 'sgRNA_intervals': sgRNA_intervals, 'quantification_window_idxs': include_idxs_list, @@ -4632,7 +4632,7 @@ def get_scaffold_len(row, scaffold_start_loc, scaffold_seq): plot_11a_input = { 'nuc_pct_df': pe_nucleotide_percentage_summary_df, 'mod_pct_df': pe_modification_percentage_summary_df, - 'fig_filename_root': plot_root, + 'fig_filename_root': f'{_jp(f'plot_{os.path.basename(plot_root)}.json')}' if not args.use_matplotlib and pro_installed else plot_root, 'save_also_png': save_png, 'sgRNA_intervals': sgRNA_intervals, 'sgRNA_names': sgRNA_names, @@ -4691,7 +4691,7 @@ def get_scaffold_len(row, scaffold_start_loc, scaffold_seq): plot_11b_input = { 'nuc_pct_df': pe_nucleotide_percentage_summary_df.iloc[:, sel_cols], 'mod_pct_df': pe_modification_percentage_summary_df.iloc[:, sel_cols], - 'fig_filename_root': plot_root, + 'fig_filename_root': f'{_jp(f'plot_{os.path.basename(plot_root)}.json')}' if not args.use_matplotlib and pro_installed else plot_root, 'save_also_png': save_png, 'sgRNA_intervals': new_sgRNA_intervals, 'sgRNA_names': sgRNA_names,