Skip to content

Commit

Permalink
Fix duplication of names in QC function (#134)
Browse files Browse the repository at this point in the history
* Fix duplication of names in QC function

* Correct behaviour of 'continue' at end of qc func

Co-authored-by: John Lees <lees.john6@gmail.com>
  • Loading branch information
nickjcroucher and johnlees committed Dec 17, 2020
1 parent a870338 commit 1d49132
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions PopPUNK/sketchlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,9 +613,6 @@ def sketchlibAssemblyQC(prefix, klist, qc_dict, strand_preserved, threads):
remove = False
seq_length[dataset] = hdf_in['sketches'][dataset].attrs['length']
seq_ambiguous[dataset] = hdf_in['sketches'][dataset].attrs['missing_bases']
# if no filtering to be undertaken, retain all sequences
if qc_dict['qc_filter'] == 'continue':
retained.append(dataset)

# calculate thresholds
# get mean length
Expand Down Expand Up @@ -685,6 +682,8 @@ def sketchlibAssemblyQC(prefix, klist, qc_dict, strand_preserved, threads):
prefix + '/' + os.path.basename(prefix) + \
'_qcreport.txt\n')
sys.exit(1)
elif qc_dict['qc_filter'] == 'continue':
retained = retained + failed

# calculate random matches if any sequences pass QC filters
if len(retained) == 0:
Expand Down

0 comments on commit 1d49132

Please sign in to comment.