Skip to content

Commit

Permalink
add viash template
Browse files Browse the repository at this point in the history
  • Loading branch information
rcannood committed Aug 26, 2024
1 parent 6d5c099 commit d11e850
Show file tree
Hide file tree
Showing 63 changed files with 1,704 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: [bug]
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: true
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: [enhancement]
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Describe your changes

<!-- Describe your changes -->

## Checklist before requesting a review
- [ ] I have performed a self-review of my code

- Check the correct box. Does this PR contain:
- [ ] Breaking changes
- [ ] New functionality
- [ ] Major changes
- [ ] Minor changes
- [ ] Bug fixes

- [ ] Proposed changes are described in the CHANGELOG.md

- [ ] CI Tests succeed and look good!
11 changes: 11 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Test

on:
push:
branches:
- main
pull_request:

jobs:
build:
uses: viash-io/viash-actions/.github/workflows/test.yaml@v6
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ temp/
dependency.png
envs/src/
singularity_container/

target
.nextflow
.resources_test
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "common"]
path = common
url = [email protected]:openproblems-bio/common_resources.git
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# task_template x.y.z

## 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).

## MINOR CHANGES

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

## BUGFIXES

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Open Problems in Single-Cell Analysis

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
87 changes: 87 additions & 0 deletions _viash.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
viash_version: 0.9.0-RC7

# Step 1: Change the name of the task.
# example: task_name_of_this_task
name: task_preprocessing_imagingbased_st
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.
links:
issue_tracker: https://github.com/openproblems-bio/task_preprocessing_imagingbased_st/issues
repository: https://github.com/openproblems-bio/task_preprocessing_imagingbased_st
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.
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.
# A list of references to relevant literature. Each reference should be a DOI or a bibtex entry
references:
doi:
- 10.21203/rs.3.rs-4181617/v1
# bibtex:
# - |
# @article{doe_2021_template,
# doi = {10.21203/rs.3.rs-4181617/v1},
# url = {https://doi.org/10.21203/rs.3.rs-4181617/v1},
# author = {Doe, John},
# title = {A template for creating new tasks},
# publisher = {Research Square},
# year = {2021},
# }

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/task_template/
dest: resources_test/task_template
- type: s3
path: s3://openproblems-data/resources_test/common/
dest: resources_test/common

# 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.).
roles: [ "author", "maintainer" ]
# Additional information on the author
info:
github: johndoe
orcid: 0000-0000-0000-0000
email: [email protected]
twitter: johndoe
linkedin: johndoe

# Step 7: Remove all of the comments of the steps you completed
# Step 8: High five yourself!

config_mods: |
.runners[.type == "nextflow"].config.labels := { lowmem : "memory = 20.Gb", midmem : "memory = 50.Gb", highmem : "memory = 100.Gb", lowcpu : "cpus = 5", midcpu : "cpus = 15", highcpu : "cpus = 30", lowtime : "time = 1.h", midtime : "time = 4.h", hightime : "time = 8.h", veryhightime : "time = 24.h" }
repositories:
- name: openproblems-v2
type: github
repo: openproblems-bio/openproblems-v2
tag: main_build
1 change: 1 addition & 0 deletions common
Submodule common added at 67ef96
3 changes: 3 additions & 0 deletions main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
workflow {
print("This is a dummy placeholder for pipeline execution. Please use the corresponding nf files for running pipelines.")
}
1 change: 1 addition & 0 deletions nextflow.config
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
process.container = 'nextflow/bash:latest'
3 changes: 3 additions & 0 deletions scripts/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
add_a_method.sh
add_a_control_method.sh
add_a_metric.sh
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
37 changes: 37 additions & 0 deletions src/api/comp_control_method.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
namespace: control_methods
info:
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
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_train
__merge__: file_train_h5ad.yaml
required: true
direction: input
- name: --input_test
__merge__: file_test_h5ad.yaml
required: true
direction: input
- name: "--input_solution"
__merge__: file_solution.yaml
direction: input
required: true
- name: --output
__merge__: file_prediction.yaml
required: true
direction: output
test_resources:
- type: python_script
path: /common/component_tests/run_and_check_output.py
- type: python_script
path: /common/component_tests/check_config.py
- path: /resources_test/task_template/pancreas
dest: resources_test/task_template/pancreas
31 changes: 31 additions & 0 deletions src/api/comp_data_processor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
namespace: "data_processors"
info:
type: data_processor
type_info:
label: Data processor
summary: A data processor.
description: |
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_h5ad.yaml
direction: output
required: true
- name: "--output_test"
__merge__: file_test_h5ad.yaml
direction: output
required: true
- name: "--output_solution"
__merge__: file_solution.yaml
direction: output
required: true
test_resources:
- path: /resources_test/common/pancreas
dest: resources_test/common/pancreas
- type: python_script
path: /common/component_tests/run_and_check_output.py

28 changes: 28 additions & 0 deletions src/api/comp_method.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
namespace: "methods"
info:
type: method
type_info:
label: Method
summary: A method.
description: |
A method to predict the task effects.
arguments:
- name: --input_train
__merge__: file_train_h5ad.yaml
required: true
direction: input
- name: "--input_test"
__merge__: file_test_h5ad.yaml
direction: input
required: true
- name: --output
__merge__: file_prediction.yaml
required: true
direction: output
test_resources:
- type: python_script
path: /common/component_tests/run_and_check_output.py
- type: python_script
path: /common/component_tests/check_config.py
- path: /resources_test/task_template/pancreas
dest: resources_test/task_template/pancreas
28 changes: 28 additions & 0 deletions src/api/comp_metric.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
namespace: "metrics"
info:
type: metric
type_info:
label: Metric
summary: A task template metric.
description: |
A metric for evaluating method predictions.
arguments:
- name: "--input_solution"
__merge__: file_solution.yaml
direction: input
required: true
- name: "--input_prediction"
__merge__: file_prediction.yaml
direction: input
required: true
- name: "--output"
__merge__: file_score.yaml
direction: output
required: true
test_resources:
- type: python_script
path: /common/component_tests/run_and_check_output.py
- type: python_script
path: /common/component_tests/check_config.py
- path: /resources_test/task_template/pancreas
dest: resources_test/task_template/pancreas
Loading

0 comments on commit d11e850

Please sign in to comment.