From 7aec90fdae97fb768845670d6455cc3a724bafb4 Mon Sep 17 00:00:00 2001 From: Vitaliy Mysak Date: Thu, 30 Nov 2023 15:55:01 -0800 Subject: [PATCH] Small code style improvements for contig stitcher --- micall/core/contig_stitcher.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/micall/core/contig_stitcher.py b/micall/core/contig_stitcher.py index bd6b32eb4..36bfa0252 100644 --- a/micall/core/contig_stitcher.py +++ b/micall/core/contig_stitcher.py @@ -1,4 +1,4 @@ -from typing import Iterable, Optional, Tuple, List +from typing import Iterable, Optional, Tuple, List, Dict from collections import deque, defaultdict from dataclasses import dataclass from math import ceil @@ -530,7 +530,9 @@ def stitch_contigs(contigs: Iterable[GenotypedContig]) -> Iterable[AlignedContig def stitch_consensus(contigs: Iterable[GenotypedContig]) -> Iterable[GenotypedContig]: contigs = list(stitch_contigs(contigs)) - consensus_parts = defaultdict(list) # group_ref -> List[AlignedContig] + + GroupRef = str + consensus_parts: Dict[GroupRef, AlignedContig] = defaultdict(list) for contig in contigs: if isinstance(contig, AlignedContig):