From 842c3aafb44d2922982c413579b2230dd03032e7 Mon Sep 17 00:00:00 2001 From: dylanpilz Date: Thu, 14 Nov 2024 10:10:22 -0500 Subject: [PATCH] clean redundant error handling --- freyja/read_analysis_tools.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/freyja/read_analysis_tools.py b/freyja/read_analysis_tools.py index 3b0201d..09c586d 100644 --- a/freyja/read_analysis_tools.py +++ b/freyja/read_analysis_tools.py @@ -443,11 +443,10 @@ def process_covariants(input_bam, min_site, max_site, ref_fasta, gff_file, # Update coverage ranges if coverage_start is None or start < coverage_start: coverage_start = start - try: - if coverage_end is None or end > coverage_end: - coverage_end = end - except TypeError as e: - print(e) + + if coverage_end is None or end > coverage_end: + coverage_end = end + cigar = re.findall(r'(\d+)([A-Z]{1})', x.cigarstring) if 'I' in x.cigarstring: i = 0