Skip to content

Commit

Permalink
debugging lines
Browse files Browse the repository at this point in the history
  • Loading branch information
mbowcut2 committed Mar 20, 2024
1 parent ffc7a15 commit 2230495
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CRISPResso2/CRISPRessoCORE.py
Original file line number Diff line number Diff line change
Expand Up @@ -4309,6 +4309,7 @@ def count_alternate_alleles(sub_base_vectors, ref_name, ref_sequence, ref_total_
'annotate_wildtype_allele': args.annotate_wildtype_allele,
'custom_colors': custom_config["colors"],
}
CRISPRessoPlot.plot_alleles_table(**plot_9_input)
debug('Plotting allele distribution around cut for {0}'.format(ref_name))
plot(CRISPRessoPlot.plot_alleles_table, plot_9_input)
crispresso2_info['results']['refs'][ref_name]['plot_9_roots'].append(os.path.basename(fig_filename_root))
Expand Down
3 changes: 3 additions & 0 deletions CRISPResso2/CRISPRessoPlot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2659,6 +2659,7 @@ def prep_alleles_table(df_alleles, reference_seq, MAX_N_ROWS, MIN_FREQUENCY):

re_find_indels=re.compile("(-*-)")
idx_row=0
breakpoint()
for idx, row in df_alleles[df_alleles['%Reads']>=MIN_FREQUENCY][:MAX_N_ROWS].iterrows():
X.append(seq_to_numbers(idx.upper()))
annot.append(list(idx))
Expand Down Expand Up @@ -2758,6 +2759,7 @@ def plot_alleles_heatmap(reference_seq,fig_filename_root,X,annot,y_labels,insert
-custom_colors: dict of colors to plot (e.g. colors['A'] = (1,0,0,0.4) # red,blue,green,alpha )
"""
plot_nuc_len=len(reference_seq)
breakpoint()

# make a color map of fixed colors
alpha=0.4
Expand Down Expand Up @@ -3061,6 +3063,7 @@ def plot_alleles_table(reference_seq,df_alleles,fig_filename_root,MIN_FREQUENCY=
annotate_wildtype_allele: string to add to the end of the wildtype allele (e.g. ** or '')
"""
X, annot, y_labels, insertion_dict, per_element_annot_kws, is_reference = prep_alleles_table(df_alleles, reference_seq, MAX_N_ROWS, MIN_FREQUENCY)
breakpoint()
if annotate_wildtype_allele != '':
for ix, is_ref in enumerate(is_reference):
if is_ref:
Expand Down

0 comments on commit 2230495

Please sign in to comment.