- Notifications
You must be signed in to change notification settings - Fork0
Exploratory web-based tool for clinical proteomics TOPAS platform
License
kusterlab/topas-portal
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The TOPAS portal allows exploration of proteome and phospho-proteome profiles of patients processed with our clinical-proteomics pipeline from LC/MS data.In addition, other omics modalities such as transcriptomics and genomics can be integrated for analysis and comparisons.
This app is deployed athttps://topas-portal.kusterlab.org/
The following variables are required to be set in your user's~/.bashrc
or as part of a CI/CD pipeline:
export DB_PASSWORD=<your password>export CONFIG_FILE_PATH=<path to your portal config file>
TheDB_PASSWORD
you can choose yourself and is needed to login to the admin tools panel in the portal.
TheCONFIG_FILE_PATH
is ajson
file with the following format:
{ "local_http": "http://localhost:3832", "basket_annotation_path": "TOPAS_SCORING_4th gen_5th gen 231212.xlsx", "drug_annotation_path": "Drug_List.xlsx", "patient_annotation_path": { "INFORM": "METADATA.xlsx" }, "report_directory": { "INFORM": "TOPAS_pipeline_results" }, "sample_annotation_path": { "INFORM": "sample_annotation.csv" }, "FP": { "INFORM": 1 }, "PP": { "INFORM": 1 }, "transcriptomics_path_z_scored": "fpkms.csv", "transcriptomics_path_not_z_scored": "un_normalized_fpkms.csv", "genomics_path": "genomics_df2portal.csv", "oncokb_path": "onkokb2portal.csv", "meta_data_columns_config": "meta_columns_config.json", "pspFastaFile": "Phosphosite_seq.fasta", "pspAnnotationFile": "Phosphorylation_site_dataset", "pspRegulatoryFile": "Regulatory_sites"}
basket_annotation_path
: path to an Excel file with the following columns:'GROUP' : '(R)TK', 'SIGNALING', 'OTHER''BASKET' : e.g. 'KIT', 'PDGFRA', 'PDGFRB', 'FGFR1', 'FGFR4', 'FGFR2', 'FGFR3''SUBBASKET' : e.g. 'KIT', 'PDGFRA', 'PDGFRB', 'Ligand', 'FGFR1', 'FGFR4', 'FGFR2''LEVEL' : 'phosphorylation', 'expression', 'kinase activity''SCORING RULE' : 'highest protein phosphorylation score , 'highest z-score', 'highest kinase score'highest z-score''WEIGHT' : e.g. 2. , nan, 0.5, 3. , -1. , -0.5, 0. 'GENE NAME' : e.g. 'KIT', 'PDGFRA', 'PDGFRB', ..., 'FBLN2', 'ITGA5', 'COL3A1''Site positions (MQ identified - PSP)' : e.g. 'P09619_Y751', 'P11362_Y654', 'P11362_Y653''Kinase' : e.g. 'AXL;CSK;Chk1;Fyn;Lck;PDGFRA;PDGFRB;PKACA;Src''MODIFIED SEQUENCE' : e.g. '_LLLATpYARPPR_', '_EPPPpYQEPRPR_', 'Literature' : optional'Comment' : optional
drug_annotation_path
: path to an Excel file with the following columns:"Drug""Kinobeads Target List""Designated targets""Other targets""Clinical Phase"
report_directory
: dictionary ofcohort_name -> path to a pipeline results folder
(https://github.com/kusterlab/topas-pipeline).sample_annotation_path
: dictionary ofcohort_name -> path to csv file
with the following columns. Replicates should each get their own row.Sample nameBatch NameTMT ChannelQCis_reference
FP
andPP
: dictionary ofcohort_name -> value
, where value is1
(available) or0
(unavailable)patient_annotation_path
: dictionary ofcohort_name -> excel file with meta data
.The column 'Sample name' is mandatory and has to corresponds to the same record insample_annotation_path
. Additional columns containing metadata can be added freely.Replicates of the same sample should not be repeated in this file.meta_data_columns_config
: path to json file with additional metadata columns inpatient_annotation_path
with the following format:{ "front_end_col_names": [ { "dataField": "case_submitter_id", "dataType": "string", "width": "70", "visible": "false" }, { "dataField": "ethnicity", "dataType": "string", "width": "70", "visible": "false" }, { "dataField": "gender", "dataType": "string", "width": "70", "visible": "false" }, ]}
- ssh into the server
- clone this repo:
git clone https://github.com/kusterlab/topas-portal.git`cd topas-portal
- export password and path to config file (see above):
export DB_PASSWORD=<your password>export CONFIG_FILE_PATH=<path to your portal config file>
- deploy backend and frontend
make db # this should deploy the backend and postgres database as two different containersmake frontend # this should deploy the frontend as a separate container
- Open the portal athttp://localhost:8080. To upload cohort data, go to
Other tools -> Admin tools
and press theReload all cohorts
button at the bottom of the page.
Check theMakefile
for additional functionalities.
clone this repo:
git clone https://github.com/kusterlab/topas-portal.git`cd topas-portal
install and activate a conda env on python 3.9.12:
conda create --name portal python=3.9.12conda activate portal
install the dependencies:
- option 1: using poetry (recommended)
pip install poetry==1.8.3cd flask_backendpoetry install
- option 2: using pip (not recommended)
pip install -r flask-backend/requirements.txt
- option 1: using poetry (recommended)
export password and path to config file (see above):
export DB_PASSWORD=<your password>export CONFIG_FILE_PATH=<path to your portal config file>export VUE_APP_API_HOST=http://localhost:3832
deploy the backend in debug mode:
make test_flask
Check that the backend is running by openinghttp://localhost:3832/config in your browser. Your config file should be displayed.
Open a new shell and deploy the frontend by running:
cd vue-frontendnpm installnpm run serve
Open the portal athttp://localhost:8080. To upload cohort data, go to
Other tools -> Admin tools
and press theReload all cohorts
button at the bottom of the page.
- clone this repo:
git clone https://github.com/kusterlab/topas-portal.git`cd topas-portal
- Run docker-compose to start the backend:
make create_docker_networksdocker-compose -f docker-compose-backend.local.yml builddocker-compose -f docker-compose-backend.local.yml up -d
- The backend is available athttp://localhost:3832 (to test, tryhttp://localhost:3832/config)
- in the debug mode the config file which is used by default can be found at flask-backend/config_mtb_portal_mintest.json
- in the production mode the config file path is in settings.py
- Deploy the frontend:
cd vue-frontendsudo docker build --build-arg NODE_ENV=development --build-arg VUE_APP_API_HOST=http://$(hostname -I | awk '{print $1}'):3832 -t mtb:dev . sudo docker run -d --name mtb_portal_frontend -it -p 3834:3834 --rm mtb:dev
- Open the portal athttp://localhost:3834. To upload cohort data, go to
Other tools -> Admin tools
and press theReload all cohorts
button at the bottom of the page.
If you have a lot of data and not enough memory, consider switching to PostgreSQL as the database backend:
- Set
DATABASE_MODE = True
insettings.py
. - Start a local backend with docker (see above), this creates and starts a PostgreSQL database docker.
- Import the data into the postgreSQL database (this takes 5-10 minutes for a small cohort):
make database_import
- Deploy the frontend (see above)
- DataGrid tables show "Unexpected server response" error: probably NaN values in the flask response. Replace NaNs with empty strings should solve it.
- The frontend of the portal uses eslint which can lead to vue complaining about improper linting. Run
make lint
to fix these errors.