Skip to content

Commit

Permalink
Merge branch 'mckay/c2pro' into batch-d3-clean
Browse files Browse the repository at this point in the history
  • Loading branch information
Snicker7 committed Mar 21, 2024
2 parents 9ed0589 + 9eef05d commit 2de605f
Show file tree
Hide file tree
Showing 19 changed files with 169 additions and 65 deletions.
6 changes: 5 additions & 1 deletion CRISPResso2/CRISPRessoAggregateCORE.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
import traceback
from datetime import datetime
from CRISPResso2 import CRISPRessoShared
from CRISPResso2 import CRISPRessoPlot
try:
from CRISPRessoPro import plot as CRISPRessoPlot
except:
from CRISPResso2 import CRISPRessoPlot

from CRISPResso2.CRISPRessoReports import CRISPRessoReport
from CRISPResso2.CRISPRessoMultiProcessing import get_max_processes, run_plot

Expand Down
19 changes: 11 additions & 8 deletions CRISPResso2/CRISPRessoBatchCORE.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
import traceback
from datetime import datetime
from CRISPResso2 import CRISPRessoShared
from CRISPResso2 import CRISPRessoPlot
try:
from CRISPRessoPro import plot as CRISPRessoPlot
except:
from CRISPResso2 import CRISPRessoPlot
from CRISPResso2 import CRISPRessoMultiProcessing
from CRISPResso2.CRISPRessoReports import CRISPRessoReport

Expand Down Expand Up @@ -91,7 +94,7 @@ def main():
crispresso_options_for_batch = list(crispresso_options-options_to_ignore)

CRISPRessoShared.check_file(args.batch_settings)
config = CRISPRessoShared.check_custom_config(args)
custom_config = CRISPRessoShared.check_custom_config(args)

if args.zip_output and not args.place_report_in_output_folder:
warn('Invalid arguement combination: If zip_output is True then place_report_in_output_folder must also be True. Setting place_report_in_output_folder to True.')
Expand Down Expand Up @@ -610,7 +613,7 @@ def main():
'save_also_png': save_png,
'sgRNA_intervals': sub_sgRNA_intervals,
'quantification_window_idxs': include_idxs,
'custom_colors': config['colors'],
'custom_colors': custom_config['colors'],
}
debug('Plotting nucleotide percentage quilt for amplicon {0}, sgRNA {1}'.format(amplicon_name, sgRNA))
plot(
Expand All @@ -635,7 +638,7 @@ def main():
'save_also_png': save_png,
'sgRNA_intervals': sub_sgRNA_intervals,
'quantification_window_idxs': include_idxs,
'custom_colors': config['colors']
'custom_colors': custom_config['colors']
}
debug('Plotting nucleotide conversion map for amplicon {0}, sgRNA {1}'.format(amplicon_name, sgRNA))
plot(
Expand All @@ -662,7 +665,7 @@ def main():
'save_also_png': save_png,
'sgRNA_intervals': consensus_sgRNA_intervals,
'quantification_window_idxs': include_idxs,
'custom_colors': config['colors'],
'custom_colors': custom_config['colors'],
}
debug('Plotting nucleotide quilt for {0}'.format(amplicon_name))
plot(
Expand All @@ -686,7 +689,7 @@ def main():
'save_also_png': save_png,
'sgRNA_intervals': consensus_sgRNA_intervals,
'quantification_window_idxs': include_idxs,
'custom_colors': config['colors']
'custom_colors': custom_config['colors']
}
debug('Plotting nucleotide conversion map for {0}'.format(amplicon_name))
plot(
Expand All @@ -710,7 +713,7 @@ def main():
'mod_pct_df': modification_percentage_summary_df,
'fig_filename_root': f'{this_nuc_pct_quilt_plot_name}.json',
'save_also_png': save_png,
'custom_colors': config['colors'],
'custom_colors': custom_config['colors'],
}
debug('Plotting nucleotide quilt for {0}'.format(amplicon_name))
plot(
Expand All @@ -733,7 +736,7 @@ def main():
'conversion_nuc_from': args.conversion_nuc_from,
'conversion_nuc_to': args.conversion_nuc_to,
'save_also_png': save_png,
'custom_colors': config['colors']
'custom_colors': custom_config['colors']
}
debug('Plotting BE nucleotide conversion map for {0}'.format(amplicon_name))
plot(
Expand Down
Loading

0 comments on commit 2de605f

Please sign in to comment.