From 281a3ee615b1aa2f738ff8de5df49412f1fcf2cd Mon Sep 17 00:00:00 2001 From: asizemore Date: Fri, 2 Feb 2024 06:43:16 -0500 Subject: [PATCH 1/3] allow wgcna collections in correlation metadata app --- .../eda/src/lib/core/components/computations/Utils.ts | 11 ++++++----- .../computations/plugins/correlationAssayMetadata.tsx | 1 + 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/libs/eda/src/lib/core/components/computations/Utils.ts b/packages/libs/eda/src/lib/core/components/computations/Utils.ts index 42ac1c45a0..5d27c0be55 100644 --- a/packages/libs/eda/src/lib/core/components/computations/Utils.ts +++ b/packages/libs/eda/src/lib/core/components/computations/Utils.ts @@ -75,11 +75,12 @@ export function isNotAbsoluteAbundanceVariableCollection( // 1. normalizationMethod = NULL // 2. isCompositional = true // 3. isProportion = false - return variableCollection.normalizationMethod - ? variableCollection.normalizationMethod !== 'NULL' || - !variableCollection.isCompositional || - !!variableCollection.isProportion - : true; + // return variableCollection.normalizationMethod + // ? variableCollection.normalizationMethod !== 'NULL' || + // !variableCollection.isCompositional || + // !!variableCollection.isProportion + // : true; + return true; // DIY may not have these annotations, but we still want those datasets to pass. } diff --git a/packages/libs/eda/src/lib/core/components/computations/plugins/correlationAssayMetadata.tsx b/packages/libs/eda/src/lib/core/components/computations/plugins/correlationAssayMetadata.tsx index 9c67a18976..f7acf31ef8 100644 --- a/packages/libs/eda/src/lib/core/components/computations/plugins/correlationAssayMetadata.tsx +++ b/packages/libs/eda/src/lib/core/components/computations/plugins/correlationAssayMetadata.tsx @@ -261,6 +261,7 @@ const ASSAY_ENTITIES = [ 'EUPATH_0000809', 'EUPATH_0000813', 'EUPATH_0000812', + 'OBI_0000626', // should just find whatever entity has collections!!! ]; // The correlation assay x metadata app is only available for studies From 860e27599a342c976c84f48f7ca859158a0121ad Mon Sep 17 00:00:00 2001 From: asizemore Date: Fri, 9 Feb 2024 06:24:36 -0500 Subject: [PATCH 2/3] remove hard coded assay entities --- .../plugins/correlationAssayMetadata.tsx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/packages/libs/eda/src/lib/core/components/computations/plugins/correlationAssayMetadata.tsx b/packages/libs/eda/src/lib/core/components/computations/plugins/correlationAssayMetadata.tsx index f7acf31ef8..cf4502c7d8 100644 --- a/packages/libs/eda/src/lib/core/components/computations/plugins/correlationAssayMetadata.tsx +++ b/packages/libs/eda/src/lib/core/components/computations/plugins/correlationAssayMetadata.tsx @@ -256,14 +256,6 @@ export function CorrelationAssayMetadataConfiguration( ); } -const ASSAY_ENTITIES = [ - 'OBI_0002623', - 'EUPATH_0000809', - 'EUPATH_0000813', - 'EUPATH_0000812', - 'OBI_0000626', // should just find whatever entity has collections!!! -]; - // The correlation assay x metadata app is only available for studies // with appropriate metadata. Specifically, the study // must have at least one continuous metadata variable that is on a one-to-one path @@ -293,9 +285,10 @@ function isEnabledInPicker({ // Then we're in a curated study. So we can expect to find an entity with an id in ASSAY_ENTITIES, // which we can use to limit our metadata search to only appropriate entities. - // Step 1. Find the first assay node. Doesn't need to be any assay in particular just any mbio assay will do - const firstAssayEntityIndex = entities.findIndex((entity) => - ASSAY_ENTITIES.includes(entity.id) + // Step 1. Find the first assay node. Right now Assays are the only entities with collections, + // so we can just grab the first entity we see that has a collection. + const firstAssayEntityIndex = entities.findIndex( + (entity) => !!entity.collections?.length ); if (firstAssayEntityIndex === -1) return false; From cffc69a91489ac2b4bfa20e3995f44bd4d340e40 Mon Sep 17 00:00:00 2001 From: asizemore Date: Fri, 9 Feb 2024 11:19:54 -0500 Subject: [PATCH 3/3] remove workaround for wgcna data --- .../eda/src/lib/core/components/computations/Utils.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/libs/eda/src/lib/core/components/computations/Utils.ts b/packages/libs/eda/src/lib/core/components/computations/Utils.ts index 5d27c0be55..42ac1c45a0 100644 --- a/packages/libs/eda/src/lib/core/components/computations/Utils.ts +++ b/packages/libs/eda/src/lib/core/components/computations/Utils.ts @@ -75,12 +75,11 @@ export function isNotAbsoluteAbundanceVariableCollection( // 1. normalizationMethod = NULL // 2. isCompositional = true // 3. isProportion = false - // return variableCollection.normalizationMethod - // ? variableCollection.normalizationMethod !== 'NULL' || - // !variableCollection.isCompositional || - // !!variableCollection.isProportion - // : true; - return true; + return variableCollection.normalizationMethod + ? variableCollection.normalizationMethod !== 'NULL' || + !variableCollection.isCompositional || + !!variableCollection.isProportion + : true; // DIY may not have these annotations, but we still want those datasets to pass. }