comparison assess_alignment.py @ 8:852e76e7d22a draft

planemo upload for repository https://github.com/pvanheus/polio_report commit a99e10fec2fac5aae70974c977eb3b362a1a8429-dirty
author sanbi-uwc
date Wed, 14 Sep 2022 11:25:43 +0000
parents 9fd6dde72d2e
children acaaf49e2747
comparison
equal deleted inserted replaced
7:9fd6dde72d2e 8:852e76e7d22a
182 if min_mismatches is None or mismatches < min_mismatches: 182 if min_mismatches is None or mismatches < min_mismatches:
183 min_mismatches = mismatches 183 min_mismatches = mismatches
184 best_match_mismatch_list = mismatch_list 184 best_match_mismatch_list = mismatch_list
185 best_match_quality = quality 185 best_match_quality = quality
186 best_match_reference = dataset_name 186 best_match_reference = dataset_name
187 best_consensus = open(args.consensi[file_index]).read() 187 best_consensus = open(args.consensi[file_index]).read().replace('>Consensus', f'>{args.sample_name}')
188 percent_mismatches = round(min_mismatches / lengths[best_match_reference] * 100, 2) 188 percent_mismatches = round(min_mismatches / lengths[best_match_reference] * 100, 2)
189 189
190 info = { 190 info = {
191 "sample_name": args.sample_name, 191 "sample_name": args.sample_name,
192 "best_reference": best_match_reference, 192 "best_reference": best_match_reference,