From 3b5dd79d3df8154347e688c7d7ea12ff72e0ac9a Mon Sep 17 00:00:00 2001 From: Peter Cock Date: Thu, 15 Dec 2022 14:57:59 +0000 Subject: [PATCH] Use Counter() not defaultdict(int) This appears to solve an apparent memory leak. --- thapbi_pict/sample_tally.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/thapbi_pict/sample_tally.py b/thapbi_pict/sample_tally.py index dee95b50b..ff1f03e3f 100644 --- a/thapbi_pict/sample_tally.py +++ b/thapbi_pict/sample_tally.py @@ -98,8 +98,8 @@ def main( assert marker totals = Counter() - counts = defaultdict(int) - sample_counts = defaultdict(int) + counts = Counter() + sample_counts = Counter() sample_cutadapt = {} # before any thresholds samples = set() sample_pool = {}