From 832cc7c44a163ccb156c45e547d0cac90fe29593 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 8 Jun 2022 17:44:18 +0530 Subject: gn3: genodb: Read only the most recent genotype matrix. The genotype database format now supports versioning of matrices. So, we update genodb.py to return only the most recent genotype matrix. * gn3/genodb.py (GenotypeDatabase.matrix): Return only the most recent genotype matrix. --- gn3/genodb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gn3/genodb.py b/gn3/genodb.py index 62043d0..96bded6 100644 --- a/gn3/genodb.py +++ b/gn3/genodb.py @@ -17,7 +17,7 @@ class GenotypeDatabase: def get_metadata(self, hash, metadata): return self.txn.get(hash + b':' + metadata.encode()) def matrix(self): - hash = self.get(b'current') + hash = self.get(b'current')[0:self.hash_length] return Matrix(self, hash) class Matrix(): -- cgit v1.2.3