From 53515a79203ccc96c211de796d2662af927d8d6f Mon Sep 17 00:00:00 2001 From: costero-e Date: Wed, 30 Oct 2024 15:28:25 +0100 Subject: [PATCH] fixing get_biosamples_from_variants --- beacon/connections/mongo/g_variants.py | 2 +- beacon/connections/mongo/reindex.py | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/beacon/connections/mongo/g_variants.py b/beacon/connections/mongo/g_variants.py index 8e3b872..92ac82d 100644 --- a/beacon/connections/mongo/g_variants.py +++ b/beacon/connections/mongo/g_variants.py @@ -77,7 +77,7 @@ def get_biosamples_of_variant(self, entry_id: Optional[str], qparams: RequestPar try: finalids=[] for bioid in biosample_id: - finalids.append({"id": bioid}) + finalids.append({"id": bioid["biosampleId"]}) except Exception:# pragma: no cover finalids=[] query = {"$and": [{"$or": finalids}]} diff --git a/beacon/connections/mongo/reindex.py b/beacon/connections/mongo/reindex.py index 708e112..a40c041 100644 --- a/beacon/connections/mongo/reindex.py +++ b/beacon/connections/mongo/reindex.py @@ -33,14 +33,6 @@ client.beacon.validate_collection("synonyms") except Exception: db=client.beacon.create_collection(name="synonyms") -try: - client.beacon.validate_collection("caseLevelData") -except Exception: - db=client.beacon.create_collection(name="caseLevelData") -try: - client.beacon.validate_collection("targets") -except Exception: - db=client.beacon.create_collection(name="targets") try: client.beacon.drop_collection("counts") except Exception: