From f8ae7a634ac8f4bc7e758fb6b6b3126bafbb20dc Mon Sep 17 00:00:00 2001 From: Jakob Nybo Nissen Date: Wed, 23 Aug 2023 10:51:56 +0200 Subject: [PATCH] Fixup: Use markers in clustering --- vamb/cluster.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vamb/cluster.py b/vamb/cluster.py index 55e74a3b..56298f9e 100644 --- a/vamb/cluster.py +++ b/vamb/cluster.py @@ -20,7 +20,7 @@ from math import ceil as _ceil from torch.functional import Tensor as _Tensor import vamb.vambtools as _vambtools -from vamb import markers as _markers +from vamb.parsemarkers import Markers from typing import Optional from collections.abc import Sequence, Iterable @@ -172,7 +172,7 @@ def __str__(self) -> str: """ def _check_params( - self, matrix: _np.ndarray, markers: _markers.Markers, maxsteps: int, windowsize: int, minsuccesses: int + self, matrix: _np.ndarray, markers: Markers, maxsteps: int, windowsize: int, minsuccesses: int ) -> None: """Checks matrix, and maxsteps.""" @@ -211,7 +211,7 @@ def _init_histogram_kept_mask(self, N: int) -> tuple[_Tensor, _Tensor]: def __init__( self, matrix: _np.ndarray, - markers: _markers.Markers, + markers: Markers, maxsteps: int = 25, windowsize: int = 200, minsuccesses: int = 20, @@ -472,7 +472,7 @@ def _find_threshold( # NB: These points here MUST be the original indices of the contigs, NOT # the re-ordered points which the clusterer operates on!! -def calc_marker_score(points: _Tensor, markers: _markers.Markers) -> float: +def calc_marker_score(points: _Tensor, markers: Markers) -> float: n_markers = markers.n_markers counts = _np.zeros(n_markers, dtype=_np.uint32) for point in points: