Skip to content

Commit cd87b17

Browse files
committed
integrate de search into fold change temporarily
1 parent 3d85410 commit cd87b17

File tree

5 files changed

+24
-9
lines changed

5 files changed

+24
-9
lines changed

packages/libs/eda/src/lib/notebook/ComputeNotebookCell.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export function ComputeNotebookCell(
2222
computationId,
2323
cells,
2424
getAdditionalCollectionPredicate,
25+
hidden=false,
2526
} = cell;
2627
const computation = analysis.descriptor.computations.find(
2728
(comp) => comp.computationId === computationId
@@ -102,7 +103,7 @@ export function ComputeNotebookCell(
102103
getAdditionalCollectionPredicate &&
103104
getAdditionalCollectionPredicate(projectId);
104105

105-
return computation && appOverview ? (
106+
return computation && appOverview && !hidden ? (
106107
<>
107108
{cell.helperText && (
108109
<div className="NotebookCellHelpText">

packages/libs/eda/src/lib/notebook/NotebookPresets.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export interface ComputeCellDescriptor
5454
getAdditionalCollectionPredicate?: (
5555
projectId?: string
5656
) => (variableCollection: CollectionVariableTreeNode) => boolean;
57+
hidden?: boolean; // Whether to hide this computation cell in the UI. Useful for computations where the entire configuration is already known.
5758
}
5859

5960
export interface TextCellDescriptor extends NotebookCellDescriptorBase<'text'> {
@@ -102,6 +103,7 @@ export const presetNotebooks: Record<string, PresetNotebook> = {
102103
title: 'Configure PCA',
103104
computationName: 'dimensionalityreduction',
104105
computationId: 'pca_1',
106+
hidden: true, // Hide in UI since config is already known.
105107
helperText: (
106108
<NumberedHeader
107109
number={2}

packages/sites/genomics-site/webapp/wdkCustomization/js/client/components/questions/EdaNotebookParameter.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ type EdaNotebookParameterProps = {
4646
export function EdaNotebookParameter(props: EdaNotebookParameterProps) {
4747
const { value, datasetIdParamName, notebookTypeParamName, wdkState } = props;
4848

49+
console.log("Rendering EdaNotebookParameter with props:", props);
50+
4951
// TEMPORARY: We don't have this value coming from the wdk yet.
5052
const studyId = datasetIdParamName ?? 'DS_82dc5abc7f';
51-
const notebookType = notebookTypeParamName ?? 'wgcnaCorrelationNotebook';
53+
const notebookType = notebookTypeParamName ?? 'differentialExpressionNotebook';
5254

5355
// we need to maintain the analysis as regular "live" React state somewhere
5456
const [analysis, setAnalysis] = useState<NewAnalysis | Analysis | undefined>(

packages/sites/genomics-site/webapp/wdkCustomization/js/client/components/questions/EdaNotebookQuestionForm.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ export const EdaNotebookQuestionForm = (props: Props) => {
1212
throw new Error('No search defined.');
1313
}
1414

15+
console.log("in EdaNotebookQuestionForm with searchName:", searchName);
16+
console.log("EDANotebookQuestionForm props:", props);
17+
1518
// We'll use this function throughout the notebook to update any wdk parameters.
1619
const updateParamValue = useCallback(
1720
(parameter: Parameter, newParamValue: string) => {
@@ -33,8 +36,9 @@ export const EdaNotebookQuestionForm = (props: Props) => {
3336

3437
// An override that renders the notebook instead of any default parameter or parameter group ui.
3538
// NOTE: this function is run for every visible parameter group. May cause
36-
// an issue if the wdk question has multipl parameter groups.
39+
// an issue if the wdk question has multiple parameter groups.
3740
const renderParamGroup = () => {
41+
console.log("Rendering EdaNotebookParameter with wdkState:", wdkState);
3842
return <EdaNotebookParameter value={'test'} wdkState={wdkState} />;
3943
};
4044

packages/sites/genomics-site/webapp/wdkCustomization/js/client/pluginConfig.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ import {
4444
} from './components/questions/ByLocation';
4545
import { DynSpansBySourceId } from './components/questions/DynSpansBySourceId';
4646
import { GenesByBindingSiteFeature } from './components/questions/GenesByBindingSiteFeature';
47-
import { GenesByWGCNAModules } from './components/questions/GenesByWGCNAModules';
4847
import { GenesByOrthologPattern } from './components/questions/GenesByOrthologPattern';
4948
import { InternalGeneDataset } from './components/questions/InternalGeneDataset';
5049
import { hasChromosomeAndSequenceIDXorGroup } from './components/questions/MutuallyExclusiveParams/utils';
@@ -194,11 +193,12 @@ const apiPluginConfig: ClientPluginRegistryEntry<any>[] = [
194193
},
195194
{
196195
type: 'questionForm',
197-
test: ({ question }) =>
198-
question?.queryName === 'GenesByGenericFoldChange' ||
199-
question?.queryName === 'GenesByRnaSeqFoldChange' ||
200-
question?.queryName === 'GenesByUserDatasetRnaSeq',
201-
component: GenericFoldChangeForm,
196+
test: ({ question }) => {
197+
console.log(question?.queryName);
198+
return question?.queryName === 'GenesByGenericFoldChange' ||
199+
question?.queryName === 'GenesByRnaSeqFoldChange'
200+
},
201+
component: EdaNotebookQuestionForm,
202202
},
203203
{
204204
type: 'questionForm',
@@ -290,6 +290,12 @@ const apiPluginConfig: ClientPluginRegistryEntry<any>[] = [
290290
test: ({ question }) => question?.queryName === 'GenesByWGCNAModule',
291291
component: EdaNotebookQuestionForm,
292292
},
293+
{
294+
type: 'questionForm',
295+
test: ({ question }) => question?.queryName === 'GenesByDESeqAnalysis',
296+
// Possibly GenesByDESeqAnalysis but check.
297+
component: EdaNotebookQuestionForm,
298+
},
293299
];
294300

295301
export default apiPluginConfig;

0 commit comments

Comments
 (0)