From 04c22910b5ef89f53daec74ac74c1a44e677fcac Mon Sep 17 00:00:00 2001 From: Josemi Date: Wed, 11 Dec 2024 16:19:05 +0100 Subject: [PATCH 1/2] clients: Minor code style fixes in opencga-client when creating the session #TASK-7272 --- src/core/clients/opencga/opencga-client.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/clients/opencga/opencga-client.js b/src/core/clients/opencga/opencga-client.js index 7e53f9244..466029e75 100644 --- a/src/core/clients/opencga/opencga-client.js +++ b/src/core/clients/opencga/opencga-client.js @@ -418,11 +418,13 @@ export class OpenCGAClient { // Fetch all the cohort console.log("Fetching cohorts"); const cohortsResponse = await _this.cohorts() - .search({study: study.fqn, exclude: "samples", limit: 100}); + .search({ + study: study.fqn, + exclude: "samples", + limit: 100, + }); study.cohorts = cohortsResponse.responses[0].results .filter(cohort => !cohort.attributes?.IVA?.ignore); - // FIXME line above should check cohort.internal instead - // .filter(cohort => cohort.internal.index?.status === "READY"); // Keep track of the studies to fetch Disease Panels studies.push(study.fqn); From ca46db0090eca5be010713cd3cb60a09f0522f60 Mon Sep 17 00:00:00 2001 From: Josemi Date: Wed, 11 Dec 2024 16:19:59 +0100 Subject: [PATCH 2/2] clients: Filter study cohorts by internal status ready, calculating, or invalid #TASK-7272 --- src/core/clients/opencga/opencga-client.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/clients/opencga/opencga-client.js b/src/core/clients/opencga/opencga-client.js index 466029e75..14952d2fd 100644 --- a/src/core/clients/opencga/opencga-client.js +++ b/src/core/clients/opencga/opencga-client.js @@ -420,6 +420,7 @@ export class OpenCGAClient { const cohortsResponse = await _this.cohorts() .search({ study: study.fqn, + internalStatus: "READY,CALCULATING,INVALID", exclude: "samples", limit: 100, });