Skip to content

Commit 32858f2

Browse files
authored
[GEN-1615] Add new cohorts (#148)
* initial commit to add new cohorts * add feature branch specific docker * fix context * change name * add geniesp_docker as param * update readme * ignore md files
1 parent 8598268 commit 32858f2

File tree

9 files changed

+120
-13
lines changed

9 files changed

+120
-13
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
BLADDER/
22
BrCa/
33
CRC/
4+
ESOPHAGO/
5+
MELANOMA/
46
NSCLC/
7+
OVARIAN/
58
PANC/
69
Prostate/
10+
RENAL/
711
AKT1/
812
ERBB2/
913
FGFR4/
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build and Push Docker Images
2+
3+
on:
4+
push:
5+
branches: [develop, 'GEN*', 'gen*']
6+
paths-ignore:
7+
- '**.md'
8+
workflow_dispatch:
9+
10+
jobs:
11+
build_docker:
12+
runs-on: ubuntu-latest
13+
env:
14+
REGISTRY: ghcr.io
15+
IMAGE_NAME: sage-bionetworks/genie-sponsored-projects
16+
permissions:
17+
contents: read
18+
packages: write
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 2
25+
26+
- name: Setup Docker buildx
27+
uses: docker/setup-buildx-action@v3
28+
29+
- name: Log in to GitHub Container Registry
30+
uses: docker/login-action@v3
31+
with:
32+
registry: ${{ env.REGISTRY }}
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Build and Push Docker Image for geniesp
37+
uses: docker/build-push-action@v5
38+
with:
39+
context: .
40+
push: true
41+
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}
42+
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }}-cache
43+
cache-to: type=inline,mode=max
44+

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ cbioportal
22
BLADDER/
33
BrCa/
44
CRC/
5+
ESOPHAGO/
6+
MELANOMA/
57
NSCLC/
8+
OVARIAN/
69
PANC/
710
Prostate/
11+
RENAL/
812
AKT1/
913
ERBB2/
1014
FGFR4/

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ Output will be as follows
4444

4545
```
4646
usage: geniesp [-h] [--staging]
47-
{NSCLC,CRC,BrCa,PANC,Prostate,AKT1,ERRB2,FGFR4} release
47+
{NSCLC,CRC,BrCa,PANC,Prostate,AKT1,ERRB2,FGFR4,ESOPHAGO,MELANOMA,OVARIAN,RENAL} release
4848
4949
Run GENIE sponsored projects
5050
5151
positional arguments:
52-
{NSCLC,CRC,BrCa,PANC,Prostate,AKT1,ERRB2,FGFR4}
52+
{NSCLC,CRC,BrCa,PANC,Prostate,AKT1,ERRB2,FGFR4,ESOPHAGO,MELANOMA,OVARIAN,RENAL}
5353
Specify project to run
5454
release Specify bpc release (e.g. 1.1-consortium)
5555
@@ -97,7 +97,7 @@ python validate_map.py -h
9797

9898
which outputs:
9999
```
100-
usage: validate_map.py [-h] [--synapse_id SYNAPSE_ID | --file FILE] [--version VERSION] [--cohort {BLADDER,BRCA,CRC,NSCLC,PANC,PROSTATE}]
100+
usage: validate_map.py [-h] [--synapse_id SYNAPSE_ID | --file FILE] [--version VERSION] [--cohort COHORT]
101101
[--release {1.1-consortium,1.2-consortium,2.0-public,2.1-consortium}] [--outfile OUTFILE] [--log {debug,info,warning,error}]
102102
103103
Checks validity of BPC to cBioPortal mapping file
@@ -109,7 +109,7 @@ optional arguments:
109109
--file FILE, -f FILE Local path to mapping file
110110
--version VERSION, -v VERSION
111111
Synapse entity version number (default: current)
112-
--cohort {BLADDER,BRCA,CRC,NSCLC,PANC,PROSTATE}, -c {BLADDER,BRCA,CRC,NSCLC,PANC,PROSTATE}
112+
--cohort COHORT, -c COHORT
113113
BPC cohort label (default: BLADDER)
114114
--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}
115115
Release label (default: 1.1-consortium)

geniesp/__main__.py

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
11
"""GENIE SP/BPC cBioPortal exporter CLI"""
2+
23
import argparse
34
import logging
45

56
import synapseclient
67

