Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GEN-1615] Add new cohorts #148

Merged
merged 7 commits into from
Feb 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
BLADDER/
BrCa/
CRC/
ESOPHAGO/
MELANOMA/
NSCLC/
OVARIAN/
PANC/
Prostate/
RENAL/
AKT1/
ERBB2/
FGFR4/
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/build-docker-images.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, one day we will be able to deprecate dockerhub completely...

Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and Push Docker Images

on:
push:
branches: [develop, 'GEN*', 'gen*']
paths-ignore:
- '**.md'
workflow_dispatch:

jobs:
build_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: .
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

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ cbioportal
BLADDER/
BrCa/
CRC/
ESOPHAGO/
MELANOMA/
NSCLC/
OVARIAN/
PANC/
Prostate/
RENAL/
AKT1/
ERBB2/
FGFR4/
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down
28 changes: 22 additions & 6 deletions geniesp/__main__.py
Original file line number Diff line number Diff line change
@@ -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 = {
Expand All @@ -17,6 +29,10 @@
"AKT1": Akt1,
"ERRB2": Erbb2,
"FGFR4": Fgfr4,
"RENAL": Renal,
"OVARIAN": Ovarian,
"MELANOMA": Melanoma,
"ESOPHAGO": Esophago,
}


Expand Down Expand Up @@ -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()


Expand Down
32 changes: 32 additions & 0 deletions geniesp/bpc_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
4 changes: 2 additions & 2 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -20,3 +20,6 @@ profiles {
}
}
}
params {
geniesp_docker = "sagebionetworks/geniesp"
}
4 changes: 4 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down