Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 471 appconstraints #488

Merged
merged 6 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(() => {
Expand Down
3 changes: 3 additions & 0 deletions packages/libs/eda/src/lib/core/types/study.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}),
]);

Expand Down
Loading