Skip to content

Commit

Permalink
Fix bug in mode to write fastq out
Browse files Browse the repository at this point in the history
  • Loading branch information
kclem committed Sep 25, 2020
1 parent 388e8a9 commit faac4e1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions CRISPResso2/CRISPRessoCORE.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,12 +640,10 @@ def process_fastq_write_out(fastq_input,fastq_output,variantCache,ref_names,refs
N_TOT_READS+=1

#if the sequence has been seen and can't be aligned, skip it
if (fastq_seq in not_aln):
if fastq_seq in not_aln:
N_CACHED_NOTALN += 1
fastq_out_handle.write(fastq_id+fastq_seq+"\n"+fastq_plus+not_aln[fastq_seq]+"\n"+fastq_qual) #not_aln[fastq_seq] is alignment: NA
continue
#if the sequence is already associated with a variant in the variant cache, pull it out
if (fastq_seq in variantCache):
elif fastq_seq in variantCache: #if the sequence is already associated with a variant in the variant cache, pull it out
N_CACHED_ALN+=1
variantCache[fastq_seq]['count'] += 1
fastq_out_handle.write(fastq_id+fastq_seq+"\n"+fastq_plus+variantCache[fastq_seq]['crispresso2_annotation']+"\n"+fastq_qual)
Expand Down

0 comments on commit faac4e1

Please sign in to comment.