Skip to content

Commit

Permalink
Fixup: Use markers in clustering
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobnissen committed Aug 23, 2023
1 parent 75a5e8f commit f8ae7a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions vamb/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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."""

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit f8ae7a6

Please sign in to comment.