From b99d9f4c2d75366c3e4b3d91ce351a1b1dccbb79 Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Tue, 28 Jan 2025 16:42:14 -0800 Subject: [PATCH 1/7] initial commit to add new cohorts --- .dockerignore | 4 ++++ .gitignore | 4 ++++ geniesp/__main__.py | 28 ++++++++++++++++++++++------ geniesp/bpc_config.py | 32 ++++++++++++++++++++++++++++++++ main.nf | 2 +- nextflow.config | 2 +- 6 files changed, 64 insertions(+), 8 deletions(-) diff --git a/.dockerignore b/.dockerignore index eacf961..37c7cbe 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,9 +1,13 @@ BLADDER/ BrCa/ CRC/ +ESOPHAGO/ +MELANOMA/ NSCLC/ +OVARIAN/ PANC/ Prostate/ +RENAL/ AKT1/ ERBB2/ FGFR4/ diff --git a/.gitignore b/.gitignore index 13a1e46..7d9d1a5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,13 @@ cbioportal BLADDER/ BrCa/ CRC/ +ESOPHAGO/ +MELANOMA/ NSCLC/ +OVARIAN/ PANC/ Prostate/ +RENAL/ AKT1/ ERBB2/ FGFR4/ diff --git a/geniesp/__main__.py b/geniesp/__main__.py index db8f3f3..dfec108 100644 --- a/geniesp/__main__.py +++ b/geniesp/__main__.py @@ -1,10 +1,22 @@ """GENIE SP/BPC cBioPortal exporter CLI""" + import argparse import logging import synapseclient -from .bpc_config import Brca, Crc, Nsclc, Panc, Prostate, Bladder +from .bpc_config import ( + Brca, + Crc, + Nsclc, + Panc, + Prostate, + Bladder, + Renal, + Ovarian, + Melanoma, + Esophago, +) from .sp_config import Akt1, Erbb2, Fgfr4 BPC_MAPPING = { @@ -17,6 +29,10 @@ "AKT1": Akt1, "ERRB2": Erbb2, "FGFR4": Fgfr4, + "RENAL": Renal, + "OVARIAN": Ovarian, + "MELANOMA": Melanoma, + "ESOPHAGO": Esophago, } @@ -75,11 +91,11 @@ def main(): BPC_MAPPING[args.sp]( syn, - cbiopath, - release=args.release, - upload=args.upload, - production = args.production, - use_grs = args.use_grs + cbiopath, + release=args.release, + upload=args.upload, + production=args.production, + use_grs=args.use_grs, ).run() diff --git a/geniesp/bpc_config.py b/geniesp/bpc_config.py index c9b7a99..43a07cf 100644 --- a/geniesp/bpc_config.py +++ b/geniesp/bpc_config.py @@ -56,3 +56,35 @@ class Bladder(BpcProjectRunner): # Sponsored project name _SPONSORED_PROJECT = "BLADDER" _exclude_files = ["data_timeline_labtest.txt"] + + +class Renal(BpcProjectRunner): + """RENAL BPC sponsored project""" + + # Sponsored project name + _SPONSORED_PROJECT = "RENAL" + _exclude_files = [] + + +class Ovarian(BpcProjectRunner): + """OVARIAN BPC sponsored project""" + + # Sponsored project name + _SPONSORED_PROJECT = "OVARIAN" + _exclude_files = [] + + +class Melanoma(BpcProjectRunner): + """MELANOMA BPC sponsored project""" + + # Sponsored project name + _SPONSORED_PROJECT = "MELANOMA" + _exclude_files = [] + + +class Esophago(BpcProjectRunner): + """ESOPHAGO BPC sponsored project""" + + # Sponsored project name + _SPONSORED_PROJECT = "ESOPHAGO" + _exclude_files = [] diff --git a/main.nf b/main.nf index 1e9e0ec..8b335f7 100644 --- a/main.nf +++ b/main.nf @@ -56,7 +56,7 @@ workflow { params.use_grs = false // Check if cohort is part of allowed cohort list - def allowed_cohorts = ["BLADDER", "BrCa", "CRC", "NSCLC", "PANC", "Prostate"] + def allowed_cohorts = ["BLADDER", "BrCa", "CRC", "ESOPHAGO", "MELANOMA", "NSCLC", "OVARIAN", "PANC", "Prostate", "RENAL"] if (!allowed_cohorts.contains(params.cohort)) {exit 1, 'Invalid cohort name'} ch_cohort = Channel.value(params.cohort) diff --git a/nextflow.config b/nextflow.config index 5f065b2..9aece04 100644 --- a/nextflow.config +++ b/nextflow.config @@ -1,4 +1,4 @@ -env.cohorts = 'BLADDER BrCa CRC NSCLC PANC Prostate' +env.cohorts = 'BLADDER BrCa CRC ESOPHAGO MELANOMA NSCLC OVARIAN PANC Prostate RENAL' docker.enabled = true manifest { From 83376e68671b6217f582d65da16546647d5941a2 Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Wed, 29 Jan 2025 18:12:54 -0800 Subject: [PATCH 2/7] add feature branch specific docker --- .github/workflows/build-docker-images.yml | 45 +++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/build-docker-images.yml diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml new file mode 100644 index 0000000..c53d592 --- /dev/null +++ b/.github/workflows/build-docker-images.yml @@ -0,0 +1,45 @@ +name: Build and Push Docker Images + +on: + push: + branches: [develop, 'GEN*', 'gen*'] + paths: + - 'geniesp/**' + - '.github/workflows/build-docker-images.yml' + workflow_dispatch: + +jobs: + build_references_docker: + runs-on: ubuntu-latest + env: + REGISTRY: ghcr.io + IMAGE_NAME: sage-bionetworks/genie-sponsored-projects + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Setup Docker buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and Push Docker Image for geniesp + uses: docker/build-push-action@v5 + with: + context: geniesp + push: true + tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} + cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}-cache + cache-to: type=inline,mode=max + From 24c9047c3039bd3495c6149cd5d3cf954d6763e8 Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Wed, 29 Jan 2025 18:13:50 -0800 Subject: [PATCH 3/7] fix context --- .github/workflows/build-docker-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index c53d592..be3583c 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -37,7 +37,7 @@ jobs: - name: Build and Push Docker Image for geniesp uses: docker/build-push-action@v5 with: - context: geniesp + context: . push: true tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}-cache From 38024865d716d2fac9045d60949bbbf130cfa25f Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Wed, 29 Jan 2025 18:17:13 -0800 Subject: [PATCH 4/7] change name --- .github/workflows/build-docker-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index be3583c..05054d9 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -9,7 +9,7 @@ on: workflow_dispatch: jobs: - build_references_docker: + build_docker: runs-on: ubuntu-latest env: REGISTRY: ghcr.io From 05d3513d8e1beb0e7e227e272a4e90efa4b756ce Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Wed, 29 Jan 2025 19:02:46 -0800 Subject: [PATCH 5/7] add geniesp_docker as param --- main.nf | 2 +- nextflow.config | 3 +++ nextflow_schema.json | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/main.nf b/main.nf index 8b335f7..1df25b0 100644 --- a/main.nf +++ b/main.nf @@ -5,7 +5,7 @@ nextflow.enable.dsl=2 Run cBioPortal Export */ process cBioPortalExport { - container 'sagebionetworks/geniesp' + container "$params.geniesp_docker" secret 'SYNAPSE_AUTH_TOKEN' input: diff --git a/nextflow.config b/nextflow.config index 9aece04..2ece922 100644 --- a/nextflow.config +++ b/nextflow.config @@ -20,3 +20,6 @@ profiles { } } } +params { + geniesp_docker = "sagebionetworks/geniesp" +} diff --git a/nextflow_schema.json b/nextflow_schema.json index 6338bf0..20632d4 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -53,6 +53,10 @@ false ] }, + "geniesp_docker":{ + "type": "string", + "description": "Name of docker to use for release process in geniesp" + }, "help": { "type": "boolean", "description": "Display input options and descriptions", From 026504931d9cc46cc225ef3776dd89a0434b9bf1 Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Wed, 29 Jan 2025 19:14:30 -0800 Subject: [PATCH 6/7] update readme --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8e7bd1d..f9f8268 100644 --- a/README.md +++ b/README.md @@ -44,12 +44,12 @@ Output will be as follows ``` usage: geniesp [-h] [--staging] - {NSCLC,CRC,BrCa,PANC,Prostate,AKT1,ERRB2,FGFR4} release + {NSCLC,CRC,BrCa,PANC,Prostate,AKT1,ERRB2,FGFR4,ESOPHAGO,MELANOMA,OVARIAN,RENAL} release Run GENIE sponsored projects positional arguments: - {NSCLC,CRC,BrCa,PANC,Prostate,AKT1,ERRB2,FGFR4} + {NSCLC,CRC,BrCa,PANC,Prostate,AKT1,ERRB2,FGFR4,ESOPHAGO,MELANOMA,OVARIAN,RENAL} Specify project to run release Specify bpc release (e.g. 1.1-consortium) @@ -97,7 +97,7 @@ python validate_map.py -h which outputs: ``` -usage: validate_map.py [-h] [--synapse_id SYNAPSE_ID | --file FILE] [--version VERSION] [--cohort {BLADDER,BRCA,CRC,NSCLC,PANC,PROSTATE}] +usage: validate_map.py [-h] [--synapse_id SYNAPSE_ID | --file FILE] [--version VERSION] [--cohort COHORT] [--release {1.1-consortium,1.2-consortium,2.0-public,2.1-consortium}] [--outfile OUTFILE] [--log {debug,info,warning,error}] Checks validity of BPC to cBioPortal mapping file @@ -109,7 +109,7 @@ optional arguments: --file FILE, -f FILE Local path to mapping file --version VERSION, -v VERSION Synapse entity version number (default: current) - --cohort {BLADDER,BRCA,CRC,NSCLC,PANC,PROSTATE}, -c {BLADDER,BRCA,CRC,NSCLC,PANC,PROSTATE} + --cohort COHORT, -c COHORT BPC cohort label (default: BLADDER) --release {1.1-consortium,1.2-consortium,2.0-public,2.1-consortium}, -r {1.1-consortium,1.2-consortium,2.0-public,2.1-consortium} Release label (default: 1.1-consortium) From 4fcb8448bf69f84031bb2e8124abb9fb407f5c75 Mon Sep 17 00:00:00 2001 From: rxu17 <26471741+rxu17@users.noreply.github.com> Date: Thu, 30 Jan 2025 16:39:14 -0800 Subject: [PATCH 7/7] ignore md files --- .github/workflows/build-docker-images.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-docker-images.yml b/.github/workflows/build-docker-images.yml index 05054d9..bdc1bdb 100644 --- a/.github/workflows/build-docker-images.yml +++ b/.github/workflows/build-docker-images.yml @@ -3,9 +3,8 @@ name: Build and Push Docker Images on: push: branches: [develop, 'GEN*', 'gen*'] - paths: - - 'geniesp/**' - - '.github/workflows/build-docker-images.yml' + paths-ignore: + - '**.md' workflow_dispatch: jobs: