From 3756257c9d4f0146ab7cc1c32f7efde26bf4269b Mon Sep 17 00:00:00 2001 From: vhu43 <67619615+vhu43@users.noreply.github.com> Date: Mon, 3 Jul 2023 16:30:56 -0700 Subject: [PATCH] Update SequenceAnalyzer.py Set distance to hamming. --- rules/utils/SequenceAnalyzer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rules/utils/SequenceAnalyzer.py b/rules/utils/SequenceAnalyzer.py index 6661896..9839f31 100644 --- a/rules/utils/SequenceAnalyzer.py +++ b/rules/utils/SequenceAnalyzer.py @@ -602,7 +602,7 @@ def dimension_reduction(self, NTorAA, idx=None, onehot=True, encoding=None, dime matrix = matrix[:, different_values] # initializing the pacmap instance - embedding = pm.PaCMAP(n_components=dimensions, MN_ratio=0.5, FP_ratio=2.0) + embedding = pm.PaCMAP(n_components=dimensions, MN_ratio=0.5, FP_ratio=2.0, distance="hamming") # fit the data to provided number of dimensions then make into a dataframe with # of columns = dimensions reduced = embedding.fit_transform(matrix, init="pca") @@ -729,4 +729,4 @@ def genotype_modify(self, substitutions, deletions): integer[posi:posi+number] = self.encoder_dict['-'] return integer - \ No newline at end of file +