{"id":38676500,"url":"https://github.com/wglab/cancervar","last_synced_at":"2026-01-17T10:01:12.253Z","repository":{"id":41469312,"uuid":"82079863","full_name":"WGLab/CancerVar","owner":"WGLab","description":"Clinical interpretation of somatic mutations in cancer","archived":false,"fork":false,"pushed_at":"2025-02-20T18:50:20.000Z","size":6137,"stargazers_count":44,"open_issues_count":18,"forks_count":13,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-02-20T19:40:29.424Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WGLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-15T16:13:38.000Z","updated_at":"2025-02-20T18:50:24.000Z","dependencies_parsed_at":"2022-07-07T14:07:48.107Z","dependency_job_id":null,"html_url":"https://github.com/WGLab/CancerVar","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/WGLab/CancerVar","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WGLab%2FCancerVar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WGLab%2FCancerVar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WGLab%2FCancerVar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WGLab%2FCancerVar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WGLab","download_url":"https://codeload.github.com/WGLab/CancerVar/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WGLab%2FCancerVar/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28505570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T06:57:29.758Z","status":"ssl_error","status_checked_at":"2026-01-17T06:56:03.931Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-17T10:01:07.079Z","updated_at":"2026-01-17T10:01:12.185Z","avatar_url":"https://github.com/WGLab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CancerVar \u0026 OPAI\nClinical interpretation of Cancer somatic Variants (CancerVar) and Oncogenic Prioritization by Artificial Intelligence (OPAI)\n\n## HOW DOES IT WORK\n\nCancerVar takes either pre-annotated files, or unannotated input files in VCF format or ANNOVAR input format, where each line corresponds to one genetic variant; CancerVar will call ANNOVAR to generate necessary annotations.\nIn the output, based on all 12 pieces of evidence, each variant will be assigned as \"Tier_I_strong\", \"Tier_II_potential\", \"Tier_IV_benign\" and \"Tier_III_Uncertain\" by rules specified in the AMP/ASCO/CAP 2017 guidelines.\n\nOPAI takes 12 clinical evidence scores from CancerVar and 23 pre-computed in silico scores predicted by other computational tools from ANNOVAR as input, and predicts oncogenicity by a semi-supervised deep-learning model.\n\nCanverVar and OPAI are Python based scripts. The user need to run CancerVar firstly as **step 1** to get clinical evidence-based interpretation results and then run OPAI as **step 2** if they want to get the deep-learning model-based oncogenicity prediction.\n\n## CancerVar(step 1)\n\n#### SYNOPSIS\n\nCancerVar.py [options]\n\n#### WHAT DOES IT DO\n\nCanverVar is a python script for cancer variant interpretation of clinical significance.\n\n#### PREREQUISITE\n\n1. You need install **Python \u003e=3.6**\n2. You need install **[ANNOVAR]**(http://annovar.openbioinformatics.org/en/latest/) version \u003e=  2016-02-01.\n3. Most of the datases can be downloaded automatically.\n4. Some updated datasets(**cosmic and icgc**) for Annovar:  [https://cancervar.wglab.org/databases/](https://cancervar.wglab.org/databases/) (download and gunzip, put in the Annovar db folder)\n5. Please use the updated files, outdated files will bring some problems of running CancerVar.\n\n\n#### OPTIONS of CancerVar script\n\n- -h, --help\nshow this help message and exit\n\n- --version\nshow program''s version number and exit\n\n- --config=config.ini\nLoad your config file. The config file contains all options.\n\nif you use this options,you can ignore all the other options bellow.\n\n- -i INPUTFILE, --input=INPUTFILE\ninput file of  variants for analysis\n\n- --input_type=AVinput\nThe input file type, it can be  AVinput(Annovar''sformat),VCF\n\n- --cancer_type=CANCER\nThe cancer type, please check the help for the details of cancer type: Adrenal_Gland Bile_Duct Bladder Blood Bone Bone_Marrow Brain Breast Cancer_all Cervix\nColorectal Esophagus Eye Head_and_Neck Inflammatory Intrahepatic Kidney Liver Lung Lymph_Nodes Nervous_System Other Ovary Pancreas Pleura Prostate\n Skin Soft_Tissue Stomach Testis Thymus Thyroid Uterus,if you are using avinput file, you can can specify the cancer type in the 6th column\n\n- -o OUTPUTFILE, --output=OUTPUTFILE\nprefix the output file (default:output)\n\n- -b BUILDVER, --buildver=BUILDVER\nversion of reference genome: hg38, hg19(default)\n\n  CancerVar Other Options:\n- -t cancervardb, --database_intervar=cancervardb\nThe database location/dir for the CancerVar dataset files\n\n- -s your_evidence_file, --evidence_file=your_evidence_file\nUser specified Evidence file for each variant\n\n  Annovar Options( check these options from manual of Annovar):\n\n- --table_annovar=./table_annovar.pl\nThe Annovar perl script of table_annovar.pl\n\n- --convert2annovar=./convert2annovar.pl\nThe Annovar perl script of convert2annovar.pl\n\n- --annotate_variation=./annotate_variation.pl\nThe Annovar perl script of annotate_variation.pl\n\n-  -d humandb, --database_locat=humandb\nThe database location/dir for the Annovar annotation datasets\n\n\n#### EXAMPLE of CancerVar\n```\n    python3.6 ./CancerVar.py -c config.ini  # Run the examples in config.ini\n    python3.6 ./CancerVar.py  -b hg19 -i your_input  --input_type=VCF  -o your_output\n    python3.6 ./CancerVar.py  -b hg19 -i example/FDA_hg19.av -o example/FDA\n```\nThe clinical interpretation results are in the ouput file of **\"*.cancervar\"**,  the column of **\"CancerVar: CancerVar and Evidence\"** is the evidence and final interpretation.\n\n## OPAI(step 2)\n\nAfter running CancerVar correctly and getting the output files of **\"*.cancervar\"** and **\"*.grl_p\"**,we are ready to run Oncogenic Prioritization by Artificial Intelligence.\n\n### WHAT AND HOW DOES IT DO\n\nOPAI is a python script for Oncogenic Prioritization by Artificial Intelligence after CancerVar.\nOPAI firstly call **feature_preprocess.py** to process the features coding from CancerVar and Annovar output, then call **opai_predictor.py** to predict the oncogenicity.\n\nThe OPAI scripts are in the **scripts** folder of **“OPAI”**:\n- feature_preprocess.py: \n   - preprocessing the ANNOVAR data and CancerVar output to generate OPAI input;\n- opai_predictor.py: \n   - predicting the oncogenicity of a variant.\n\n\n#### PREREQUISITE\nOPAI has currently only been tested with **Python 3.6+**, and requires four Python modules to be installed and in path. These are **numpy** https://numpy.org, **pandas** https://pandas.pydata.org , **scikit-learn** https://scikit-learn.org and **pytorch** https://pytorch.org. \n\nThere are two ways to install these modules:\n\n- Using CONDA and manage the environment.\n```\n     conda create  -n opai python=3.6\n     conda activate opai\n     conda install -c anaconda numpy pandas scikit-learn\n     conda install -c pytorch pytorch=1.9\n```\n\n- Using pip\n```\n    python3.6 -m pip install numpy --user\n    python3.6 -m pip install pandas --user\n    python3.6 -m pip install scikit-learn --user\n    python3.6 -m pip install torch --user\n``` \n#### MODELS\n There are two trained models for prediction in OPAI, located in the folder of **\"saves\"**:\n- Ensemble-based model: \n   - both clinical evidence score and 23 pre-computed in silico scores are taken as input of the model;\n   - model file: `ensemble.pt`\n- Evidence-based model: \n    - only clinical evidence score are taken as input of the model, this is useful for case of a lot or even all the missing values in 23 pre-computed in silico scores.\n    -  model file: `evs.pt`\n\n Users can specify the model by using the `-m ensemble ` or `-m evs` option and then following the `-d model_file_location` option.\n \n #### EXAMPLE of OPAI\n After running of `python3.6 ./CancerVar.py  -b hg19 -i example/FDA_hg19.av -o example/FDA`, check files of `example/FDA.hg19_multianno.txt.grl_p` and `example/FDA.hg19_multianno.txt.cancervar`, see if they are generated correctly.\n\n Then,\n\n - using Ensemble-based model\n```\n   python3.6 OPAI/scripts/feature_preprocess.py -a example/FDA.hg19_multianno.txt.grl_p -c  example/FDA.hg19_multianno.txt.cancervar -m ensemble -n 5 -d OPAI/saves/nonmissing_db.npy -o example/FDA.hg19_multianno.txt.cancervar.ensemble.csv\n            \n   python3.6 OPAI/scripts/opai_predictor.py -i  example/FDA.hg19_multianno.txt.cancervar.ensemble.csv -m ensemble -c OPAI/saves/ensemble.pt -d cpu -v example/FDA.hg19_multianno.txt.cancervar -o example/FDA.hg19_multianno.txt.cancervar.ensemble.pred\n```\nThe predicted oncogenicity are in the (last)column of **\"ensemble_score\"** in file `example/FDA.hg19_multianno.txt.cancervar.ensemble.pred`.\n\n- using Evidence-based model\n```\n   python3.6 OPAI/scripts/feature_preprocess.py -a example/FDA.hg19_multianno.txt.grl_p -c  example/FDA.hg19_multianno.txt.cancervar -m evs -n 5 -d OPAI/saves/nonmissing_db.npy -o example/FDA.hg19_multianno.txt.cancervar.evs.csv\n            \n   python3.6 OPAI/scripts/opai_predictor.py -i  example/FDA.hg19_multianno.txt.cancervar.evs.csv -m evs -c OPAI/saves/evs.pt -d cpu -v example/FDA.hg19_multianno.txt.cancervar -o example/FDA.hg19_multianno.txt.cancervar.evs.pred\n\n```\nThe predicted oncogenicity are in the (last)column of **\"evs_score\"** in file `example/FDA.hg19_multianno.txt.cancervar.evs.pred`.\n \n#### OPTIONS OF OPAI SCRIPTS \n- Feature process using `feature_preprocess.py`\n```bash\npython3.6  OPAI/scripts/feature_preprocess.py -h\nusage: feature_preprocess.py [-h] -a ANNOVAR_PATH -c CANCERVAR_PATH [-m METHOD] [-n MISSING_COUNT] -d DATABASE -o OUTPUT\n\nfeature creator from cancervar output\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -a ANNOVAR_PATH, --annovar_path ANNOVAR_PATH\n                        the path to annovar file\n  -c CANCERVAR_PATH, --cancervar_path CANCERVAR_PATH\n                        the path to cancervar file\n  -m METHOD, --method METHOD\n                        output evs features or ensemble features (option: evs, ensemble)\n  -n MISSING_COUNT, --missing_count MISSING_COUNT\n                        variant with more than N missing features will be discarded, (default: 5)\n  -d DATABASE, --database DATABASE\n                        database for feature normalization\n  -o OUTPUT, --output OUTPUT\n                        the path to output\n\n```\n\n- Prediction using `opai_predictor.py`\n```bash\npython3.6 OPAI/scripts/opai_predictor.py -h\nusage: opai_predictor.py [-h] -i INPUT -v CANCERVAR_PATH [-m METHOD] [-d DEVICE] -c CONFIG -o OUTPUT\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -i INPUT, --input INPUT\n                        the path to input feature\n  -v CANCERVAR_PATH, --cancervar_path CANCERVAR_PATH\n                        the path to cancervar file\n  -m METHOD, --method METHOD\n                        use evs features or ensemble features (option: evs, ensemble)\n  -d DEVICE, --device DEVICE\n                        device used for dl-based predicting (option: cpu, cuda)\n  -c CONFIG, --config CONFIG\n                        the path to trained model file\n  -o OUTPUT, --output OUTPUT\n                        the path to output\n\n```\n\n \n \n## Web server\nWe also developed a web server [http://cancervar.wglab.org](http://cancervar.wglab.org), which offers a graphical user interface for CancerVar and OPAI scores. \n\nThis web server provided pre-compiled 13M mutations annotation results and OPAI scores. Users can directly search their exonic variants by chromosomal position, by dbSNP identifier, or by gene name with the nucleic acid/amino acid change. The web server will provide full details on the variants, including all automatically generated criteria, most of the supportive evidence and also OPAI scores.\n\n## LICENSE\n\nCancerVar and OPAI is free for non-commercial use without warranty. Users need to obtain licenses such as ANNOVAR by themselves. Please contact the authors for commercial use.\n\n## REFERENCE\n\nQuan Li, Zilin Ren, Kajia Cao, Marilyn M. Li, Yunyun Zhou and Kai Wang. CancerVar: an Artificial Intelligence empowered platform for clinical interpretation of somatic mutations in cancer ( Science Advances, 2022, [https://www.science.org/doi/10.1126/sciadv.abj1624](https://www.science.org/doi/10.1126/sciadv.abj1624) )\n\nQuan Li and Kai Wang. InterVar: Clinical interpretation of genetic variants by ACMG-AMP 2015 guideline. The American Journal of Human Genetics 100, 1-14, February 2, 2017,[http://dx.doi.org/10.1016/j.ajhg.2017.01.004](http://dx.doi.org/10.1016/j.ajhg.2017.01.004)\n\n[The  AMP/ASCO/CAP 2017 guidelines ](https://www.ncbi.nlm.nih.gov/pubmed/27993330)\nLi MM, Datto M, Duncavage EJ, Kulkarni S, Lindeman NI, Roy S, Tsimberidou AM, Vnencak-Jones CL, Wolff DJ, Younes A, Nikiforova MN.\nStandards and Guidelines for the Interpretation and Reporting of Sequence Variants in Cancer: A Joint Consensus Recommendation of the Association for Molecular Pathology, American Society of Clinical Oncology, and College of American Pathologists.\n\n[The  ACMG/CGC 2019 guidelines ](https://www.ncbi.nlm.nih.gov/pubmed/31138931)\nMikhail FM, et al. Technical laboratory standards for interpretation and reporting of acquired copy-number abnormalities and copy-neutral loss of heterozygosity in neoplastic disorders: a joint consensus recommendation from the American College of Medical Genetics and Genomics (ACMG) and the Cancer Genomics Consortium (CGC). Genet Med. 2019 Sep;21(9):1903-1916. doi: 10.1038/s41436-019-0545-7.\n\n\n## Acknowledges\n\nThanks to all who provided bug reports.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwglab%2Fcancervar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwglab%2Fcancervar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwglab%2Fcancervar/lists"}