From d0725da89b14b7637f3e5df49bb74bfe4b748c59 Mon Sep 17 00:00:00 2001 From: Bryce Lorenz Kille Date: Thu, 25 Jun 2020 11:14:00 -0500 Subject: [PATCH] mash fix --- parsnp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parsnp b/parsnp index 54edf6d..5fbaaf5 100755 --- a/parsnp +++ b/parsnp @@ -1015,7 +1015,7 @@ SETTINGS: ref, "-l", all_genomes_fname], stderr=open(os.path.join(outputDir, "mash.err"), 'w')).decode('utf-8') - finalfiles = [line.split('\t')[0] for line in mash_out.split('\n')[1:] if line != ''] + finalfiles = [line.split('\t')[0] for line in mash_out.split('\n')[1:] if line != '' and len(line.split('\t')) > 1 and line.split('\t')[1].strip() != ''] elif use_ani: if randomly_selected_ref: subprocess.check_call([ @@ -1038,8 +1038,8 @@ SETTINGS: for line in results: # FastANI results file -> Query, Ref, ANI val, extra stuff,,, line = line.split('\t') - # if float(line[2]) >= min_ani_cutoff: - genome_to_genomes[line[0]].add(line[1]) + if float(line[2]) >= min_ani_cutoff: + genome_to_genomes[line[0]].add(line[1]) # for g in genome_to_genomes: # print(len(g))