{"id":21015621,"url":"https://github.com/gersteinlab/radar","last_synced_at":"2025-06-26T13:35:46.718Z","repository":{"id":70242773,"uuid":"129825093","full_name":"gersteinlab/RADAR","owner":"gersteinlab","description":"RADAR source code","archived":false,"fork":false,"pushed_at":"2018-10-08T17:49:47.000Z","size":12090,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-05-15T05:34:53.949Z","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/gersteinlab.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-17T00:59:38.000Z","updated_at":"2024-07-23T17:29:54.000Z","dependencies_parsed_at":"2023-04-11T13:47:28.747Z","dependency_job_id":null,"html_url":"https://github.com/gersteinlab/RADAR","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/gersteinlab/RADAR","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gersteinlab%2FRADAR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gersteinlab%2FRADAR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gersteinlab%2FRADAR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gersteinlab%2FRADAR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gersteinlab","download_url":"https://codeload.github.com/gersteinlab/RADAR/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gersteinlab%2FRADAR/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262077069,"owners_count":23255109,"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":[],"created_at":"2024-11-19T10:10:35.690Z","updated_at":"2025-06-26T13:35:46.693Z","avatar_url":"https://github.com/gersteinlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RADAR\n\nThis is a GitHub repository for RADAR standalone scripts. For web-based engine with more information, please visit: http://RADAR.gersteinlab.org\n\n## Downloads\n\nDownload RADAR and all necessary resource files in a ZIP format: http://radar.gersteinlab.org/radar.zip\n\n## Prerequisite Software\n\nThe following software are required to run RADAR.\n\n1. [BEDTools](http://bedtools.readthedocs.io/en/latest/content/installation.html)\n\n2. [Python (tested on Python 2.7.11)](https://www.python.org/downloads/)\n\n3. [pybedtools](http://daler.github.io/pybedtools/main.html)\n\n## Prerequisite Data Context\n\nAll required data resources are contained in the resources/ directory of the RADAR package.\n\n[Download](http://radar.gersteinlab.org/resources/significant_peaks) Significant peaks (significant_peaks, text file, 95 MB)\n\n*Matrix representing whether an RBP peak overlaps a significant gene in a cancer type. Rows are labeled by RBP peaks, columns by cancer type. A value of 1 indicates the peak overlaps a significant gene in this cancer, else 0. Used to compute the key genes score.*\n\n[Download](http://radar.gersteinlab.org/resources/all_RBP_peaks_unmerged_labeled_sorted.bed) RBP binding site data (all_RBP_peaks_unmerged_labeled_sorted.bed, BED file, 42 MB)\n\n*A BED file containing all RBP peaks considered. Each line represents one peak and is formatted as: chromosome, start, stop, RBP.*\n\n[Download](http://radar.gersteinlab.org/resources/rbp_peak_significance) RBP peak mutational burden data (rbp_peak_significance, text file, 95 MB)\n\n*Mutational burden data for each RBP binding peak with respect to Alexandrov variants in 30 different cancer types. Each line represents an RBP binding peak. A line is tab-delimited and formatted as: chromosome, start, stop, RBP, then 30 values indicating whether this peak is burdened in each cancer (sorted alphabetically, 1 indicates it is burdened, 0 if not).*\n\n[Download](http://radar.gersteinlab.org/resources/regulator_pval.txt) RBP regulatory power data (regulator_pval.txt, text file, 5 KB)\n\n*Matrix representing whether an RBP exhibits strong regulatory power in a cancer type. Rows are labeled by RBP, columns by cancer type. A value of 1 indicates high regulatory power, else 0.*\n\n[Download](http://radar.gersteinlab.org/resources/main_scores.zip) Precomputed universal scores (main_scores/, zip archive, 768 MB)\n\n*Directory containing files, one for each chromosome. Each file contains precomputed universal scores for every single position and possible alternate allele in the regulome. RADAR looks up scores from these tables instead of recomputing them on the spot.*\n\n## Supplemental Data Files\n\n[Download](http://radar.gersteinlab.org/non_splicing.zip) Non-splicing RBP peaks (non_splicing/, zip archive, 6.4 MB)\n\n*Directory containing RBP peak files for all RBPs not involved with splicing. Not necessary for RADAR.*\n\n[Download](http://radar.gersteinlab.org/splicing.zip) Splicing RBP peaks (splicing/, zip archive, 4.5 MB)\n\n*Directory containing RBP peak files for all RBPs involved with splicing. Not necessary for RADAR.*\n\n\n## Usage Overview\n\n```\npython radar.py -b \u003cvariant BED file\u003e -o \u003coutput directory\u003e -c [cancer type] [-kg -mr -rp]\n```\n\nTwo parameters are required by RADAR: a BED file containing the variants to be scored, and an output directory where the scores will be written to. Each line of the input should be formatted as: chromosome, start, stop, reference allele, alternate allele. The output is a BED file with the scored variant, each line formatted as: chromosome, start, stop, reference allele, alternate allele, cross-species conservation score, hub score, GERP score, RNA structure (EvoFold score), motif disruption score, RBP-gene association score, total universal score, [key genes score], [mutation recurrence score], [regulatory power score], total tissue-specific score, total score. Scores in brackets [] are tissue-specific scores, and can be optionally included; the other scores are provided by default.\n\nIf the `-kg` flag is provided the key genes score will be included, and each variant will also be scored based on whether it falls in an RBP binding peak that overlaps a significant gene in the given cancer type.\n\nIf the `-mr` flag is provided, the mutation recurrence score will be included, and each variant will also be scored based on whether it falls in a mutationally burdened RBP binding site with respect to Alexandrov variants from the given cancer type.\n\nIf the `-rp` flag is provided, the regulatory power score will be included, and each variant will also be scored based on whether it falls in the binding peak of an RBP with high regulatory power in the given cancer type.\n\nIf any of the three optional tissue-specific scores are requested, a cancer type must also be provided following the -c flag. RADAR currently supports 19 TCGA cancer types for the above three options: BLCA, BRCA, CESC, COAD, ESCA, GBM, HNSC, KICH, KIRC, KIRP, LIHC, LUAD, LUSC, SKCM, PAAD, PRAD, STAD, THCA, UCEC.\n\n## Input Format\n\nThe variant BED file should be tab-delimited: chr, start, stop, reference allele, alternate allele. Extra columns are ignored.\n\n## Output Format\n\nRADAR outputs a single tab-delimited BED file in the provided output directory. The file contains a header to describe each column. Each row after the header represents a single variant (chr, start, stop, reference allele, alternate allele) followed by the requested scores. The order of variants in the output is the same as the order provided in the input BED file.\n\n## Walkthroughs\n\nThe following are detailed step-by-step guides on how to score a set of variants using RADAR from start to finish.\n\nFirst, download the required software: BEDTools, Python (our tests were conducted with Python version 2.7), and pybedtools. Follow the installation instructions for each one. You can confirm you have successfully installed each piece of software by attempting to run bedtools on the command line, which should print out documentation for BEDTools like so (output is truncated):\n\n```\nbedtools is a powerful toolset for genome arithmetic.\n\nVersion: v2.27.1\nAbout: developed in the quinlanlab.org and by many contributors worldwide.\nDocs: http://bedtools.readthedocs.io/\nCode: https://github.com/arq5x/bedtools2\nMail: https://groups.google.com/forum/#!forum/bedtools-discuss\n\nUsage: bedtools \u003csubcommand\u003e [options]\n```\n\nYou can confirm you have Python and pybedtools installed by running the Python shell using the python command and attempting to import the pybedtools module with import pybedtools. If there are no errors, the prerequisite software was installed successfully. Note the Python version number on the first line after running the python command.\n\n```\n$ python\nPython 2.7.13\n[GCC 5.4.0] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e import pybedtools\n\u003e\u003e\u003e\n```\n\nNext, download the RADAR package in ZIP format from the RADAR website Downloads page Unzip the file at the command line (using `unzip radar.zip`. After unzipping, you should see a directory called `radar/` containing two items: a .py file (the executable script) and a `resources/` directory that contains all data files needed by the RADAR script to produce scores.\n\nHere is a head of the example input file we will be using (publicly accessible data from Alexandrov et al breast cancer variants). This file (called `Breast.bed`) is downloadable from the Example page. (You may also like to follow along with a shorter version of this BED file, containing only the first 100 variants, called `Breast_100.bed`.)\n\n```\nchr1 13506 13507 G A TCGA-EW-A1OZ-01A-11D-A142-09\nchr1 14841 14842 G T PD5935a\nchr1 16995 16996 T C PD7201a\nchr1 17764 17765 G A PD5935a\nchr1 17764 17765 G A PD7216a\nchr1 28587 28588 G T PD4962a\nchr1 30527 30528 C T PD5935a\nchr1 61396 61397 G A PD4967a\nchr1 69522 69523 G T TCGA-BH-A0BP-01A-11D-A10Y-09\nchr1 83442 83443 C T PD4072a\n```\n\nNow we are ready to run the software and score our variants. Move into the recently unzipped radar/ directory, where the radar.py file exists (using `cd radar/`). Locate the path to the Breast.bed file (in the example command below, we will assume it exists in the parent directory of `radar/`). Also identify a directory into which you would like the output file to be written (in this example, we will write the output to the same directory that contains Breast.bed). Now, see the following 5 walkthroughs to see how to run RADAR for different use cases. Note that a cancer type must be specified if at least one tissue-specific score is requested. (We use BRCA here, since we are scoring breast cancer variants, but any of the TCGA cancer types listed above are valid.) In any case, RADAR will generate the output file in the specified output directory. The file will be called Breast.radar_out.bed in this case, and will contain the list of scored variants.\n\n1. Running RADAR without tissue-specific scores\n\nTo score this set of variants without any tissue-specific scores, run the following command:\n\n```\npython radar.py -b ../Breast.bed -o ..\n```\n\nA head of the output file is shown below:\n\n```\nchr start stop ref alt cross_species_conservation RBP_binding_hub GERP Evofold motif_disruption RBP_gene_association total_universal total_tissue_specific total_score\nchr1 13506 13507 G A 0 0 0 0 0 0 0 0 0\nchr1 14841 14842 G T 0 0 0 0 0 0 0 0 0\nchr1 16995 16996 T C 0 0 0 0 0 0 0 0 0\nchr1 17764 17765 G A 0 0 0 0 0 0 0 0 0\nchr1 28587 28588 G T 0 0 0 0 0 0 0 0 0\nchr1 30527 30528 C T 0 0 0 0 0 0 0 0 0\nchr1 61396 61397 G A 0 0 0 0 0 0 0 0 0\nchr1 69522 69523 G T 0 0 0 0 0 0 0 0 0\nchr1 83442 83443 C T 0 0 0 0 0 0 0 0 0\n```\n\n2. Running RADAR with the key genes score\n\nTo score this set of variants with the universal scores and the key genes score, run the following command:\n\n```\npython radar.py -b ../Breast.bed -o .. -c BRCA -kg\n```\n\nA head of the output file is shown below:\n\n```\nchr start stop ref alt cross_species_conservation RBP_binding_hub GERP Evofold motif_disruption RBP_gene_association key_genes total_universal total_tissue_specific total_score\nchr1 13506 13507 G A 0 0 0 0 0 0 0 0 0 0\nchr1 14841 14842 G T 0 0 0 0 0 0 0 0 0 0\nchr1 16995 16996 T C 0 0 0 0 0 0 0 0 0 0\nchr1 17764 17765 G A 0 0 0 0 0 0 0 0 0 0\nchr1 28587 28588 G T 0 0 0 0 0 0 0 0 0 0\nchr1 30527 30528 C T 0 0 0 0 0 0 0 0 0 0\nchr1 61396 61397 G A 0 0 0 0 0 0 0 0 0 0\nchr1 69522 69523 G T 0 0 0 0 0 0 0 0 0 0\nchr1 83442 83443 C T 0 0 0 0 0 0 0 0 0 0\n```\n\n3. Running RADAR with the mutation recurrence score\n\nTo score this set of variants with the universal scores and the mutation recurrence score, run the following command:\n\n```\npython radar.py -b ../Breast.bed -o .. -c BRCA -mr\n```\n\nA head of the output file is shown below:\n\n```\nchr start stop ref alt cross_species_conservation RBP_binding_hub GERP Evofold motif_disruption RBP_gene_association mutation_recurrence total_universal total_tissue_specific total_score\nchr1 13506 13507 G A 0 0 0 0 0 0 0 0 0 0\nchr1 14841 14842 G T 0 0 0 0 0 0 0 0 0 0\nchr1 16995 16996 T C 0 0 0 0 0 0 0 0 0 0\nchr1 17764 17765 G A 0 0 0 0 0 0 0 0 0 0\nchr1 28587 28588 G T 0 0 0 0 0 0 0 0 0 0\nchr1 30527 30528 C T 0 0 0 0 0 0 0 0 0 0\nchr1 61396 61397 G A 0 0 0 0 0 0 0 0 0 0\nchr1 69522 69523 G T 0 0 0 0 0 0 0 0 0 0\nchr1 83442 83443 C T 0 0 0 0 0 0 0 0 0 0\n```\n\n4. Running RADAR with the RBP regulation power score\n\nTo score this set of variants with the universal scores and the RBP regulation power score, run the following command:\n\n```\npython radar.py -b ../Breast.bed -o .. -c BRCA -rp\n```\n\nA head of the output file is shown below:\n\n```\nchr start stop ref alt cross_species_conservation RBP_binding_hub GERP Evofold motif_disruption RBP_gene_association RBP_regulation_power total_universal total_tissue_specific total_score\nchr1 13506 13507 G A 0 0 0 0 0 0 0 0 0 0\nchr1 14841 14842 G T 0 0 0 0 0 0 0 0 0 0\nchr1 16995 16996 T C 0 0 0 0 0 0 0 0 0 0\nchr1 17764 17765 G A 0 0 0 0 0 0 0 0 0 0\nchr1 28587 28588 G T 0 0 0 0 0 0 0 0 0 0\nchr1 30527 30528 C T 0 0 0 0 0 0 0 0 0 0\nchr1 61396 61397 G A 0 0 0 0 0 0 0 0 0 0\nchr1 69522 69523 G T 0 0 0 0 0 0 0 0 0 0\nchr1 83442 83443 C T 0 0 0 0 0 0 0 0 0 0\n```\n\n5. Running RADAR with all tissue-specific scores\n\nTo score this set of variants with all scores (universal and all tissue-specific scores), run the following command:\n\n```\npython radar.py -b ../Breast.bed -o .. -c BRCA -kg -mr -rp\n```\n\nA head of the output file is shown below:\n\n```\nchr start stop ref alt cross_species_conservation RBP_binding_hub GERP Evofold motif_disruption RBP_gene_association total_universal key_genes mutation_recurrence RBP_regulation_power total_tissue_specific total_score\nchr1 13506 13507 G A 0 0 0 0 0 0 0 0 0 0 0 0\nchr1 14841 14842 G T 0 0 0 0 0 0 0 0 0 0 0 0\nchr1 16995 16996 T C 0 0 0 0 0 0 0 0 0 0 0 0\nchr1 17764 17765 G A 0 0 0 0 0 0 0 0 0 0 0 0\nchr1 28587 28588 G T 0 0 0 0 0 0 0 0 0 0 0 0\nchr1 30527 30528 C T 0 0 0 0 0 0 0 0 0 0 0 0\nchr1 61396 61397 G A 0 0 0 0 0 0 0 0 0 0 0 0\nchr1 69522 69523 G T 0 0 0 0 0 0 0 0 0 0 0 0\nchr1 83442 83443 C T 0 0 0 0 0 0 0 0 0 0 0 0\n```\n\n## Performance Benchmarks\n\nRuntime was measured on three sets of variants: \n\n100, 1,000, and 100,000 random variants from the Alexandrov breast cancer variants. 100 variants were scored in approx. 29 seconds, 1,000 variants were scored in  approx. 32 seconds, and 100,000 variants were scored in approx. 34 seconds.\n\n## Example\n\n### Input\n\nThe example Alexandrov breast cancer variants (25 MB)\n`example/example_input_BRCA`\n\n```\n...\n\nchr1 979769 979770 G T PD8623a\n\nchr1 984734 984735 A T TCGA-D8-A27M-01A-11D-A16D-09\n\nchr1 985340 985341 G T TCGA-C8-A12W-01A-11D-A10Y-09\n\nchr1 986796 986797 T G PD5935a\n```\n\n### Command\n\nThe following command will run RADAR and produce an output file in the `radar_output/` directory.\n\n```\npython radar.py -b Breast.bed -o radar_output/ -c BRCA -kg -mr -rp\n```\n\n\n### Output\n\nThe example Alexandrov breast cancer variants output (35 MB)\n`example/example_output_BRCA.bed`\n\n(Note that the ellipsis denotes truncated lines; it is not in the output.)\n\n```\nchr start stop ref alt cross_species_conservation RBP_binding_hub GERP Evofold motif_disruption RBP_gene_association total_universal key_genes mutation_recurrence RBP_regulation_power total_tissue_specific total_score\n...\nchr1 979769 979770 G T 1.06571460381 0.0 0.622834294638 0 1.05144331984 0 2.73999221829 1 1 0 2 4.73999221829\nchr1 984734 984735 A T 0 0 0 0 0 0 0 0 0 0 0 0\nchr1 985340 985341 G T 1.15940591176 0.0 4.53503723229e-33 0 1.11097289519 0 2.27037880695 1 1 0 2 4.27037880695\nchr1 986796 986797 T G 1.07533132443 0.0 4.53503723229e-33 0 0 0 1.07533132443 1 1 1 3 4.07533132443\n```\n\n## For any questions, please contact:\n* jingzhang.wti.bupt at gmail dot com\n* jason.j.liu at yale dot edu \n\n## License\n\nMIT License\n\nCopyright (c) 2018 Gerstein Lab\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgersteinlab%2Fradar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgersteinlab%2Fradar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgersteinlab%2Fradar/lists"}