From dedfe5d27b1be32e06d9691f0e6a977bbe6348b6 Mon Sep 17 00:00:00 2001 From: Kayla Meyer <129152803+meyerkm@users.noreply.github.com> Date: Tue, 14 May 2024 10:47:28 +0200 Subject: [PATCH] cast sample names to str (#85) --- deeprvat/data/dense_gt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deeprvat/data/dense_gt.py b/deeprvat/data/dense_gt.py index 12247518..42ce7831 100644 --- a/deeprvat/data/dense_gt.py +++ b/deeprvat/data/dense_gt.py @@ -362,7 +362,7 @@ def setup_phenotypes( # account for the fact that genotypes.h5 and phenotype_df can have different # orders of their samples self.index_map_geno, _ = get_matched_sample_indices( - samples_gt.astype(int), self.samples.astype(int) + samples_gt.astype(str), self.samples.astype(str) ) # get_matched_sample_indices is a much, much faster implementation of the code below # self.index_map_geno = [np.where(samples_gt.astype(int) == i) for i in self.samples.astype(int)]