This repository documents code used to gather, QC, standardize, and analyze data uploaded by institutes participating in AACR's Project GENIE (Genomics, Evidence, Neoplasia, Information, Exchange).
For more information about the AACR genie repository, visit the GitHub Pages site.
This package contains both R, Python and cli tools. These are tools or packages you will need, to be able to reproduce these results:
- Python >=3.10 or <3.12
pip install -r requirements.txt
- bedtools
- R 4.3.3
renv::install()- Follow instructions here to install synapser
- Java = 21
- For mac users, it seems to work better to run
brew install java
- For mac users, it seems to work better to run
- wget
- For mac users, have to run
brew install wget
- For mac users, have to run
One of the features of the aacrgenie package is that is provides a local validation tool that GENIE data contributors and install and use to validate their files locally prior to uploading to Synapse.
These instructions will install all the necessary components for you to run the validator locally on all of your files, including the Synapse client.
- Create a virtual environment using package manager of your choice (e.g:
conda,pipenv,pip)
Example of creating a simple python environment
python3 -m venv <env_name>
source <env_name>/bin/activate
- Install the genie package
pip install aacrgenie
- Verify the installation
genie -v
- Set up authentication with Synapse through the local .synapseConfig or using an environment variable
Get help of all available commands
genie validate -h
Running validator on clinical file
genie validate data_clinical_supp_SAGE.txt SAGE
Running validator on cna file. Note that the flag --nosymbol-check is REQUIRED when running the validator for cna files because you would need access to an internal bed database table without it. For DEVELOPERS this is not required.
genie validate data_cna_SAGE.txt SAGE --nosymbol-check
Please view contributing guide to learn how to contribute to the GENIE package.
These are instructions on how you would develop and test the pipeline locally.
-
Make sure you have read through the GENIE Onboarding Docs and have access to all of the required repositories, resources and synapse projects for Main GENIE.
-
Be sure you are invited to the Synapse GENIE Admin team.
-
Make sure you are a Synapse certified user: Certified User - Synapse User Account Types
-
Clone this repo and install the package locally.
pip install -e . pip install -r requirements.txt pip install -r requirements-dev.txtIf you are having trouble with the above, try installing via
pipenv-
Specify a python version that is supported by this repo:
pipenv --python <python_version> -
Activate your
pipenv:pipenv shell
-
-
Configure the Synapse client to authenticate to Synapse.
- Create a Synapse Personal Access token (PAT).
- Add a
~/.synapseConfigfile[authentication] authtoken = <PAT here> - OR set an environmental variable
export SYNAPSE_AUTH_TOKEN=<PAT here> - Confirm you can log in your terminal.
synapse login
-
Run the different pipelines on the test project. The
--project_id syn7208886points to the test project.-
Validate all the files excluding vcf files:
python bin/input_to_database.py main --project_id syn7208886 --onlyValidate -
Validate all the files:
python bin/input_to_database.py mutation --project_id syn7208886 --onlyValidate --genie_annotation_pkg ../annotation-tools -
Process all the files aside from the mutation (maf, vcf) files. The mutation processing was split because it takes at least 2 days to process all the production mutation data. Ideally, there is a parameter to exclude or include file types to process/validate, but that is not implemented.
python bin/input_to_database.py main --project_id syn7208886 --deleteOld -
Process the mutation data. Be sure to clone this repo: https://github.com/Sage-Bionetworks/annotation-tools and
git checkoutthe version of the repo pinned to the Dockerfile. This repo houses the code that re-annotates the mutation data with genome nexus. The--createNewMafDatabasewill create a new mutation tables in the test project. This flag is necessary for production data for two main reasons:- During processing of mutation data, the data is appended to the data, so without creating an empty table, there will be duplicated data uploaded.
- By design, Synapse Tables were meant to be appended to. When a Synapse Tables is updated, it takes time to index the table and return results. This can cause problems for the pipeline when trying to query the mutation table. It is actually faster to create an entire new table than updating or deleting all rows and appending new rows when dealing with millions of rows.
- If you run this more than once on the same day, you'll run into an issue with overwriting the narrow maf table as it already exists. Be sure to rename the current narrow maf database under
Tablesin the test synapse project and try again.
python bin/input_to_database.py mutation --project_id syn7208886 --deleteOld --genie_annotation_pkg ../annotation-tools --createNewMafDatabase -
Create a consortium release. Be sure to add the
--testparameter. Be sure to clone the cbioportal repo: https://github.com/cBioPortal/cbioportal andgit checkoutthe version of the repo pinned to the Dockerfile. For consistency, the processingDate specified here should match the one used for TEST pipeline in nf-genie.python bin/database_to_staging.py Jul-2022 ../cbioportal TEST --test -
Create a public release. Be sure to add the
--testparameter. Be sure to clone the cbioportal repo: https://github.com/cBioPortal/cbioportal andgit checkoutthe version of the repo pinned to the Dockerfile. For consistency, the processingDate specified here should match the one used for TEST pipeline in nf-genie.python bin/consortium_to_public.py Jul-2022 ../cbioportal TEST --test
-
The production pipeline is run on Nextflow Tower and the Nextflow workflow is captured in nf-genie. It is wise to create an ec2 via the Sage Bionetworks service catalog to work with the production data, because there is limited PHI in GENIE.
For technical details about our CI/CD, please see the github workflows README
