diff --git a/packages/libs/eda/src/lib/core/components/computations/plugins/abundance.tsx b/packages/libs/eda/src/lib/core/components/computations/plugins/abundance.tsx index 7fd36dfecb..e5ac58d28e 100644 --- a/packages/libs/eda/src/lib/core/components/computations/plugins/abundance.tsx +++ b/packages/libs/eda/src/lib/core/components/computations/plugins/abundance.tsx @@ -150,14 +150,20 @@ export function AbundanceConfiguration(props: ComputationConfigProps) { ); const collectionVarItems = useMemo(() => { - return collections.map((collectionVar) => ({ - value: { - variableId: collectionVar.id, - entityId: collectionVar.entityId, - }, - display: - collectionVar.entityDisplayName + ' > ' + collectionVar.displayName, - })); + return collections + .filter((collectionVar) => { + return collectionVar.normalizationMethod + ? collectionVar.normalizationMethod !== 'NULL' + : true; + }) + .map((collectionVar) => ({ + value: { + variableId: collectionVar.id, + entityId: collectionVar.entityId, + }, + display: + collectionVar.entityDisplayName + ' > ' + collectionVar.displayName, + })); }, [collections]); const selectedCollectionVar = useMemo(() => { diff --git a/packages/libs/eda/src/lib/core/components/computations/plugins/alphaDiv.tsx b/packages/libs/eda/src/lib/core/components/computations/plugins/alphaDiv.tsx index 87d4cf74a0..eac9b0c18d 100644 --- a/packages/libs/eda/src/lib/core/components/computations/plugins/alphaDiv.tsx +++ b/packages/libs/eda/src/lib/core/components/computations/plugins/alphaDiv.tsx @@ -133,14 +133,20 @@ export function AlphaDivConfiguration(props: ComputationConfigProps) { ); const collectionVarItems = useMemo(() => { - return collections.map((collectionVar) => ({ - value: { - variableId: collectionVar.id, - entityId: collectionVar.entityId, - }, - display: - collectionVar.entityDisplayName + ' > ' + collectionVar.displayName, - })); + return collections + .filter((collectionVar) => { + return collectionVar.normalizationMethod + ? collectionVar.normalizationMethod !== 'NULL' + : true; + }) + .map((collectionVar) => ({ + value: { + variableId: collectionVar.id, + entityId: collectionVar.entityId, + }, + display: + collectionVar.entityDisplayName + ' > ' + collectionVar.displayName, + })); }, [collections]); const selectedCollectionVar = useMemo(() => { diff --git a/packages/libs/eda/src/lib/core/components/computations/plugins/betadiv.tsx b/packages/libs/eda/src/lib/core/components/computations/plugins/betadiv.tsx index 09051bbd23..67022b1381 100644 --- a/packages/libs/eda/src/lib/core/components/computations/plugins/betadiv.tsx +++ b/packages/libs/eda/src/lib/core/components/computations/plugins/betadiv.tsx @@ -136,14 +136,20 @@ export function BetaDivConfiguration(props: ComputationConfigProps) { ); const collectionVarItems = useMemo(() => { - return collections.map((collectionVar) => ({ - value: { - variableId: collectionVar.id, - entityId: collectionVar.entityId, - }, - display: - collectionVar.entityDisplayName + ' > ' + collectionVar.displayName, - })); + return collections + .filter((collectionVar) => { + return collectionVar.normalizationMethod + ? collectionVar.normalizationMethod !== 'NULL' + : true; + }) + .map((collectionVar) => ({ + value: { + variableId: collectionVar.id, + entityId: collectionVar.entityId, + }, + display: + collectionVar.entityDisplayName + ' > ' + collectionVar.displayName, + })); }, [collections]); const selectedCollectionVar = useMemo(() => { diff --git a/packages/libs/eda/src/lib/core/components/computations/plugins/differentialabundance.tsx b/packages/libs/eda/src/lib/core/components/computations/plugins/differentialabundance.tsx index 43ca956c58..5bc1d7e7b5 100644 --- a/packages/libs/eda/src/lib/core/components/computations/plugins/differentialabundance.tsx +++ b/packages/libs/eda/src/lib/core/components/computations/plugins/differentialabundance.tsx @@ -175,14 +175,22 @@ export function DifferentialAbundanceConfiguration( ); const collectionVarItems = useMemo(() => { - return collections.map((collectionVar) => ({ - value: { - variableId: collectionVar.id, - entityId: collectionVar.entityId, - }, - display: - collectionVar.entityDisplayName + ' > ' + collectionVar.displayName, - })); + return collections + .filter((collectionVar) => { + return collectionVar.normalizationMethod + ? !collectionVar.isProportion && + collectionVar.normalizationMethod === 'NULL' && + !collectionVar.displayName?.includes('pathway') + : true; + }) + .map((collectionVar) => ({ + value: { + variableId: collectionVar.id, + entityId: collectionVar.entityId, + }, + display: + collectionVar.entityDisplayName + ' > ' + collectionVar.displayName, + })); }, [collections]); const selectedCollectionVar = useMemo(() => { diff --git a/packages/libs/eda/src/lib/core/types/study.ts b/packages/libs/eda/src/lib/core/types/study.ts index ea54f20561..fecdf8125c 100644 --- a/packages/libs/eda/src/lib/core/types/study.ts +++ b/packages/libs/eda/src/lib/core/types/study.ts @@ -220,6 +220,9 @@ export const CollectionVariableTreeNode = t.intersection([ units: t.string, entityId: t.string, entityDisplayName: t.string, + isCompositional: t.boolean, + isProportion: t.boolean, + normalizationMethod: t.string, }), ]);