From 8a6e11998e18d6b9fecfa64c8503b3d8875470a4 Mon Sep 17 00:00:00 2001 From: Scott Gigante Date: Sun, 4 Jun 2023 18:15:56 -0400 Subject: [PATCH 1/4] add spatial decomposition --- src/tasks/spatial_decomposition/README.md | 17 +++++++++++ src/tasks/spatial_decomposition/api/README.md | 8 +++++ .../spatial_decomposition/api/README.qmd | 8 +++++ .../api/anndata_output.yaml | 28 +++++++++++++++++ .../api/anndata_score.yaml | 21 +++++++++++++ .../api/anndata_single_cell.yaml | 21 +++++++++++++ .../api/anndata_solution.yaml | 24 +++++++++++++++ .../api/anndata_spatial_masked.yaml | 21 +++++++++++++ .../api/comp_control_method.yaml | 30 +++++++++++++++++++ .../api/comp_method.yaml | 22 ++++++++++++++ .../api/comp_metric.yaml | 24 +++++++++++++++ .../api/comp_process_dataset.yaml | 25 ++++++++++++++++ .../spatial_decomposition/api/task_info.yaml | 26 ++++++++++++++++ 13 files changed, 275 insertions(+) create mode 100644 src/tasks/spatial_decomposition/README.md create mode 100644 src/tasks/spatial_decomposition/api/README.md create mode 100644 src/tasks/spatial_decomposition/api/README.qmd create mode 100644 src/tasks/spatial_decomposition/api/anndata_output.yaml create mode 100644 src/tasks/spatial_decomposition/api/anndata_score.yaml create mode 100644 src/tasks/spatial_decomposition/api/anndata_single_cell.yaml create mode 100644 src/tasks/spatial_decomposition/api/anndata_solution.yaml create mode 100644 src/tasks/spatial_decomposition/api/anndata_spatial_masked.yaml create mode 100644 src/tasks/spatial_decomposition/api/comp_control_method.yaml create mode 100644 src/tasks/spatial_decomposition/api/comp_method.yaml create mode 100644 src/tasks/spatial_decomposition/api/comp_metric.yaml create mode 100644 src/tasks/spatial_decomposition/api/comp_process_dataset.yaml create mode 100644 src/tasks/spatial_decomposition/api/task_info.yaml diff --git a/src/tasks/spatial_decomposition/README.md b/src/tasks/spatial_decomposition/README.md new file mode 100644 index 0000000000..c068843b76 --- /dev/null +++ b/src/tasks/spatial_decomposition/README.md @@ -0,0 +1,17 @@ +# Spatial Decomposition/Deconvolution + +Spatial decomposition (also often referred to as Spatial deconvolution) is +applicable to spatial transcriptomics data where the transcription profile of +each capture location (spot, voxel, bead, etc.) do not share a bijective +relationship with the cells in the tissue, i.e., multiple cells may contribute +to the same capture location. The task of spatial decomposition then refers to +estimating the composition of cell types/states that are present at each capture +location. The cell type/states estimates are presented as proportion values, +representing the proportion of the cells at each capture location that belong to +a given cell type. + +We distinguish between _reference-based_ decomposition and _de novo_ +decomposition, where the former leverage external data (e.g., scRNA-seq or +scNuc-seq) to guide the inference process, while the latter only work with the +spatial data. We require that all datasets have an associated reference single +cell data set, but methods are free to ignore this information. \ No newline at end of file diff --git a/src/tasks/spatial_decomposition/api/README.md b/src/tasks/spatial_decomposition/api/README.md new file mode 100644 index 0000000000..7c3b9c8d87 --- /dev/null +++ b/src/tasks/spatial_decomposition/api/README.md @@ -0,0 +1,8 @@ +# Component and file format specifications + +This folder contains specifications for file formats and component +interfaces. + +These are not only used for documentation (i.e. to document the file +format of inputs and outputs of a component), but also for unit testing +and validation of output files. diff --git a/src/tasks/spatial_decomposition/api/README.qmd b/src/tasks/spatial_decomposition/api/README.qmd new file mode 100644 index 0000000000..d31a99367e --- /dev/null +++ b/src/tasks/spatial_decomposition/api/README.qmd @@ -0,0 +1,8 @@ +--- +title: Component and file format specifications +format: gfm +--- + +This folder contains specifications for file formats and component interfaces. + +These are not only used for documentation (i.e. to document the file format of inputs and outputs of a component), but also for unit testing and validation of output files. \ No newline at end of file diff --git a/src/tasks/spatial_decomposition/api/anndata_output.yaml b/src/tasks/spatial_decomposition/api/anndata_output.yaml new file mode 100644 index 0000000000..9a2a068c76 --- /dev/null +++ b/src/tasks/spatial_decomposition/api/anndata_output.yaml @@ -0,0 +1,28 @@ +type: file +description: "Spatial data file with estimated cell type proportions" +example: "resources_test/spatial_decomposition/pancreas/anndata_output.h5ad" +info: + short_description: "Spatial data with estimated proportions" + slots: + layers: + - type: integer + name: counts + description: Raw counts + obsm: + - type: float + name: coordinates + description: XY coordinates for each spot + - type: float + name: proportions + description: Esitmated cell type proportions for each spot + uns: + - type: string + name: cell_type_names + description: Cell type names corresponding to columns of `proportions` + - type: string + name: dataset_id + description: "A unique identifier for the dataset" + - type: string + name: method_id + description: "A unique identifier for the method" + \ No newline at end of file diff --git a/src/tasks/spatial_decomposition/api/anndata_score.yaml b/src/tasks/spatial_decomposition/api/anndata_score.yaml new file mode 100644 index 0000000000..1334ebf99e --- /dev/null +++ b/src/tasks/spatial_decomposition/api/anndata_score.yaml @@ -0,0 +1,21 @@ +type: file +description: "Metric score file" +example: "resources_test/spatial_decomposition/pancreas/anndata_score.h5ad" +info: + short_description: "Score" + slots: + uns: + - type: string + name: dataset_id + description: "A unique identifier for the dataset" + - type: string + name: method_id + description: "A unique identifier for the method" + - type: string + name: metric_ids + description: "One or more unique metric identifiers" + multiple: true + - type: double + name: metric_values + description: "The metric values obtained for the given prediction. Must be of same length as 'metric_ids'." + multiple: true diff --git a/src/tasks/spatial_decomposition/api/anndata_single_cell.yaml b/src/tasks/spatial_decomposition/api/anndata_single_cell.yaml new file mode 100644 index 0000000000..59637333a7 --- /dev/null +++ b/src/tasks/spatial_decomposition/api/anndata_single_cell.yaml @@ -0,0 +1,21 @@ +type: file +description: "The single cell data file" +example: "resources_test/spatial_decomposition/pancreas/anndata_single_cell.h5ad" +info: + short_description: "Single cell data" + slots: + layers: + - type: integer + name: counts + description: Raw counts + obs: + - type: integer + name: label + description: Cell type label IDs + uns: + - type: string + name: cell_type_names + description: Cell type names corresponding to values in `label` + - type: string + name: dataset_id + description: "A unique identifier for the dataset" \ No newline at end of file diff --git a/src/tasks/spatial_decomposition/api/anndata_solution.yaml b/src/tasks/spatial_decomposition/api/anndata_solution.yaml new file mode 100644 index 0000000000..85e94ed778 --- /dev/null +++ b/src/tasks/spatial_decomposition/api/anndata_solution.yaml @@ -0,0 +1,24 @@ +type: file +description: "The solution spatial data file" +example: "resources_test/spatial_decomposition/pancreas/anndata_solution.h5ad" +info: + short_description: "Solution spatial data" + slots: + layers: + - type: integer + name: counts + description: Raw counts + obsm: + - type: float + name: coordinates + description: XY coordinates for each spot + - type: float + name: proportions + description: True cell type proportions for each spot + uns: + - type: string + name: cell_type_names + description: Cell type names corresponding to columns of `proportions` + - type: string + name: dataset_id + description: "A unique identifier for the dataset" \ No newline at end of file diff --git a/src/tasks/spatial_decomposition/api/anndata_spatial_masked.yaml b/src/tasks/spatial_decomposition/api/anndata_spatial_masked.yaml new file mode 100644 index 0000000000..b6143116cc --- /dev/null +++ b/src/tasks/spatial_decomposition/api/anndata_spatial_masked.yaml @@ -0,0 +1,21 @@ +type: file +description: "The masked spatial data file" +example: "resources_test/spatial_decomposition/pancreas/anndata_spatial_masked.h5ad" +info: + short_description: "Masked spatial data" + slots: + layers: + - type: integer + name: counts + description: Raw counts + obsm: + - type: float + name: coordinates + description: XY coordinates for each spot + uns: + - type: string + name: cell_type_names + description: Cell type names corresponding to columns of `proportions` in output + - type: string + name: dataset_id + description: "A unique identifier for the dataset" \ No newline at end of file diff --git a/src/tasks/spatial_decomposition/api/comp_control_method.yaml b/src/tasks/spatial_decomposition/api/comp_control_method.yaml new file mode 100644 index 0000000000..a5e8e6beb5 --- /dev/null +++ b/src/tasks/spatial_decomposition/api/comp_control_method.yaml @@ -0,0 +1,30 @@ +functionality: + namespace: "spatial_decomposition/control_methods" + info: + type: control_method + type_info: + label: Control method + description: | + This folder contains control components for the task. + These components have the same interface as the regular methods + but also receive the solution object as input. It serves as a + starting point to test the relative accuracy of new methods in + the task, and also as a quality control for the metrics defined + in the task. + arguments: + - name: "--input_single_cell" + __merge__: anndata_single_cell.yaml + - name: "--input_spatial_masked" + __merge__: anndata_spatial_masked.yaml + - name: "--input_solution" + __merge__: anndata_solution.yaml + - name: "--output" + __merge__: anndata_output.yaml + direction: output + test_resources: + - type: python_script + path: /src/common/comp_tests/check_method_config.py + - type: python_script + path: /src/common/comp_tests/run_and_check_adata.py + - path: /resources_test/spatial_decomposition/pancreas + dest: resources_test/spatial_decomposition/pancreas \ No newline at end of file diff --git a/src/tasks/spatial_decomposition/api/comp_method.yaml b/src/tasks/spatial_decomposition/api/comp_method.yaml new file mode 100644 index 0000000000..b97a52d5ec --- /dev/null +++ b/src/tasks/spatial_decomposition/api/comp_method.yaml @@ -0,0 +1,22 @@ +functionality: + namespace: "spatial_decomposition/methods" + info: + type: method + type_info: + label: Method + description: "Method to estimate cell type proportions from spatial and single cell data" + arguments: + - name: "--input_single_cell" + __merge__: anndata_single_cell.yaml + - name: "--input_spatial" + __merge__: anndata_spatial_masked.yaml + - name: "--output" + __merge__: anndata_output.yaml + direction: output + test_resources: + - type: python_script + path: /src/common/comp_tests/check_method_config.py + - type: python_script + path: /src/common/comp_tests/run_and_check_adata.py + - path: /resources_test/spatial_decomposition/pancreas + dest: resources_test/spatial_decomposition/pancreas \ No newline at end of file diff --git a/src/tasks/spatial_decomposition/api/comp_metric.yaml b/src/tasks/spatial_decomposition/api/comp_metric.yaml new file mode 100644 index 0000000000..a619ab0d29 --- /dev/null +++ b/src/tasks/spatial_decomposition/api/comp_metric.yaml @@ -0,0 +1,24 @@ +functionality: + namespace: "spatial_decomposition/metrics" + info: + type: metric + type_info: + label: Metric + description: | + A metric for evaluating accuracy of cell type proportion estimate + arguments: + - name: "--input_method" + __merge__: anndata_output.yaml + - name: "--input_solution" + __merge__: anndata_solution.yaml + - name: "--output" + __merge__: anndata_score.yaml + direction: output + test_resources: + - type: python_script + path: /src/common/comp_tests/check_metric_config.py + - type: python_script + path: /src/common/comp_tests/run_and_check_adata.py + - path: /resources_test/spatial_decomposition/pancreas + dest: resources_test/spatial_decomposition/pancreas + \ No newline at end of file diff --git a/src/tasks/spatial_decomposition/api/comp_process_dataset.yaml b/src/tasks/spatial_decomposition/api/comp_process_dataset.yaml new file mode 100644 index 0000000000..657081cfff --- /dev/null +++ b/src/tasks/spatial_decomposition/api/comp_process_dataset.yaml @@ -0,0 +1,25 @@ +functionality: + namespace: "spatial_decomposition" + info: + type: process_dataset + type_info: + label: Data processor + description: | + Prepare a common dataset for the spatial_decomposition task. + arguments: + - name: "--input" + __merge__: /src/datasets/api/anndata_common_dataset.yaml + - name: "--output_single_cell" + __merge__: anndata_single_cell.yaml + direction: output + - name: "--output_spatial_masked" + __merge__: anndata_spatial_masked.yaml + direction: output + - name: "--output_solution" + __merge__: anndata_solution.yaml + direction: output + test_resources: + - type: python_script + path: /src/common/comp_tests/run_and_check_adata.py + - path: /resources_test/common/pancreas + dest: resources_test/common/pancreas diff --git a/src/tasks/spatial_decomposition/api/task_info.yaml b/src/tasks/spatial_decomposition/api/task_info.yaml new file mode 100644 index 0000000000..267251b2ff --- /dev/null +++ b/src/tasks/spatial_decomposition/api/task_info.yaml @@ -0,0 +1,26 @@ +task_id: spatial_decomposition +task_name: "Spatial decomposition" +summary: "Estimation of cell type proportions per spot in 2D space from spatial transcriptomic data coupled with corresponding single-cell data" +description: | + Spatial decomposition (also often referred to as Spatial deconvolution) is + applicable to spatial transcriptomics data where the transcription profile of + each capture location (spot, voxel, bead, etc.) do not share a bijective + relationship with the cells in the tissue, i.e., multiple cells may contribute + to the same capture location. The task of spatial decomposition then refers to + estimating the composition of cell types/states that are present at each capture + location. The cell type/states estimates are presented as proportion values, + representing the proportion of the cells at each capture location that belong to + a given cell type. + + We distinguish between _reference-based_ decomposition and _de novo_ + decomposition, where the former leverage external data (e.g., scRNA-seq or + scNuc-seq) to guide the inference process, while the latter only work with the + spatial data. We require that all datasets have an associated reference single + cell data set, but methods are free to ignore this information. +authors: + - name: "Giovanni Palla" + roles: [ author, maintainer ] + props: { github: giovp } + - name: "Scott Gigante" + roles: [ maintainer ] + props: { github: scottgigante, orcid: "0000-0002-4544-2764" } \ No newline at end of file From 60ceda17a00858d41b21c6664e5ae7bc1a451d27 Mon Sep 17 00:00:00 2001 From: Scott Gigante <84813314+scottgigante-immunai@users.noreply.github.com> Date: Wed, 7 Jun 2023 10:44:08 -0400 Subject: [PATCH 2/4] Fix typo Co-authored-by: Robrecht Cannoodt --- src/tasks/spatial_decomposition/api/anndata_output.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tasks/spatial_decomposition/api/anndata_output.yaml b/src/tasks/spatial_decomposition/api/anndata_output.yaml index 9a2a068c76..f1e52fa6de 100644 --- a/src/tasks/spatial_decomposition/api/anndata_output.yaml +++ b/src/tasks/spatial_decomposition/api/anndata_output.yaml @@ -14,7 +14,7 @@ info: description: XY coordinates for each spot - type: float name: proportions - description: Esitmated cell type proportions for each spot + description: Estimated cell type proportions for each spot uns: - type: string name: cell_type_names From f72faeb2f314e9c619d21654d7224631eb884495 Mon Sep 17 00:00:00 2001 From: Robrecht Cannoodt Date: Wed, 14 Jun 2023 03:44:21 +0200 Subject: [PATCH 3/4] rename files --- .../api/{anndata_output.yaml => file_output.yaml} | 0 .../api/{anndata_score.yaml => file_score.yaml} | 0 .../api/{anndata_single_cell.yaml => file_single_cell.yaml} | 0 .../api/{anndata_solution.yaml => file_solution.yaml} | 0 .../api/{anndata_spatial_masked.yaml => file_spatial_masked.yaml} | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename src/tasks/spatial_decomposition/api/{anndata_output.yaml => file_output.yaml} (100%) rename src/tasks/spatial_decomposition/api/{anndata_score.yaml => file_score.yaml} (100%) rename src/tasks/spatial_decomposition/api/{anndata_single_cell.yaml => file_single_cell.yaml} (100%) rename src/tasks/spatial_decomposition/api/{anndata_solution.yaml => file_solution.yaml} (100%) rename src/tasks/spatial_decomposition/api/{anndata_spatial_masked.yaml => file_spatial_masked.yaml} (100%) diff --git a/src/tasks/spatial_decomposition/api/anndata_output.yaml b/src/tasks/spatial_decomposition/api/file_output.yaml similarity index 100% rename from src/tasks/spatial_decomposition/api/anndata_output.yaml rename to src/tasks/spatial_decomposition/api/file_output.yaml diff --git a/src/tasks/spatial_decomposition/api/anndata_score.yaml b/src/tasks/spatial_decomposition/api/file_score.yaml similarity index 100% rename from src/tasks/spatial_decomposition/api/anndata_score.yaml rename to src/tasks/spatial_decomposition/api/file_score.yaml diff --git a/src/tasks/spatial_decomposition/api/anndata_single_cell.yaml b/src/tasks/spatial_decomposition/api/file_single_cell.yaml similarity index 100% rename from src/tasks/spatial_decomposition/api/anndata_single_cell.yaml rename to src/tasks/spatial_decomposition/api/file_single_cell.yaml diff --git a/src/tasks/spatial_decomposition/api/anndata_solution.yaml b/src/tasks/spatial_decomposition/api/file_solution.yaml similarity index 100% rename from src/tasks/spatial_decomposition/api/anndata_solution.yaml rename to src/tasks/spatial_decomposition/api/file_solution.yaml diff --git a/src/tasks/spatial_decomposition/api/anndata_spatial_masked.yaml b/src/tasks/spatial_decomposition/api/file_spatial_masked.yaml similarity index 100% rename from src/tasks/spatial_decomposition/api/anndata_spatial_masked.yaml rename to src/tasks/spatial_decomposition/api/file_spatial_masked.yaml From dd61e5b5bd95e05b23ac4f24451fbe2aca5c29a1 Mon Sep 17 00:00:00 2001 From: Robrecht Cannoodt Date: Wed, 14 Jun 2023 03:50:29 +0200 Subject: [PATCH 4/4] minor changes to api files --- .../api/comp_control_method.yaml | 13 ++++++++++--- .../spatial_decomposition/api/comp_method.yaml | 6 ++++++ .../spatial_decomposition/api/comp_metric.yaml | 6 ++++++ .../api/comp_process_dataset.yaml | 6 ++++++ .../spatial_decomposition/api/file_output.yaml | 15 +++++++++++---- .../spatial_decomposition/api/file_score.yaml | 8 ++++++-- .../api/file_single_cell.yaml | 10 +++++++--- .../spatial_decomposition/api/file_solution.yaml | 15 ++++++++++----- .../api/file_spatial_masked.yaml | 12 ++++++++---- .../spatial_decomposition/api/task_info.yaml | 12 ++++++------ 10 files changed, 76 insertions(+), 27 deletions(-) diff --git a/src/tasks/spatial_decomposition/api/comp_control_method.yaml b/src/tasks/spatial_decomposition/api/comp_control_method.yaml index a5e8e6beb5..948257225d 100644 --- a/src/tasks/spatial_decomposition/api/comp_control_method.yaml +++ b/src/tasks/spatial_decomposition/api/comp_control_method.yaml @@ -4,23 +4,30 @@ functionality: type: control_method type_info: label: Control method + summary: Quality control methods for verifying the pipeline. description: | - This folder contains control components for the task. - These components have the same interface as the regular methods + Control methods have the same interface as the regular methods but also receive the solution object as input. It serves as a starting point to test the relative accuracy of new methods in the task, and also as a quality control for the metrics defined - in the task. + in the task. arguments: - name: "--input_single_cell" __merge__: anndata_single_cell.yaml + direction: input + required: true - name: "--input_spatial_masked" __merge__: anndata_spatial_masked.yaml + direction: input + required: true - name: "--input_solution" __merge__: anndata_solution.yaml + direction: input + required: true - name: "--output" __merge__: anndata_output.yaml direction: output + required: true test_resources: - type: python_script path: /src/common/comp_tests/check_method_config.py diff --git a/src/tasks/spatial_decomposition/api/comp_method.yaml b/src/tasks/spatial_decomposition/api/comp_method.yaml index b97a52d5ec..641f781cec 100644 --- a/src/tasks/spatial_decomposition/api/comp_method.yaml +++ b/src/tasks/spatial_decomposition/api/comp_method.yaml @@ -4,15 +4,21 @@ functionality: type: method type_info: label: Method + summary: A spatial composition method. description: "Method to estimate cell type proportions from spatial and single cell data" arguments: - name: "--input_single_cell" __merge__: anndata_single_cell.yaml + direction: input + required: true - name: "--input_spatial" __merge__: anndata_spatial_masked.yaml + direction: input + required: true - name: "--output" __merge__: anndata_output.yaml direction: output + required: true test_resources: - type: python_script path: /src/common/comp_tests/check_method_config.py diff --git a/src/tasks/spatial_decomposition/api/comp_metric.yaml b/src/tasks/spatial_decomposition/api/comp_metric.yaml index a619ab0d29..d9188a64cb 100644 --- a/src/tasks/spatial_decomposition/api/comp_metric.yaml +++ b/src/tasks/spatial_decomposition/api/comp_metric.yaml @@ -4,16 +4,22 @@ functionality: type: metric type_info: label: Metric + summary: A spatial decomposition metric. description: | A metric for evaluating accuracy of cell type proportion estimate arguments: - name: "--input_method" __merge__: anndata_output.yaml + direction: input + required: true - name: "--input_solution" __merge__: anndata_solution.yaml + direction: input + required: true - name: "--output" __merge__: anndata_score.yaml direction: output + required: true test_resources: - type: python_script path: /src/common/comp_tests/check_metric_config.py diff --git a/src/tasks/spatial_decomposition/api/comp_process_dataset.yaml b/src/tasks/spatial_decomposition/api/comp_process_dataset.yaml index 657081cfff..4eaf9fecf8 100644 --- a/src/tasks/spatial_decomposition/api/comp_process_dataset.yaml +++ b/src/tasks/spatial_decomposition/api/comp_process_dataset.yaml @@ -4,20 +4,26 @@ functionality: type: process_dataset type_info: label: Data processor + summary: A spatial decomposition dataset processor. description: | Prepare a common dataset for the spatial_decomposition task. arguments: - name: "--input" __merge__: /src/datasets/api/anndata_common_dataset.yaml + direction: input + required: true - name: "--output_single_cell" __merge__: anndata_single_cell.yaml direction: output + required: true - name: "--output_spatial_masked" __merge__: anndata_spatial_masked.yaml direction: output + required: true - name: "--output_solution" __merge__: anndata_solution.yaml direction: output + required: true test_resources: - type: python_script path: /src/common/comp_tests/run_and_check_adata.py diff --git a/src/tasks/spatial_decomposition/api/file_output.yaml b/src/tasks/spatial_decomposition/api/file_output.yaml index f1e52fa6de..18f8cb736d 100644 --- a/src/tasks/spatial_decomposition/api/file_output.yaml +++ b/src/tasks/spatial_decomposition/api/file_output.yaml @@ -1,28 +1,35 @@ type: file -description: "Spatial data file with estimated cell type proportions" example: "resources_test/spatial_decomposition/pancreas/anndata_output.h5ad" info: - short_description: "Spatial data with estimated proportions" + label: Output + summary: "Spatial data with estimated proportions." + description: "Spatial data file with estimated cell type proportions." slots: layers: - type: integer name: counts description: Raw counts + required: true obsm: - - type: float + - type: double name: coordinates description: XY coordinates for each spot - - type: float + required: true + - type: double name: proportions description: Estimated cell type proportions for each spot + required: true uns: - type: string name: cell_type_names description: Cell type names corresponding to columns of `proportions` + required: true - type: string name: dataset_id description: "A unique identifier for the dataset" + required: true - type: string name: method_id description: "A unique identifier for the method" + required: true \ No newline at end of file diff --git a/src/tasks/spatial_decomposition/api/file_score.yaml b/src/tasks/spatial_decomposition/api/file_score.yaml index 1334ebf99e..48326d2816 100644 --- a/src/tasks/spatial_decomposition/api/file_score.yaml +++ b/src/tasks/spatial_decomposition/api/file_score.yaml @@ -1,21 +1,25 @@ type: file -description: "Metric score file" example: "resources_test/spatial_decomposition/pancreas/anndata_score.h5ad" info: - short_description: "Score" + label: "Score" + summary: Metric score file. slots: uns: - type: string name: dataset_id description: "A unique identifier for the dataset" + required: true - type: string name: method_id description: "A unique identifier for the method" + required: true - type: string name: metric_ids description: "One or more unique metric identifiers" multiple: true + required: true - type: double name: metric_values description: "The metric values obtained for the given prediction. Must be of same length as 'metric_ids'." multiple: true + required: true diff --git a/src/tasks/spatial_decomposition/api/file_single_cell.yaml b/src/tasks/spatial_decomposition/api/file_single_cell.yaml index 59637333a7..cf6d60f725 100644 --- a/src/tasks/spatial_decomposition/api/file_single_cell.yaml +++ b/src/tasks/spatial_decomposition/api/file_single_cell.yaml @@ -1,21 +1,25 @@ type: file -description: "The single cell data file" example: "resources_test/spatial_decomposition/pancreas/anndata_single_cell.h5ad" info: - short_description: "Single cell data" + label: "Single cell data" + summary: "The single cell data file" slots: layers: - type: integer name: counts description: Raw counts + required: true obs: - type: integer name: label description: Cell type label IDs + required: true uns: - type: string name: cell_type_names description: Cell type names corresponding to values in `label` + required: true - type: string name: dataset_id - description: "A unique identifier for the dataset" \ No newline at end of file + description: "A unique identifier for the dataset" + required: true \ No newline at end of file diff --git a/src/tasks/spatial_decomposition/api/file_solution.yaml b/src/tasks/spatial_decomposition/api/file_solution.yaml index 85e94ed778..b7e0479bc4 100644 --- a/src/tasks/spatial_decomposition/api/file_solution.yaml +++ b/src/tasks/spatial_decomposition/api/file_solution.yaml @@ -1,24 +1,29 @@ type: file -description: "The solution spatial data file" example: "resources_test/spatial_decomposition/pancreas/anndata_solution.h5ad" info: - short_description: "Solution spatial data" + label: Solution + summary: "The solution spatial data file" slots: layers: - type: integer name: counts description: Raw counts + required: true obsm: - - type: float + - type: double name: coordinates description: XY coordinates for each spot - - type: float + required: true + - type: double name: proportions description: True cell type proportions for each spot + required: true uns: - type: string name: cell_type_names description: Cell type names corresponding to columns of `proportions` + required: true - type: string name: dataset_id - description: "A unique identifier for the dataset" \ No newline at end of file + description: "A unique identifier for the dataset" + required: true \ No newline at end of file diff --git a/src/tasks/spatial_decomposition/api/file_spatial_masked.yaml b/src/tasks/spatial_decomposition/api/file_spatial_masked.yaml index b6143116cc..6319ffa48f 100644 --- a/src/tasks/spatial_decomposition/api/file_spatial_masked.yaml +++ b/src/tasks/spatial_decomposition/api/file_spatial_masked.yaml @@ -1,21 +1,25 @@ type: file -description: "The masked spatial data file" example: "resources_test/spatial_decomposition/pancreas/anndata_spatial_masked.h5ad" info: - short_description: "Masked spatial data" + label: "Masked" + summary: "The masked spatial data file" slots: layers: - type: integer name: counts description: Raw counts + required: true obsm: - - type: float + - type: double name: coordinates description: XY coordinates for each spot + required: true uns: - type: string name: cell_type_names description: Cell type names corresponding to columns of `proportions` in output + required: true - type: string name: dataset_id - description: "A unique identifier for the dataset" \ No newline at end of file + description: "A unique identifier for the dataset" + required: true \ No newline at end of file diff --git a/src/tasks/spatial_decomposition/api/task_info.yaml b/src/tasks/spatial_decomposition/api/task_info.yaml index 267251b2ff..411c2c4f8d 100644 --- a/src/tasks/spatial_decomposition/api/task_info.yaml +++ b/src/tasks/spatial_decomposition/api/task_info.yaml @@ -1,7 +1,7 @@ -task_id: spatial_decomposition -task_name: "Spatial decomposition" +name: spatial_decomposition +label: "Spatial decomposition" summary: "Estimation of cell type proportions per spot in 2D space from spatial transcriptomic data coupled with corresponding single-cell data" -description: | +motivation: | Spatial decomposition (also often referred to as Spatial deconvolution) is applicable to spatial transcriptomics data where the transcription profile of each capture location (spot, voxel, bead, etc.) do not share a bijective @@ -11,7 +11,7 @@ description: | location. The cell type/states estimates are presented as proportion values, representing the proportion of the cells at each capture location that belong to a given cell type. - +description: | We distinguish between _reference-based_ decomposition and _de novo_ decomposition, where the former leverage external data (e.g., scRNA-seq or scNuc-seq) to guide the inference process, while the latter only work with the @@ -20,7 +20,7 @@ description: | authors: - name: "Giovanni Palla" roles: [ author, maintainer ] - props: { github: giovp } + info: { github: giovp } - name: "Scott Gigante" roles: [ maintainer ] - props: { github: scottgigante, orcid: "0000-0002-4544-2764" } \ No newline at end of file + info: { github: scottgigante, orcid: "0000-0002-4544-2764" } \ No newline at end of file