Skip to content

Commit

Permalink
Bugfix: Instantiate clusterer properly
Browse files Browse the repository at this point in the history
Fix bug intoduced in #6554009, where the changes were not respected in
__main__.py
  • Loading branch information
jakobnissen committed Sep 12, 2023
1 parent 6554009 commit fc07d4c
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions vamb/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ def cluster(
cluster_options: ClusterOptions,
clusterspath: Path,
latent: np.ndarray,
lengths: np.ndarray,
contignames: Sequence[str], # of dtype object
vamb_options: VambOptions,
logfile: IO[str],
Expand Down Expand Up @@ -636,12 +637,13 @@ def cluster(

cluster_generator = vamb.cluster.ClusterGenerator(
latent,
lengths,
windowsize=cluster_options.window_size,
minsuccesses=cluster_options.min_successes,
destroy=True,
normalized=False,
cuda=vamb_options.cuda,
seed=vamb_options.seed,
rng_seed=vamb_options.seed,
)

renamed = (
Expand Down Expand Up @@ -832,6 +834,7 @@ def run(
cluster_options,
clusterspath,
latent,
comp_metadata.lengths,
comp_metadata.identifiers,
vamb_options,
logfile,
Expand Down Expand Up @@ -870,6 +873,7 @@ def run(
cluster_options,
clusterspath,
latent_z,
comp_metadata.lengths,
comp_metadata.identifiers,
vamb_options,
logfile,
Expand Down Expand Up @@ -1239,16 +1243,16 @@ def main():
dest="window_size",
metavar="",
type=int,
default=200,
help="size of window to count successes [200]",
default=300,
help="size of window to count successes [300]",
)
clusto.add_argument(
"-u",
dest="min_successes",
metavar="",
type=int,
default=20,
help="minimum success in window [20]",
default=15,
help="minimum success in window [15]",
)
clusto.add_argument(
"-i",
Expand Down

0 comments on commit fc07d4c

Please sign in to comment.