From 86f3f6d847306eb7835b0fd3a160b5cee40b2530 Mon Sep 17 00:00:00 2001 From: Magnus Wahlberg Date: Fri, 9 Feb 2024 11:36:38 +0100 Subject: [PATCH 1/4] Update github actions to node v20 Node.js 16 actions are deprecated --- .github/workflows/autoblack_pull_request.yml | 4 +-- .github/workflows/docs-tests.yml | 4 +-- .github/workflows/github-actions.yml | 28 ++++++++++---------- .github/workflows/test-runner.yml | 8 +++--- 4 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/autoblack_pull_request.yml b/.github/workflows/autoblack_pull_request.yml index 2936e248..ddbe8766 100644 --- a/.github/workflows/autoblack_pull_request.yml +++ b/.github/workflows/autoblack_pull_request.yml @@ -9,10 +9,10 @@ jobs: black-code: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{ github.head_ref }} - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: '3.11' - run: pip install black diff --git a/.github/workflows/docs-tests.yml b/.github/workflows/docs-tests.yml index c028c44d..a87f84fa 100644 --- a/.github/workflows/docs-tests.yml +++ b/.github/workflows/docs-tests.yml @@ -8,7 +8,7 @@ jobs: docs-build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ammaraskar/sphinx-action@0.4 with: docs-folder: "docs/" @@ -16,7 +16,7 @@ jobs: docs-link-check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ammaraskar/sphinx-action@0.4 with: docs-folder: "docs/" diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 5b3ff8a6..65ad7bbb 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -7,8 +7,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository code - uses: actions/checkout@v3 - - uses: mamba-org/setup-micromamba@v1.4.3 + uses: actions/checkout@v4 + - uses: mamba-org/setup-micromamba@v1.8.0 with: environment-name: deeprvat-gh-action environment-file: ${{ github.workspace }}/deeprvat_env_no_gpu.yml @@ -41,8 +41,8 @@ jobs: needs: DeepRVAT-Pipeline-Smoke-Tests steps: - name: Check out repository code - uses: actions/checkout@v3 - - uses: mamba-org/setup-micromamba@v1.4.3 + uses: actions/checkout@v4 + - uses: mamba-org/setup-micromamba@v1.8.0 with: environment-name: deeprvat-gh-action environment-file: ${{ github.workspace }}/deeprvat_env_no_gpu.yml @@ -82,8 +82,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository code - uses: actions/checkout@v3 - - uses: mamba-org/setup-micromamba@v1.4.3 + uses: actions/checkout@v4 + - uses: mamba-org/setup-micromamba@v1.8.0 with: environment-name: deeprvat-preprocess-gh-action environment-file: ${{ github.workspace }}/deeprvat_preprocessing_env.yml @@ -115,8 +115,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository code - uses: actions/checkout@v3 - - uses: mamba-org/setup-micromamba@v1.4.3 + uses: actions/checkout@v4 + - uses: mamba-org/setup-micromamba@v1.8.0 with: environment-name: deeprvat-preprocess-gh-action environment-file: ${{ github.workspace }}/deeprvat_preprocessing_env.yml @@ -135,8 +135,8 @@ jobs: needs: DeepRVAT-Preprocessing-Pipeline-Smoke-Tests steps: - name: Check out repository code - uses: actions/checkout@v3 - - uses: mamba-org/setup-micromamba@v1.4.3 + uses: actions/checkout@v4 + - uses: mamba-org/setup-micromamba@v1.8.0 with: environment-name: deeprvat-preprocess-gh-action environment-file: ${{ github.workspace }}/deeprvat_preprocessing_env.yml @@ -149,7 +149,7 @@ jobs: - name: Cache Fasta file id: cache-fasta - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: example/preprocess/workdir/reference key: ${{ runner.os }}-reference-fasta @@ -176,8 +176,8 @@ jobs: steps: - name: Check out repository code - uses: actions/checkout@v3 - - uses: mamba-org/setup-micromamba@v1.4.3 + uses: actions/checkout@v4 + - uses: mamba-org/setup-micromamba@v1.8.0 with: environment-name: deeprvat-preprocess-gh-action environment-file: ${{ github.workspace }}/deeprvat_preprocessing_env.yml @@ -190,7 +190,7 @@ jobs: - name: Cache Fasta file id: cache-fasta - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: example/preprocess/workdir/reference key: ${{ runner.os }}-reference-fasta diff --git a/.github/workflows/test-runner.yml b/.github/workflows/test-runner.yml index 4decca6b..02b59ac0 100644 --- a/.github/workflows/test-runner.yml +++ b/.github/workflows/test-runner.yml @@ -7,8 +7,8 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository code - uses: actions/checkout@v3 - - uses: mamba-org/setup-micromamba@v1.4.3 + uses: actions/checkout@v4 + - uses: mamba-org/setup-micromamba@v1.8.0 with: environment-name: deeprvat-preprocess-gh-action environment-file: ${{ github.workspace }}/deeprvat_env_no_gpu.yml @@ -27,8 +27,8 @@ jobs: steps: - name: Check out repository code - uses: actions/checkout@v3 - - uses: mamba-org/setup-micromamba@v1.4.3 + uses: actions/checkout@v4 + - uses: mamba-org/setup-micromamba@v1.8.0 with: environment-name: deeprvat-preprocess-gh-action environment-file: ${{ github.workspace }}/deeprvat_preprocessing_env.yml From dfe6c5a2d0f623a63c29975c1d151040896f4f63 Mon Sep 17 00:00:00 2001 From: PMBio Date: Fri, 9 Feb 2024 10:39:45 +0000 Subject: [PATCH 2/4] fixup! Format Python code with psf/black pull_request --- deeprvat/deeprvat/evaluate.py | 8 +++++--- deeprvat/seed_gene_discovery/seed_gene_discovery.py | 12 ++++++------ 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/deeprvat/deeprvat/evaluate.py b/deeprvat/deeprvat/evaluate.py index f3b3e4ff..4e671da6 100644 --- a/deeprvat/deeprvat/evaluate.py +++ b/deeprvat/deeprvat/evaluate.py @@ -162,9 +162,11 @@ def get_pvals(results, method_mapping=None, phenotype_mapping={}): if phenotype_mapping is not None: pvals["phenotype"] = pvals["phenotype"].apply( - lambda x: phenotype_mapping[x] - if x in phenotype_mapping - else " ".join(x.split("_")) + lambda x: ( + phenotype_mapping[x] + if x in phenotype_mapping + else " ".join(x.split("_")) + ) ) return pvals diff --git a/deeprvat/seed_gene_discovery/seed_gene_discovery.py b/deeprvat/seed_gene_discovery/seed_gene_discovery.py index bd9c6781..cc7e69b5 100644 --- a/deeprvat/seed_gene_discovery/seed_gene_discovery.py +++ b/deeprvat/seed_gene_discovery/seed_gene_discovery.py @@ -495,9 +495,9 @@ def update_config( if variant_type is not None: logger.info(f"Variant type is {variant_type}") if variant_type == "missense": - rare_threshold_config[ - "Consequence_missense_variant" - ] = "Consequence_missense_variant == 1" + rare_threshold_config["Consequence_missense_variant"] = ( + "Consequence_missense_variant == 1" + ) elif variant_type == "plof": rare_threshold_config["is_plof"] = "is_plof == 1" elif variant_type == "all": @@ -517,9 +517,9 @@ def update_config( if rare_maf is not None: logger.info(f"setting association testing maf to {rare_maf}") config["data"]["dataset_config"]["min_common_af"][maf_column] = rare_maf - rare_threshold_config[ - maf_column - ] = f"{maf_column} < {rare_maf} and {maf_column} > 0" + rare_threshold_config[maf_column] = ( + f"{maf_column} < {rare_maf} and {maf_column} > 0" + ) logger.info(f"Rare variant thresholds: {rare_threshold_config}") with open(new_config_file, "w") as f: From d1ad59e5a4949b28fcd67acaad981cc525602c35 Mon Sep 17 00:00:00 2001 From: Magnus Wahlberg Date: Fri, 9 Feb 2024 11:47:22 +0100 Subject: [PATCH 3/4] add pr to test actions --- .github/workflows/github-actions.yml | 2 +- .github/workflows/test-runner.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index 65ad7bbb..ec600d51 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -1,6 +1,6 @@ name: DeepRVAT run-name: DeepRVAT ๐Ÿงฌ๐Ÿงช๐Ÿ’ป๐Ÿง‘โ€๐Ÿ”ฌ -on: [ push ] +on: [ push, pull_request ] jobs: DeepRVAT-Pipeline-Smoke-Tests: diff --git a/.github/workflows/test-runner.yml b/.github/workflows/test-runner.yml index 02b59ac0..135c4abf 100644 --- a/.github/workflows/test-runner.yml +++ b/.github/workflows/test-runner.yml @@ -1,6 +1,6 @@ name: DeepRVAT test runner run-name: DeepRVAT Tests ๐Ÿง‘๐Ÿผโ€๐Ÿ’ปโœ… -on: [ push ] +on: [ push, pull_request ] jobs: DeepRVAT-Tests-Runner: From d77d8dabc0ae040501df9ca705bf141c6d4495b5 Mon Sep 17 00:00:00 2001 From: Magnus Wahlberg Date: Fri, 9 Feb 2024 12:02:46 +0100 Subject: [PATCH 4/4] Revert on pr --- .github/workflows/github-actions.yml | 2 +- .github/workflows/test-runner.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml index ec600d51..65ad7bbb 100644 --- a/.github/workflows/github-actions.yml +++ b/.github/workflows/github-actions.yml @@ -1,6 +1,6 @@ name: DeepRVAT run-name: DeepRVAT ๐Ÿงฌ๐Ÿงช๐Ÿ’ป๐Ÿง‘โ€๐Ÿ”ฌ -on: [ push, pull_request ] +on: [ push ] jobs: DeepRVAT-Pipeline-Smoke-Tests: diff --git a/.github/workflows/test-runner.yml b/.github/workflows/test-runner.yml index 135c4abf..02b59ac0 100644 --- a/.github/workflows/test-runner.yml +++ b/.github/workflows/test-runner.yml @@ -1,6 +1,6 @@ name: DeepRVAT test runner run-name: DeepRVAT Tests ๐Ÿง‘๐Ÿผโ€๐Ÿ’ปโœ… -on: [ push, pull_request ] +on: [ push ] jobs: DeepRVAT-Tests-Runner: