From a461ab7e352c827d7216331466432d0c509c2a1c Mon Sep 17 00:00:00 2001 From: John Chilton Date: Mon, 9 Dec 2024 11:34:06 -0500 Subject: [PATCH] WIP: sample sheets... --- client/src/api/index.ts | 4 + .../Editor/Forms/FormCollectionType.vue | 1 + .../Editor/Forms/FormColumnDefinition.vue | 56 +++++++ .../Editor/Forms/FormColumnDefinitions.vue | 148 +++++++++++++++++ .../Editor/Forms/FormInputCollection.vue | 19 ++- .../modules/collectionTypeDescription.ts | 2 +- client/src/stores/workflowStepStore.ts | 2 + lib/galaxy/managers/collections.py | 17 +- lib/galaxy/managers/collections_util.py | 6 + lib/galaxy/model/__init__.py | 16 +- .../model/dataset_collections/builder.py | 25 ++- .../model/dataset_collections/registry.py | 2 + .../dataset_collections/types/sample_sheet.py | 30 ++++ .../types/sample_sheet_util.py | 109 ++++++++++++ .../types/sample_sheet_workbook.py | 157 ++++++++++++++++++ .../ec25b23b08e2_implement_sample_sheets.py | 2 + lib/galaxy/schema/schema.py | 42 +++++ lib/galaxy/tool_util/client/staging.py | 5 +- lib/galaxy/tool_util/cwl/util.py | 17 +- .../tool_util/parser/parameter_validators.py | 17 +- lib/galaxy/util/rules_dsl.py | 24 +++ lib/galaxy/util/rules_dsl_spec.yml | 22 +++ lib/galaxy/workflow/modules.py | 5 + .../api/test_dataset_collections.py | 147 +++++++++++++++- lib/galaxy_test/api/test_tools.py | 3 + lib/galaxy_test/base/rules_test_data.py | 51 ++++++ packages/data/setup.cfg | 1 + pyproject.toml | 1 + .../test_sample_sheet_util.py | 97 +++++++++++ .../test_sample_sheet_workbook.py | 58 +++++++ 30 files changed, 1069 insertions(+), 17 deletions(-) create mode 100644 client/src/components/Workflow/Editor/Forms/FormColumnDefinition.vue create mode 100644 client/src/components/Workflow/Editor/Forms/FormColumnDefinitions.vue create mode 100644 lib/galaxy/model/dataset_collections/types/sample_sheet.py create mode 100644 lib/galaxy/model/dataset_collections/types/sample_sheet_util.py create mode 100644 lib/galaxy/model/dataset_collections/types/sample_sheet_workbook.py create mode 100644 test/unit/data/dataset_collections/test_sample_sheet_util.py create mode 100644 test/unit/data/dataset_collections/test_sample_sheet_workbook.py diff --git a/client/src/api/index.ts b/client/src/api/index.ts index 6f9ce9d0213d..27a4d572c797 100644 --- a/client/src/api/index.ts +++ b/client/src/api/index.ts @@ -312,4 +312,8 @@ export type ObjectExportTaskResponse = components["schemas"]["ObjectExportTaskRe export type ExportObjectRequestMetadata = components["schemas"]["ExportObjectRequestMetadata"]; export type ExportObjectResultMetadata = components["schemas"]["ExportObjectResultMetadata"]; +export type SampleSheetColumnDefinition = components["schemas"]["SampleSheetColumnDefinition"]; +export type SampleSheetColumnDefinitionType = SampleSheetColumnDefinition["type"]; +export type SampleSheetColumnDefinitions = SampleSheetColumnDefinition[] | null; + export type AsyncTaskResultSummary = components["schemas"]["AsyncTaskResultSummary"]; diff --git a/client/src/components/Workflow/Editor/Forms/FormCollectionType.vue b/client/src/components/Workflow/Editor/Forms/FormCollectionType.vue index a93cb5ded6f1..77b5aa8161f2 100644 --- a/client/src/components/Workflow/Editor/Forms/FormCollectionType.vue +++ b/client/src/components/Workflow/Editor/Forms/FormCollectionType.vue @@ -23,6 +23,7 @@ const collectionTypeOptions = [ { value: "list", label: "List of Datasets" }, { value: "paired", label: "Dataset Pair" }, { value: "list:paired", label: "List of Dataset Pairs" }, + { value: "sample_sheet", label: "Sample Sheet of Datasets" }, ]; function updateValue(newValue: string | undefined) { diff --git a/client/src/components/Workflow/Editor/Forms/FormColumnDefinition.vue b/client/src/components/Workflow/Editor/Forms/FormColumnDefinition.vue new file mode 100644 index 000000000000..1e74cb43b04f --- /dev/null +++ b/client/src/components/Workflow/Editor/Forms/FormColumnDefinition.vue @@ -0,0 +1,56 @@ + + + diff --git a/client/src/components/Workflow/Editor/Forms/FormColumnDefinitions.vue b/client/src/components/Workflow/Editor/Forms/FormColumnDefinitions.vue new file mode 100644 index 000000000000..220c1be3df88 --- /dev/null +++ b/client/src/components/Workflow/Editor/Forms/FormColumnDefinitions.vue @@ -0,0 +1,148 @@ + + + + + diff --git a/client/src/components/Workflow/Editor/Forms/FormInputCollection.vue b/client/src/components/Workflow/Editor/Forms/FormInputCollection.vue index 46899793dca4..ef5379b0e0d1 100644 --- a/client/src/components/Workflow/Editor/Forms/FormInputCollection.vue +++ b/client/src/components/Workflow/Editor/Forms/FormInputCollection.vue @@ -1,6 +1,7 @@