diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 58a6b451..1692db7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,8 +5,11 @@ on: branches: [ 'main' ] workflow_dispatch: inputs: + target_branch: + description: 'Branch to deploy to. If not specified, `build/${BRANCH_NAME}` will be used.' + required: false version: - description: 'Version name to use for the build. If not specified, `${BRANCH_NAME}_build` will be used.' + description: 'Version name to use for the build. If not specified, `build/${BRANCH_NAME}` will be used.' required: false jobs: @@ -15,7 +18,8 @@ jobs: runs-on: ubuntu-latest outputs: - version: ${{ steps.version.outputs.version }} + target_branch: ${{ steps.defaults.outputs.target_branch }} + version: ${{ steps.defaults.outputs.version }} component_matrix: ${{ steps.set_matrix.outputs.matrix }} steps: @@ -24,13 +28,21 @@ jobs: - uses: viash-io/viash-actions/setup@v5 - name: Determine version tag from branch name - id: version + id: defaults run: | - if [ -z "$INPUT_VERSION" ]; then - echo "version=$(echo $GITHUB_REF | sed 's/refs\/heads\/\(.*\)/\1_build/')" >> $GITHUB_OUTPUT - else - echo "version=$INPUT_VERSION" >> $GITHUB_OUTPUT + BRANCH_NAME=$(echo $GITHUB_REF | sed 's/refs\/heads\///') + + VERSION=${{ github.event.inputs.version }} + if [ -z "$VERSION" ]; then + VERSION="build/$BRANCH_NAME" + fi + echo "version=$VERSION" >> $GITHUB_OUTPUT + + TARGET_BRANCH=${{ github.event.inputs.target_branch }} + if [ -z "$TARGET_BRANCH" ]; then + TARGET_BRANCH="build/$BRANCH_NAME" fi + echo "target_branch=$TARGET_BRANCH" >> $GITHUB_OUTPUT - name: Remove target folder from .gitignore run: | @@ -39,7 +51,7 @@ jobs: - uses: viash-io/viash-actions/ns-build@v5 with: - config_mod: .functionality.version := '${{ steps.version.outputs.version }}' + config_mod: .functionality.version := '${{ steps.defaults.outputs.version }}' parallel: true - name: Deploy to target branch @@ -47,7 +59,7 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: . - publish_branch: ${{ steps.version.outputs.version }} + publish_branch: ${{ steps.defaults.outputs.target_branch }} - id: ns_list uses: viash-io/viash-actions/ns-list@v5 diff --git a/README.md b/README.md index 751e3b15..fea29312 100644 --- a/README.md +++ b/README.md @@ -379,13 +379,12 @@ Arguments: - ## Component type: Method Path: [`src/methods`](https://github.com/openproblems-bio/openproblems-v2/tree/main/src/methods) -A regression method. +A perturbation prediction method Arguments: @@ -406,7 +405,7 @@ Arguments: Path: [`src/metrics`](https://github.com/openproblems-bio/openproblems-v2/tree/main/src/metrics) -A metric to compare two predictions. +A perturbation prediction metric Arguments: diff --git a/src/api/comp_control_method.yaml b/src/api/comp_control_method.yaml index 50f24e77..a334badd 100644 --- a/src/api/comp_control_method.yaml +++ b/src/api/comp_control_method.yaml @@ -6,7 +6,7 @@ functionality: label: Control Method summary: A control method. description: | - A control method to predict perturbation effects. + A control method to serve as a quality control for the perturbation prediction benchmark. arguments: - name: --de_train_h5ad __merge__: file_de_train_h5ad.yaml diff --git a/src/api/comp_method.yaml b/src/api/comp_method.yaml index 91387c75..1d9a45b9 100644 --- a/src/api/comp_method.yaml +++ b/src/api/comp_method.yaml @@ -1,4 +1,4 @@ -__merge__: comp_method_notest.yaml +__merge__: wf_method.yaml functionality: test_resources: - type: python_script diff --git a/src/api/comp_metric.yaml b/src/api/comp_metric.yaml index 537e8fcc..ec7f4f39 100644 --- a/src/api/comp_metric.yaml +++ b/src/api/comp_metric.yaml @@ -4,9 +4,9 @@ functionality: type: metric type_info: label: Metric - summary: A metric to compare two predictions. + summary: A perturbation prediction metric description: | - A metric to compare two predictions. + A metric to compare a perturbation prediction to the ground truth. arguments: - name: --de_test_h5ad __merge__: file_de_test_h5ad.yaml diff --git a/src/api/comp_method_notest.yaml b/src/api/wf_method.yaml similarity index 83% rename from src/api/comp_method_notest.yaml rename to src/api/wf_method.yaml index b1e68ca9..cb9ddde3 100644 --- a/src/api/comp_method_notest.yaml +++ b/src/api/wf_method.yaml @@ -4,9 +4,9 @@ functionality: type: method type_info: label: Method - summary: A regression method. + summary: A perturbation prediction method description: | - A regression method to predict the expression of one modality from another. + A method for predicting the perturbation response of small molecules on certain cell types. arguments: - name: --de_train_h5ad __merge__: file_de_train_h5ad.yaml diff --git a/src/methods/lgc_ensemble/config.vsh.yaml b/src/methods/lgc_ensemble/config.vsh.yaml index 259bdb52..b36a8aa4 100644 --- a/src/methods/lgc_ensemble/config.vsh.yaml +++ b/src/methods/lgc_ensemble/config.vsh.yaml @@ -1,4 +1,4 @@ -__merge__: ../../api/comp_method_notest.yaml +__merge__: ../../api/wf_method.yaml functionality: name: lgc_ensemble diff --git a/src/process_dataset/bootstrap/config.vsh.yaml b/src/process_dataset/bootstrap/config.vsh.yaml index be60adf6..391ddca6 100644 --- a/src/process_dataset/bootstrap/config.vsh.yaml +++ b/src/process_dataset/bootstrap/config.vsh.yaml @@ -5,9 +5,9 @@ functionality: type: process_dataset type_info: label: Bootstrap - summary: A component to generate bootstraps of a dataset. + summary: Bootstrap a dataset description: | - This component generates bootstraps of a dataset. It takes as input a parquet file and an h5ad file and generates bootstraps of the dataset. The bootstraps are saved as parquet and h5ad files. + This component bootstraps a dataset. argument_groups: - name: Inputs arguments: diff --git a/src/process_dataset/clean_pseudobulk/config.vsh.yaml b/src/process_dataset/filter_vars/config.vsh.yaml similarity index 100% rename from src/process_dataset/clean_pseudobulk/config.vsh.yaml rename to src/process_dataset/filter_vars/config.vsh.yaml diff --git a/src/process_dataset/clean_pseudobulk/script.R b/src/process_dataset/filter_vars/script.R similarity index 100% rename from src/process_dataset/clean_pseudobulk/script.R rename to src/process_dataset/filter_vars/script.R diff --git a/src/process_dataset/run_limma/config.vsh.yaml b/src/process_dataset/run_limma/config.vsh.yaml index 9d9ee89e..cd84c852 100644 --- a/src/process_dataset/run_limma/config.vsh.yaml +++ b/src/process_dataset/run_limma/config.vsh.yaml @@ -7,7 +7,7 @@ functionality: label: Limma summary: Run limma description: | - Run limma for the parturbation regression task. + Run limma for the perturbation regression task. arguments: - name: --input type: file