{"id":13752413,"url":"https://github.com/greenelab/pancancer","last_synced_at":"2025-05-05T21:32:07.856Z","repository":{"id":53558057,"uuid":"68009604","full_name":"greenelab/pancancer","owner":"greenelab","description":"Building classifiers using cancer transcriptomes across 33 different cancer-types","archived":false,"fork":false,"pushed_at":"2019-04-30T17:40:35.000Z","size":30217,"stargazers_count":118,"open_issues_count":8,"forks_count":58,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-08-03T09:03:55.522Z","etag":null,"topics":["analysis","cancer","classifier","gene-expression","machine-learning","methodology","pancancer","tcga","tool","transcriptome"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/greenelab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-12T13:06:18.000Z","updated_at":"2024-07-20T17:56:46.000Z","dependencies_parsed_at":"2022-08-20T21:21:00.390Z","dependency_job_id":null,"html_url":"https://github.com/greenelab/pancancer","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenelab%2Fpancancer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenelab%2Fpancancer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenelab%2Fpancancer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/greenelab%2Fpancancer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/greenelab","download_url":"https://codeload.github.com/greenelab/pancancer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224470634,"owners_count":17316704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analysis","cancer","classifier","gene-expression","machine-learning","methodology","pancancer","tcga","tool","transcriptome"],"created_at":"2024-08-03T09:01:05.432Z","updated_at":"2024-11-13T14:53:30.470Z","avatar_url":"https://github.com/greenelab.png","language":"Jupyter Notebook","funding_links":[],"categories":["Ranked by starred repositories"],"sub_categories":[],"readme":"# Gene expression machine learning classifiers from TCGA PanCancerAtlas\n\n**Gregory Way and Casey Greene**\n\n## Detecting system-wide changes in whole transcriptomes\n\nA transcriptome can describe the total state of a tumor at a snapshot in time.\nIn this repository, we use cancer transcriptomes from The Cancer Genome Atlas PanCancerAtlas project to interrogate gene expression states induced by deleterious mutations and copy number alterations.\n\nThe code in this repository is flexible and can build a Pan-Cancer classifier for any combination of genes and cancer-types using gene expression, mutation,\nand copy number data.\nIn this repository, we provide examples for building classifiers to detect aberration in _TP53_ and Ras signalling.\n\n### Ras Signalling\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1000876.svg)](https://doi.org/10.5281/zenodo.1000876)\n\nThe Ras signalling pathway is a major player in cancer development and treatment resistance.\nWe observed that nearly 60% of all tumors in TCGA have mutations or copy number alterations in at least one of 38 core pathway genes ([Sanchez-Vega et al. 2018](https://doi.org/10.1016/j.cell.2018.03.035)).\n\nWe applied our approach to detect Ras pathway activation using _KRAS_, _HRAS_, and _NRAS_ gain of function mutations and copy number gains to define our gold standard Ras hyperactivation events.\nWe train a supervised classifier to detect when a tumor has activated Ras.\n\nFor more details about the approach, see our paper published in Cell Reports.\nThe paper should be cited as:\n\n\u003e Way, GP, Sanchez-Vega, F, La, K, Armenia, J, Chatila, WK, Luna, A, Sander, A, Cherniack, AD, Mina, M, Ciriello, G, Schultz, N.,\nThe Cancer Genome Atlas Research Network, Sanchez, Y, Greene, CS. 2018.\nMachine Learning Detects Pan-cancer Ras Pathway Activation in The Cancer Genome Atlas.\n_Cell Reports_ 23(1):172-180.e3 doi:10.1016/j.celrep.2018.03.046\n\n#### Ras signalling classifier identifies phenocopying NF1 loss of function events\n\nWe have previously described the ability of a machine learning classifier to detect an _NF1_ inactivation signature using Glioblastoma data ([Way _et al._ 2016](http://doi.org/10.1186/s12864-017-3519-7)).\nThere, we applied an ensemble of logistic regression classifiers to the problem, but the solutions were unstable and overfit.\nTo address these issues, we posited that we could leverage data from diverse cancer types to build a pancancer _NF1_ classifier.\nWe also hypothesized that a Ras classifier would be able to detect tumors with _NF1_ inactivation since _NF1_ directly inhibits RAS activity.\n\n### TP53\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.400250.svg)](https://doi.org/10.5281/zenodo.400250)\n\nWe are also interested in building a classifier to detect _TP53_ inactivation.\n_TP53_ is the most highly mutated gene in cancer and regulates several important oncogenic processes such as apoptosis and DNA damage response (DDR).\nWe include a pipeline to build and evaluate a machine learning _TP53_ classifier.\nSee [`tp53_analysis.sh`](tp53_analysis.sh) for more details.\n\nThe description for this analysis can be viewed in the following publication:\n\n\u003e Knijnenburg, TA, Wang, L, Zimmermann, MT, Chambwe, N, Gao, GF, Cherniack AD, Fan, H, Shen, H, Way, GP, Greene, CS, Liu, Y, Akbani, R, Feng, B,\nDonehower, LA, Miller, C, Shen, Y, Karimi, M, Chen, H, Kim, P, Jia, P, Shinbrot, E, Zhang, S, Liu, J, Hu, H, Bailey, MH, Yau, C, Wolf, D, Zhao, Z, Weinstein, J,\nLi, L, Ding, L, Mills, GB, Laird, PW, Wheeler, DA, Shmulevich, I, The Cancer Genome Atlas Research Network, Monnat Jr, RJ, Xiao, Y, Wang, C. 2018.\nGenomic and Molecular Landscape of DNA Damage Repair Deficiency across The Cancer Genome Atlas.\n_Cell Reports_ 23(1):239-254.e3 doi:10.1016/j.celrep.2018.03.076\n\n## Open Access Data\n\nAll data was released by the TCGA PanCancerAtlas project.\nThe compendium of papers is described [here](https://www.cell.com/pb-assets/consortium/pancanceratlas/pancani3/index.html).\nSupplementary data from these papers can be downloaded from the [NCI](https://gdc.cancer.gov/about-data/publications/pancanatlas).\nThe specific data used in the analyses presented here are archived on Zenodo\n[Gene expression](https://figshare.com/articles/TCGA_PanCanAtlas_Gene_Expression_Data/6146519)) and [copy number](https://figshare.com/articles/TCGA_PanCanAtlas_Copy_Number_Data/6144122) data can be accessed here.\n\nSee [`scripts/initialize/download_data.sh`](scripts/initialize/download_data.sh) for more details.\n\nAlso note that the definitions for all TCGA cancer-type acronyms is stored in [`data/tcga_dictionary.tsv`](data/tcga_dictionary.tsv).\n\n## Usage\n\n### Initialization\n\nThe repository must be cloned onto local machine before analyses can proceed.\n\n```sh\n# Make sure git-lfs (https://git-lfs.github.com/) is installed before cloning\n# If not, run `git lfs install`\ngit clone git@github.com:greenelab/pancancer.git\n\ncd pancancer\n```\n\n### Example Scripts\n\nWe provide two distinct example pipelines for predicting _TP53_ and _NF1_/RAS loss of function.\n\n1. _TP53_ loss of function (see [`tp53_analysis.sh`](tp53_analysis.sh))\n2. Ras signaling hyperactivation (see [`ras_analysis.sh`](ras_analysis.sh))\n\n### Customization\n\nFor custom analyses, use the [`scripts/pancancer_classifier.py`](scripts/pancancer_classifier.py) script with command line arguments.\n\n```\npython scripts/pancancer_classifier.py ...\n```\n\n| Flag | Required/Default | Description |\n| ---- | :--------------: | ----------- |\n| `--genes` | Required |  Build a classifier for the input gene symbols |\n| `--diseases` | `Auto` | The disease types to use in building the classifier |\n| `--folds` | `5` | Number of cross validation folds |\n| `--drop` |  `False` | Decision to drop input genes from expression matrix |\n| `--copy_number` |  `False` | Integrate copy number data to gene event |\n| `--filter_count` |  `15` | Default options to filter diseases if none are specified |\n| `--filter_prop` |  `0.05` | Default options to filter diseases if none are specified |\n| `--num_features` |  `8000` | Number of MAD genes used to build classifier |\n| `--alphas` | `0.1,0.15,0.2,0.5,0.8,1` | The alpha grid to search over in parameter sweep |\n| `--l1_ratios` | `0,0.1,0.15,0.18,0.2,0.3` | The l1 ratio grid to search over in parameter sweep |\n| `--alt_genes` | `None` | Alternative genes to test classifier performance |\n| `--alt_diseases` |  `Auto` | Alternative diseases to test classifier performance |\n| `--alt_filter_count` | `15` | Filtering used for alternative disease classification |\n| `--alt_filter_prop` |  `0.05` | Filtering used for alternative disease classification |\n| `--alt_folder` | `Auto` | Location to save all classifier figures |\n| `--remove_hyper` | `False` | Decision to remove hyper mutated tumors |\n| `--keep_intermediate` | `False` | Decision to keep intermediate ROC curve metrics |\n| `--x_matrix` | `raw` | if not \"raw\", then the filename storing the features |\n| `--shuffled` | `False` | Shuffle the X matrix for better training |\n| `--shuffled_before_training` | `False` | Remove correlational structure in the data |\n| `--no_mutation` | `True` | Decision to remove mutation data from the input matrix |\n| `--drop_rasopathy` | `False` | Decision to drop all rasopathy genes from the X matrix |\n| `--drop_covariates` | `False` | Decision to drop all covariate information from the X matrix|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreenelab%2Fpancancer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgreenelab%2Fpancancer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgreenelab%2Fpancancer/lists"}