{"id":21644839,"url":"https://github.com/gagneurlab/mmsplice_mtsplice","last_synced_at":"2025-12-14T05:14:11.709Z","repository":{"id":45277757,"uuid":"151174807","full_name":"gagneurlab/MMSplice_MTSplice","owner":"gagneurlab","description":"Tissue-specific variant effect predictions on splicing","archived":false,"fork":false,"pushed_at":"2023-05-23T21:12:49.000Z","size":86294,"stargazers_count":42,"open_issues_count":14,"forks_count":21,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-07T01:04:32.765Z","etag":null,"topics":["machine-learning","splicing","variant-effect-prediction","vep-plugin"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gagneurlab.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-10-01T23:33:17.000Z","updated_at":"2025-03-25T12:44:11.000Z","dependencies_parsed_at":"2023-01-31T01:30:58.424Z","dependency_job_id":"418ec6d8-9708-4948-8db1-aa985adb0849","html_url":"https://github.com/gagneurlab/MMSplice_MTSplice","commit_stats":null,"previous_names":["gagneurlab/mmsplice"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagneurlab%2FMMSplice_MTSplice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagneurlab%2FMMSplice_MTSplice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagneurlab%2FMMSplice_MTSplice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gagneurlab%2FMMSplice_MTSplice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gagneurlab","download_url":"https://codeload.github.com/gagneurlab/MMSplice_MTSplice/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248459127,"owners_count":21107233,"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":["machine-learning","splicing","variant-effect-prediction","vep-plugin"],"created_at":"2024-11-25T05:43:02.219Z","updated_at":"2025-12-14T05:14:06.645Z","avatar_url":"https://github.com/gagneurlab.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MMSplice \u0026 MTSplice\n[![CircleCI](https://circleci.com/gh/gagneurlab/MMSplice_MTSplice.svg?style=svg)](https://circleci.com/gh/gagneurlab/MMSplice_MTSplice)\n[![pypi](https://img.shields.io/pypi/v/mmsplice.svg)](https://pypi.python.org/pypi/mmsplice)\n\nPredict (tissue-specific) splicing variant effect from VCF. MTSplice is integrated into MMSplice with the same API.\n\nPaper: Cheng et al. https://doi.org/10.1101/438986, https://www.biorxiv.org/content/10.1101/2020.06.07.138453v1\n\n![MMSplice](https://raw.githubusercontent.com/kipoi/models/master/MMSplice/Model.png)\n![MTSplice](https://raw.githubusercontent.com/s6juncheng/figshare/master/MTSplice.JPG)\n\n## Installation\n-----------------\n\nExternal dependencies:\n```bash\npip install cyvcf2 cython\n```\n\nConda installation is recommended:\n```bash\nconda install cyvcf2 cython -y\n```\n\n```bash\npip install mmsplice\n```\n\n## Run MMSplice Online\n\nYou can run mmsplice with following google colab notebooks online:\n\n- [run on vcf file](https://colab.research.google.com/drive/1Kw5rHMXaxXXsmE3WecxbXyGQJma80Eq6)\n\n### Preparation\n-----------------\n\n#### 1. Prepare annotation (gtf) file\nStandard human gene annotation file in GTF format can be downloaded from ensembl or gencode.\n`MMSplice` can work directly with those files, however, some filtering is higly recommended.\n\n- Filter for protein coding genes.\n\n#### 2. Prepare variant (VCF) file\nA correctly formatted VCF file with work with `MMSplice`, however the following steps will make it less prone to false positives:\n\n- Quality filtering. Low quality variants leads to unreliable predictions.\n- Avoid presenting multiple variants in one line by splitting them into multiple lines. Example code to do it:\n  ```bash\n  bcftools norm -m-both -o out.vcf in.vcf.gz\n  ```\n- Left-normalization. For instance, GGCA--\u003eGG is not left-normalized while GCA--\u003eG is. Details for unified representation of genetic variants see [Tan et al.](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4481842/)\n  ```bash\n  bcftools norm -f reference.fasta -o out.vcf in.vcf\n  ```\n\n#### 3. Prepare reference genome (fasta) file\nHuman reference fasta file can be downloaded from ensembl/gencode. Make sure the chromosome name matches with GTF annotation file you use.\n\n\n### Example code\n-------------------\n\nCheck [notebooks/example.ipynb](https://github.com/gagneurlab/MMSplice/blob/master/notebooks/example.ipynb)\n\nTo score variants (including indels), we suggest to use primarily the `deltaLogitPSI` predictions, which is the default output. The differential splicing efficiency (dse) model was trained from MMSplice modules and exonic variants from MaPSy, thus only the predictions for exonic variants are calibrated.\n\n**MTSplice** To predict tissue-specific variant effect with MTSplice, specify `tissue_specific=True` in `SplicingVCFDataloader`.\n\n```python\n# Import\nfrom mmsplice.vcf_dataloader import SplicingVCFDataloader\nfrom mmsplice import MMSplice, predict_save, predict_all_table\nfrom mmsplice.utils import max_varEff\n\n# example files\ngtf = 'tests/data/test.gtf'\nvcf = 'tests/data/test.vcf.gz'\nfasta = 'tests/data/hg19.nochr.chr17.fa'\ncsv = 'pred.csv'\n```\nDataloader to load variants from vcf\n```python\ndl = SplicingVCFDataloader(gtf, fasta, vcf, tissue_specific=False)\n```\n\nTo predict tissue-specific effect, in the dataloader use `tissue_specific=True` in the dataloader instead\n```python\ndl = SplicingVCFDataloader(gtf, fasta, vcf, tissue_specific=True)\n```\n\nRun prediction with default MMSplice parameters\n```python\n# Specify model\nmodel = MMSplice()\n\n# Or predict and return as df\npredictions = predict_all_table(model, dl, pathogenicity=True, splicing_efficiency=True)\n```\n\nTo predict variant effect on \u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\Delta \\Psi\"\u003e scale instead of \u003cimg src=\"https://render.githubusercontent.com/render/math?math=\\Delta \\text{logit}(\\Psi)\"\u003e. This option only works with tissue specific predictions `dl = SplicingVCFDataloader(..., tissue_specific=True)`:\n```python\n# Or predict and return as df\npredictions = predict_all_table(model, dl, natural_scale=True)\n```\n\nOne variant might map to multiple exons. In the end we summarize the effect of as the maximum across all exons.\n```python\n# Summerize with maximum effect size\npredictionsMax = max_varEff(predictions)\n```\n\n### Output\n\nOutput of MMSplice is an tabular data which contains following described columns:\n\n* `ID`: id string of the variant\n* `delta_logit_psi`: The main score is predicted by MMSplice, which shows the effect of the variant on the inclusion level (PSI percent spliced in) of the exon. The score is on a logit scale.  If the score is positive, it shows that variant leads higher inclusion rate for the exon. If the score is negative, it shows that variant leads higher exclusion rate for the exon. If delta_logit_psi is bigger than 2 or smaller than -2, the effect of variant can be considered strong.\n* `exons`: Genetics location of exon whose inclusion rate is effected by variant\n* `exon_id`: Genetic id of exon whose inclusion rate is effected by variant\n* `gene_id`: Genetic id of the gene which the exon belongs to.\n* `gene_name`:  Name of the gene which the exon belongs to.\n* `transcript_id`: Genetic id of the transcript which the exon belongs to.\n* `ref_acceptorIntron`: acceptor intron score of the reference sequence\n* `ref_acceptor`: acceptor score of the reference sequence\n* `ref_exon`: exon score of the reference sequence\n* `ref_donor`: donor score of the reference sequence\n* `ref_donorIntron`: donor intron score of the reference sequence\n* `alt_acceptorIntron`: acceptor intron score of variant sequence\n* `alt_acceptor`: acceptor score of the sequence with variant\n* `alt_exon`: exon score of the sequence with variant\n* `alt_donor`: donor score of the sequence with variant\n* `alt_donorIntron`: donor intron score of the sequence with variant\n* `pathogenicity`: Potential pathogenic effect of the variant.\n* `efficiency`: The effect of the variant on the splicing efficiency of the exon.\n\n\n## VEP Plugin\n\nThe VEP plugin wraps the prediction function from `mmsplice` python package. Please check documentation of vep plugin [under VEP_plugin/README.md](VEP_plugin/README.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgagneurlab%2Fmmsplice_mtsplice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgagneurlab%2Fmmsplice_mtsplice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgagneurlab%2Fmmsplice_mtsplice/lists"}