From 5139dec7d2dba0a2c91af2bd7b371ec5cd6be64c Mon Sep 17 00:00:00 2001 From: akmorrow13 Date: Mon, 15 May 2023 16:28:49 +0000 Subject: [PATCH] fix tsne sparse input matrix error --- modisco/core.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modisco/core.py b/modisco/core.py index f633c84..af476ae 100644 --- a/modisco/core.py +++ b/modisco/core.py @@ -772,11 +772,11 @@ def compute_subclusters_and_embedding(self, pattern_comparison_settings, #convert to csr and sort by indices to (try to) get rid of efficiency warning distmat_sp = distmat_sp.tocsr() distmat_sp.sort_indices() - if (compute_embedding): twod_embedding = sklearn.manifold.TSNE( perplexity=perplexity, metric='precomputed', + init="random", verbose=3, random_state=1234).fit_transform(distmat_sp) self.twod_embedding = twod_embedding diff --git a/setup.py b/setup.py index c6b4f48..24273fc 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ description='TF MOtif Discovery from Importance SCOres', long_description="""Algorithm for discovering consolidated patterns from base-pair-level importance scores""", url='https://github.com/kundajelab/tfmodisco', - version='0.5.16.2', + version='0.5.16.3', packages=find_packages(), package_data={ '': ['cluster/phenograph/louvain/*convert*', 'cluster/phenograph/louvain/*community*', 'cluster/phenograph/louvain/*hierarchy*']