From 1eec06e536cbffebacef00213eded47ac43eb450 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/FormColumnDefinitionType.vue | 48 +++++ .../Editor/Forms/FormColumnDefinitions.vue | 176 ++++++++++++++++++ .../Editor/Forms/FormInputCollection.vue | 15 ++ .../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 | 103 ++++++++++ .../types/sample_sheet_workbook.py | 160 ++++++++++++++++ .../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 +++ .../webapps/galaxy/api/dataset_collections.py | 45 +++++ lib/galaxy/workflow/modules.py | 5 + .../api/test_dataset_collections.py | 158 +++++++++++++++- lib/galaxy_test/api/test_tools.py | 3 + lib/galaxy_test/base/populators.py | 17 +- lib/galaxy_test/base/rules_test_data.py | 51 +++++ packages/data/setup.cfg | 1 + pyproject.toml | 1 + .../test_sample_sheet_util.py | 93 +++++++++ .../test_sample_sheet_workbook.py | 58 ++++++ 33 files changed, 1208 insertions(+), 16 deletions(-) create mode 100644 client/src/components/Workflow/Editor/Forms/FormColumnDefinition.vue create mode 100644 client/src/components/Workflow/Editor/Forms/FormColumnDefinitionType.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/FormColumnDefinitionType.vue b/client/src/components/Workflow/Editor/Forms/FormColumnDefinitionType.vue new file mode 100644 index 000000000000..84aea614868e --- /dev/null +++ b/client/src/components/Workflow/Editor/Forms/FormColumnDefinitionType.vue @@ -0,0 +1,48 @@ + + + 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..229e92df209f --- /dev/null +++ b/client/src/components/Workflow/Editor/Forms/FormColumnDefinitions.vue @@ -0,0 +1,176 @@ + + + + + diff --git a/client/src/components/Workflow/Editor/Forms/FormInputCollection.vue b/client/src/components/Workflow/Editor/Forms/FormInputCollection.vue index ea17f09fb50d..ef5379b0e0d1 100644 --- a/client/src/components/Workflow/Editor/Forms/FormInputCollection.vue +++ b/client/src/components/Workflow/Editor/Forms/FormInputCollection.vue @@ -1,6 +1,7 @@