From cbdfc6905cfe6c2e147c9b658c6d7b32347c8606 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 | 3 + .../Editor/Forms/FormCollectionType.vue | 1 + .../Editor/Forms/FormInputCollection.vue | 15 ++ .../modules/collectionTypeDescription.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 | 101 +++++++++++++ .../ec25b23b08e2_implement_sample_sheets.py | 2 + lib/galaxy/schema/schema.py | 40 +++++ 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 | 143 +++++++++++++++++- lib/galaxy_test/api/test_tools.py | 3 + lib/galaxy_test/base/rules_test_data.py | 51 +++++++ .../test_sample_sheet_util.py | 96 ++++++++++++ 23 files changed, 628 insertions(+), 15 deletions(-) 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 test/unit/data/dataset_collections/test_sample_sheet_util.py diff --git a/client/src/api/index.ts b/client/src/api/index.ts index 6f9ce9d0213d..839c4308da8d 100644 --- a/client/src/api/index.ts +++ b/client/src/api/index.ts @@ -312,4 +312,7 @@ 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 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/FormInputCollection.vue b/client/src/components/Workflow/Editor/Forms/FormInputCollection.vue index 352f74996b0f..0f3d9fc7d7cd 100644 --- a/client/src/components/Workflow/Editor/Forms/FormInputCollection.vue +++ b/client/src/components/Workflow/Editor/Forms/FormInputCollection.vue @@ -1,6 +1,7 @@