7-
from .bpc_config import Brca, Crc, Nsclc, Panc, Prostate, Bladder
8+
from .bpc_config import (
9+
Brca,
10+
Crc,
11+
Nsclc,
12+
Panc,
13+
Prostate,
14+
Bladder,
15+
Renal,
16+
Ovarian,
17+
Melanoma,
18+
Esophago,
19+
)
820
from .sp_config import Akt1, Erbb2, Fgfr4
921

1022
BPC_MAPPING = {
@@ -17,6 +29,10 @@
1729
"AKT1": Akt1,
1830
"ERRB2": Erbb2,
1931
"FGFR4": Fgfr4,
32+
"RENAL": Renal,
33+
"OVARIAN": Ovarian,
34+
"MELANOMA": Melanoma,
35+
"ESOPHAGO": Esophago,
2036
}
2137

2238

@@ -75,11 +91,11 @@ def main():
7591

7692
BPC_MAPPING[args.sp](
7793
syn,
78-
cbiopath,
79-
release=args.release,
80-
upload=args.upload,
81-
production = args.production,
82-
use_grs = args.use_grs
94+
cbiopath,
95+
release=args.release,
96+
upload=args.upload,
97+
production=args.production,
98+
use_grs=args.use_grs,
8399
).run()
84100

85101

geniesp/bpc_config.py

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,35 @@ class Bladder(BpcProjectRunner):
5656
# Sponsored project name
5757
_SPONSORED_PROJECT = "BLADDER"
5858
_exclude_files = ["data_timeline_labtest.txt"]
59+
60+
61+
class Renal(BpcProjectRunner):
62+
"""RENAL BPC sponsored project"""
63+
64+
# Sponsored project name
65+
_SPONSORED_PROJECT = "RENAL"
66+
_exclude_files = []
67+
68+
69+
class Ovarian(BpcProjectRunner):
70+
"""OVARIAN BPC sponsored project"""
71+
72+
# Sponsored project name
73+
_SPONSORED_PROJECT = "OVARIAN"
74+
_exclude_files = []
75+
76+
77+
class Melanoma(BpcProjectRunner):
78+
"""MELANOMA BPC sponsored project"""
79+
80+
# Sponsored project name
81+
_SPONSORED_PROJECT = "MELANOMA"
82+
_exclude_files = []
83+
84+
85+
class Esophago(BpcProjectRunner):
86+
"""ESOPHAGO BPC sponsored project"""
87+
88+
# Sponsored project name
89+
_SPONSORED_PROJECT = "ESOPHAGO"
90+
_exclude_files = []

main.nf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ nextflow.enable.dsl=2
55
Run cBioPortal Export
66
*/
77
process cBioPortalExport {
8-
container 'sagebionetworks/geniesp'
8+
container "$params.geniesp_docker"
99
secret 'SYNAPSE_AUTH_TOKEN'
1010

1111
input:
@@ -56,7 +56,7 @@ workflow {
5656
params.use_grs = false
5757

5858
// Check if cohort is part of allowed cohort list
59-
def allowed_cohorts = ["BLADDER", "BrCa", "CRC", "NSCLC", "PANC", "Prostate"]
59+
def allowed_cohorts = ["BLADDER", "BrCa", "CRC", "ESOPHAGO", "MELANOMA", "NSCLC", "OVARIAN", "PANC", "Prostate", "RENAL"]
6060
if (!allowed_cohorts.contains(params.cohort)) {exit 1, 'Invalid cohort name'}
6161

6262
ch_cohort = Channel.value(params.cohort)

nextflow.config

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
env.cohorts = 'BLADDER BrCa CRC NSCLC PANC Prostate'
1+
env.cohorts = 'BLADDER BrCa CRC ESOPHAGO MELANOMA NSCLC OVARIAN PANC Prostate RENAL'
22
docker.enabled = true
33

44
manifest {
@@ -20,3 +20,6 @@ profiles {
2020
}
2121
}
2222
}
23+
params {
24+
geniesp_docker = "sagebionetworks/geniesp"
25+
}

nextflow_schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@
5353
false
5454
]
5555
},
56+
"geniesp_docker":{
57+
"type": "string",
58+
"description": "Name of docker to use for release process in geniesp"
59+
},
5660
"help": {
5761
"type": "boolean",
5862
"description": "Display input options and descriptions",

0 commit comments

Comments
 (0)