Skip to content

Commit

Permalink
fixed, working now when ran as a script, not as part of viash
Browse files Browse the repository at this point in the history
  • Loading branch information
ricomnl committed May 4, 2024
1 parent d505b90 commit 248d5d2
Show file tree
Hide file tree
Showing 6 changed files with 998 additions and 170 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/add_a_method.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ exit 1
scripts/download_resources.sh

# create a new component
method_id="third_place"
method_id="my_method"
method_lang="python" # change this to "r" if need be

viash run src/common/create_component/config.vsh.yaml -- \
Expand Down
41 changes: 1 addition & 40 deletions src/task/methods/third_place/config.vsh.yaml
Original file line number Diff line number Diff line change
@@ -1,69 +1,30 @@
# The API specifies which type of component this is.
# It contains specifications for:
# - The input/output files
# - Common parameters
# - A unit test
__merge__: ../../api/comp_method.yaml

functionality:
# A unique identifier for your component (required).
# Can contain only lowercase letters or underscores.
name: third_place

# Metadata for your component
info:
# A relatively short label, used when rendering visualisations (required)
label: Third Place
# A one sentence summary of how this method works (required). Used when
# rendering summary tables.
summary: "FILL IN: A one sentence summary of this method."
# A multi-line description of how this component works (required). Used
# when rendering reference documentation.
description: |
FILL IN: A (multi-line) description of how this method works.
# Which normalisation method this component prefers to use (required).
preferred_normalization: log_cp10k
# A reference key from the bibtex library at src/common/library.bib (required).
reference: bibtex_reference_key
# URL to the documentation for this method (required).
documentation_url: https://url.to/the/documentation
# URL to the code repository for this method (required).
repository_url: https://github.com/organisation/repository

# Component-specific parameters (optional)
# arguments:
# - name: "--n_neighbors"
# type: "integer"
# default: 5
# description: Number of neighbors to use.

# Resources required to run the component
resources:
# The script of your component (required)
- type: python_script
path: script.py
- path: single_cell_perturbations/util.py
- path: single_cell_perturbations/models.py
- path: single_cell_perturbations/config/params_stage_1.py
- path: single_cell_perturbations/config/params_stage_2.py
- path: single_cell_perturbations/models/simple/model_7/model_7_0.keras
# Additional resources your script needs (optional)
# - type: file
# path: weights.pt
- path: submission(14).csv

platforms:
# Specifications for the Docker image for this component.
- type: docker
image: ghcr.io/openproblems-bio/base_python:1.0.4
# Add custom dependencies here (optional). For more information, see
# https://viash.io/reference/config/platforms/docker/#setup .
setup:
- type: python
packages: [ tensorflow==2.12.0, numpy==1.23.5, pandas==2.0.3, matplotlib==3.7.2, scikit-learn==1.3.2, pyarrow==13.0.0, fastparquet ]

# This platform allows running the component natively
- type: native
# Allows turning the component into a Nextflow module / pipeline.
- type: nextflow
directives:
label: [midtime,midmem,midcpu]
Loading

0 comments on commit 248d5d2

Please sign in to comment.