Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 2 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,18 @@
# task_template x.y.z
# task_spatial_trajectory_inference 1.0.0

## BREAKING CHANGES

<!-- * Restructured `src` directory (PR #3). -->

## NEW FUNCTIONALITY

* Added `control_methods/true_labels` component (PR #5).

* Added `methods/logistic_regression` component (PR #5).

* Added `metrics/accuracy` component (PR #5).

## MAJOR CHANGES

* Updated `api` files (PR #5).

* Updated configs, components and CI to the latest Viash version (PR #8).

* Updated to Viash 0.9.4 (PR #12).

* Use dependencies in `openproblems-bio/openproblems` (PR #12).
* Updated `api` files and set the data processor (PR #1).

## MINOR CHANGES

* Updated `README.md` (PR #5).

* `run_benchmark`: write the commit the workflow ran from and the launch time into
`task_info.yaml`, instead of publishing `_viash.yaml` verbatim (PR #18).

## BUGFIXES

87 changes: 50 additions & 37 deletions _viash.yaml
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@
viash_version: 0.9.4

# Step 1: Change the name of the task.
# example: task_name_of_this_task
name: task_template
name: task_spatial_trajectory_inference
organization: openproblems-bio
version: dev

license: MIT
# Step 2: Add keywords to describe the task.
keywords: [single-cell, openproblems, benchmark]
# Step 3: Update the `task_template` to the name of the task from step 1.
keywords: [single-cell, openproblems, benchmark, spatial, trajectory inference]
links:
issue_tracker: https://github.com/openproblems-bio/task_template/issues
repository: https://github.com/openproblems-bio/task_template
issue_tracker: https://github.com/openproblems-bio/task_spatial_trajectory_inference/issues
repository: https://github.com/openproblems-bio/task_spatial_trajectory_inference
docker_registry: ghcr.io


# Step 4: Update the label, summary and description.
# A unique, human-readable, short label. Used for creating summary tables and visualisations.
label: Template
summary: A one sentence summary of purpose and methodology. Used for creating an overview tables.
description: |
Provide a clear and concise description of your task, detailing the specific problem it aims
to solve. Outline the input data types, the expected output, and any assumptions or constraints.
Be sure to explain any terminology or concepts that are essential for understanding the task.
label: Spatial Trajectory Inference
summary: Predicting the spatial trajectory of cells in a tissue based on spatial transcriptomics data.
description:

Explain the motivation behind your proposed task. Describe the biological or computational
problem you aim to address and why it's important. Discuss the current state of research in
this area and any gaps or challenges that your task could help address. This section
should convince readers of the significance and relevance of your task.
Spatial transcriptomics preserves each cell's physical position alongside its expression profile, enabling pseudotime prediction using 2D spatial context.
Different methods make different assumptions about resolution, input format, and output, and are further complicated by spatial batch effects not present in dissociated single-cell data.
While dynbenchmark resolved this comparison problem for non-spatial trajectory inference methods, no equivalent standardized benchmark exists for spatial pseudotime prediction, and existing method papers are validated only against each other or qualitative marker trends rather than tissues with independently known trajectories.

This task benchmarks pseudotime prediction methods on 2D tissue datasets with well-characterized ground-truth spatial axes.
Input data consists of AnnData objects containing 2D spatial transcriptomics data with spatial coordinates.
The output is a set of quantitative metric scores comparing each method's predicted pseudotime against ground truth, capturing both trajectory accuracy and preservation of relevant biological information.

# A list of references to relevant literature. Each reference should be a DOI or a bibtex entry
references:
Expand All @@ -47,32 +41,51 @@ references:

info:
image: The name of the image file to use for the component on the website.
# Step 5: Replace the task_template to the name of the task.
test_resources:
- type: s3
path: s3://openproblems-data/resources_test/common/
dest: resources_test/common
- type: s3
path: s3://openproblems-data/resources_test/task_template/
dest: resources_test/task_template
path: s3://openproblems-data/resources_test/task_spatial_trajectory_inference/
dest: resources_test/task_spatial_trajectory_inference

# Step 6: Update the authors of the task.
authors:
# Full name of the author, usually in the name of FirstName MiddleName LastName.
- name: John Doe
# Role of the author. Possible values:
#
# * `"author"`: Authors who have made substantial contributions to the component.
# * `"maintainer"`: The maintainer of the component.
# * `"contributor"`: Authors who have made smaller contributions (such as code patches etc.).
- name: Chit Tong Lio
roles: [ "author", "maintainer" ]
info:
github: yollct
orcid: 0000-0003-2297-831X
email: chit-tong.lio@tum.de
- name: Seo Hyon Kim
roles: [ "author", "maintainer" ]
info:
github: seohyonkim
orcid: 0009-0007-3062-4681
email: seohyon.l.kim@gmail.com
- name: Wenjia Zhong
roles: [ "author", "maintainer" ]
info:
github: Wenjia218
orcid: 0009-0009-1594-8009
email: wenjia.zhong@tum.de
- name: Luisa Katharina Bender
roles: [ "author", "maintainer" ]
info:
github: luisabender
orcid: 0009-0001-8753-7307
email: luisa.bender@tum.de
- name: Florian Röckl
roles: [ "author", "maintainer" ]
info:
github: floro5
orcid: 0009-0009-6050-890X
email: florian.roeckl@tum.de
- name: Jonathan Unger
roles: [ "author", "maintainer" ]
# Additional information on the author
info:
github: johndoe
orcid: 0000-0000-0000-0000
email: john@doe.me
twitter: johndoe
linkedin: johndoe
github: Jonique02
orcid: 0009-0009-5022-2975
email: jonathan.unger@tum.de

# Step 7: Remove all of the comments of the steps you completed

Expand Down
14 changes: 5 additions & 9 deletions src/api/comp_control_method.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ info:
type: control_method
type_info:
label: Control Method
summary: Quality control methods for verifying the pipeline.
summary: Quality control methods for verifying the pipeline of the spatial TI task.
description: |
This folder contains control components for the task.
These components have the same interface as the regular methods
Expand All @@ -12,12 +12,8 @@ info:
the task, and also as a quality control for the metrics defined
in the task.
arguments:
- name: --input_train
__merge__: file_train.yaml
required: true
direction: input
- name: --input_test
__merge__: file_test.yaml
- name: --dataset
__merge__: file_dataset.yaml
required: true
direction: input
- name: "--input_solution"
Expand All @@ -33,5 +29,5 @@ test_resources:
path: /common/component_tests/run_and_check_output.py
- type: python_script
path: /common/component_tests/check_config.py
- path: /resources_test/task_template/cxg_mouse_pancreas_atlas
dest: resources_test/task_template/cxg_mouse_pancreas_atlas
- path: /resources_test/common/cxg_mouse_pancreas_atlas
dest: resources_test/common/cxg_mouse_pancreas_atlas
12 changes: 4 additions & 8 deletions src/api/comp_data_processor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,16 @@ info:
type: data_processor
type_info:
label: Data processor
summary: A data processor.
description: |
summary: A data processor for the spatial TI task.
description: | # better description TODO
A component for processing a Common Dataset into a task-specific dataset.
arguments:
- name: "--input"
__merge__: file_common_dataset.yaml
direction: input
required: true
- name: "--output_train"
__merge__: file_train.yaml
direction: output
required: true
- name: "--output_test"
__merge__: file_test.yaml
- name: "--output_dataset"
__merge__: file_dataset.yaml
direction: output
required: true
- name: "--output_solution"
Expand Down
14 changes: 5 additions & 9 deletions src/api/comp_method.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@ info:
label: Method
summary: A method.
description: |
A method to predict the task effects.
A method for the spatial TI task.
arguments:
- name: --input_train
__merge__: file_train.yaml
- name: --input
__merge__: file_dataset.yaml
required: true
direction: input
- name: "--input_test"
__merge__: file_test.yaml
direction: input
required: true
- name: --output
__merge__: file_prediction.yaml
required: true
Expand All @@ -24,5 +20,5 @@ test_resources:
path: /common/component_tests/run_and_check_output.py
- type: python_script
path: /common/component_tests/check_config.py
- path: /resources_test/task_template/cxg_mouse_pancreas_atlas
dest: resources_test/task_template/cxg_mouse_pancreas_atlas
- path: /resources_test/common/cxg_mouse_pancreas_atlas
dest: resources_test/common/cxg_mouse_pancreas_atlas
8 changes: 4 additions & 4 deletions src/api/comp_metric.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ info:
type: metric
type_info:
label: Metric
summary: A task template metric.
summary: A metric for spatial TI task.
description: |
A metric for evaluating method predictions.
A metric for evaluating spatial TI method predictions.
arguments:
- name: "--input_solution"
__merge__: file_solution.yaml
Expand All @@ -24,5 +24,5 @@ test_resources:
path: /common/component_tests/run_and_check_output.py
- type: python_script
path: /common/component_tests/check_config.py
- path: /resources_test/task_template/cxg_mouse_pancreas_atlas
dest: resources_test/task_template/cxg_mouse_pancreas_atlas
- path: /resources_test/common/cxg_mouse_pancreas_atlas
dest: resources_test/common/cxg_mouse_pancreas_atlas
21 changes: 12 additions & 9 deletions src/api/file_train.yaml → src/api/file_dataset.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
#TODO: Change to the required and/or optional fields of the anndata
type: file
example: "resources_test/task_template/cxg_mouse_pancreas_atlas/train.h5ad"
label: "Training data"
summary: "The training data in h5ad format"
example: "resources_test/task_spatial_trajectory_inference/cxg_mouse_pancreas_atlas/dataset.h5ad"
label: "Input data"
summary: "The input data for the spatial TI methods"
info:
format:
type: h5ad
layers:
layers:
- type: integer
name: counts
description: Raw counts
required: true
- type: double
name: normalized
description: Normalized counts
description: Normalized expression values
required: true
obs:
- type: string
name: label
description: Ground truth cell type labels
name: cell_type
description: Cell type information
required: true
- type: string
name: batch
Expand All @@ -34,6 +33,10 @@ info:
description: A ranking of the features by hvg.
required: true
obsm:
- type: double
name: X_spatial
description: Spatial coordinates of each cell/spot.
required: true
- type: double
name: X_pca
description: The resulting PCA embedding.
Expand All @@ -46,4 +49,4 @@ info:
- type: string
name: normalization_id
description: "Which normalization was used"
required: true
required: true
32 changes: 13 additions & 19 deletions src/api/file_solution.yaml
Original file line number Diff line number Diff line change
@@ -1,42 +1,32 @@
#TODO: Change to the required and/or optional fields of the anndata
type: file
example: "resources_test/task_template/cxg_mouse_pancreas_atlas/solution.h5ad"
example: "resources_test/task_spatial_trajectory_inference/cxg_mouse_pancreas_atlas/solution.h5ad"
label: "Solution"
summary: "The solution for the test data"
summary: "The solution (ground truth) for the test data"
info:
format:
type: h5ad
layers:
layers:
- type: integer
name: counts
description: Raw counts
required: true
- type: double
name: normalized
description: Normalized counts
required: true
obs:
- type: string
name: label
description: Ground truth cell type labels
name: cell_type
description: Cell type information
required: true
- type: string
name: batch
description: Batch information
required: true
var:
- type: boolean
name: hvg
description: Whether or not the feature is considered to be a 'highly variable gene'
required: true
- type: double
name: hvg_score
description: A ranking of the features by hvg.
name: pseudotime_true
description: Ground truth pseudotime for each cell/spot.
required: true
obsm:
- type: double
name: X_pca
description: The resulting PCA embedding.
name: X_spatial
description: Spatial coordinates of each cell/spot.
required: true
uns:
- type: string
Expand Down Expand Up @@ -71,3 +61,7 @@ info:
name: normalization_id
description: "Which normalization was used"
required: true
- type: dataframe
name: marker_genes
description: "Marker genes per biological state, with expected ordering along the trajectory (columns: gene_name, biological_state, expected_order). Used by marker-based metrics when provided."
required: false
Loading
Loading