Skip to content

Commit

Permalink
Fix bug when pooled bam is input (#265)
Browse files Browse the repository at this point in the history
This change checks to see if a bam file was input, and if so it doesn't try to
remove any intermediate files because there aren't any.

Co-authored-by: Cole Lyman <cole@coles-mbp-2.lan>
  • Loading branch information
Colelyman and Cole Lyman committed Dec 22, 2022
1 parent b822612 commit b9851e9
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions CRISPResso2/CRISPRessoPooledCORE.py
Original file line number Diff line number Diff line change
Expand Up @@ -1491,14 +1491,15 @@ def default_sigpipe():
if not args.keep_intermediate:
info('Removing Intermediate files...')

if args.fastq_r2!='':
files_to_remove+=[processed_output_filename, flash_hist_filename, flash_histogram_filename,\
flash_not_combined_1_filename, flash_not_combined_2_filename]
if args.force_merge_pairs:
files_to_remove.append(new_merged_filename)
files_to_remove.append(old_flashed_filename)
else:
files_to_remove+=[processed_output_filename]
if not args.aligned_pooled_bam:
if args.fastq_r2!='':
files_to_remove+=[processed_output_filename, flash_hist_filename, flash_histogram_filename,\
flash_not_combined_1_filename, flash_not_combined_2_filename]
if args.force_merge_pairs:
files_to_remove.append(new_merged_filename)
files_to_remove.append(old_flashed_filename)
else:
files_to_remove+=[processed_output_filename]

if args.trim_sequences and args.fastq_r2!='':
files_to_remove+=[output_forward_paired_filename, output_reverse_paired_filename,\
Expand Down

0 comments on commit b9851e9

Please sign in to comment.