Skip to content

Commit

Permalink
Merge branch 'main' into 426-donut-marker-config-panel
Browse files Browse the repository at this point in the history
  • Loading branch information
moontrip committed Sep 11, 2023
2 parents 7e2b51a + e267f16 commit 2610930
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 34 deletions.
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const plugins: Record<string, ComputationPlugin> = {
abundance,
alphadiv,
betadiv,
differentialabundance,
// differentialabundance,
countsandproportions,
distributions,
pass,
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
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,8 @@ const useHeaderMenuItems = (
type: 'reactRoute',
display: (
<>
Multi-study Interactive Map <img alt="BETA" src={betaImage} />
MapVEu - Multi-study Interactive Map{' '}
<img alt="BETA" src={betaImage} />
</>
),
key: 'map--mega-study',
Expand Down

0 comments on commit 2610930

Please sign in to comment.