From 17a3f0ede8ca111a5e8ce9bab6278eec71c7ba53 Mon Sep 17 00:00:00 2001 From: nickjcroucher Date: Thu, 16 Jul 2020 12:06:52 +0100 Subject: [PATCH] Remove redundant function --- PopPUNK/utils.py | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/PopPUNK/utils.py b/PopPUNK/utils.py index a734e889..997bd638 100644 --- a/PopPUNK/utils.py +++ b/PopPUNK/utils.py @@ -161,44 +161,6 @@ def iterDistRows(refSeqs, querySeqs, self=True): for ref in refSeqs: yield(ref, query) -def old_listDistInts(refSeqs, querySeqs, self=True): - """Gets the ref and query ID for each row of the distance matrix - - Returns an iterable with ref and query ID pairs by row. - - Args: - refSeqs (list) - List of reference sequence names. - querySeqs (list) - List of query sequence names. - self (bool) - Whether a self-comparison, used when constructing a database. - Requires refSeqs == querySeqs - Default is True - Returns: - ref, query (str, str) - Iterable of tuples with ref and query names for each distMat row. - """ - n = 0 - num_ref = len(refSeqs) - num_query = len(querySeqs) - if self: - comparisons = [(0,0)] * int((num_ref * (num_ref-1)) * 0.5) - if refSeqs != querySeqs: - raise RuntimeError('refSeqs must equal querySeqs for db building (self = true)') - for i in range(num_ref): - for j in range(i + 1, num_ref): - comparisons[n] = (j, i) - n = n + 1 - else: - comparisons = [(0,0)] * (len(refSeqs) * len(querySeqs)) - for i in range(num_query): - for j in range(num_ref): - comparisons[n] = (j, i) - n = n + 1 - - return comparisons - def listDistInts(refSeqs, querySeqs, self=True): """Gets the ref and query ID for each row of the distance matrix