Package: mmsplice
MMSplice & MTSplicePredict (tissue-specific) splicing variant effect from VCF. MTSplice is integrated into MMSplice with the same API.Paper: Cheng et al.https://doi.org/10.1101/438986,https://www.biorxiv.org/content/10.1101/2020.06.07.138453v1InstallationExternal dependencies:pipinstallcyvcf2cythonConda installation is recommended:condainstallcyvcf2cython-ypipinstallmmspliceRun MMSplice OnlineYou can run mmsplice with following google colab notebooks online:run on vcf filePreparation1. Prepare annotation (gtf) fileStandard human gene annotation file in GTF format can be downloaded from ensembl or gencode.MMSplicecan work directly with those files, however, some filtering is higly recommended.Filter for protein coding genes.2. Prepare variant (VCF) fileA correctly formatted VCF file with work withMMSplice, however the following steps will make it less prone to false positives:Quality filtering. Low quality variants leads to unreliable predictions.Avoid presenting multiple variants in one line by splitting them into multiple lines. Example code to do it:bcftoolsnorm-m-both-oout.vcfin.vcf.gzLeft-normalization. For instance, GGCA-->GG is not left-normalized while GCA-->G is. Details for unified representation of genetic variants seeTan et al.bcftoolsnorm-freference.fasta-oout.vcfin.vcf3. Prepare reference genome (fasta) fileHuman reference fasta file can be downloaded from ensembl/gencode. Make sure the chromosome name matches with GTF annotation file you use.Example codeChecknotebooks/example.ipynbTo score variants (including indels), we suggest to use primarily thedeltaLogitPSIpredictions, 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.MTSpliceTo predict tissue-specific variant effect with MTSplice, specifytissue_specific=TrueinSplicingVCFDataloader.# Importfrommmsplice.vcf_dataloaderimportSplicingVCFDataloaderfrommmspliceimportMMSplice,predict_save,predict_all_tablefrommmsplice.utilsimportmax_varEff# example filesgtf='tests/data/test.gtf'vcf='tests/data/test.vcf.gz'fasta='tests/data/hg19.nochr.chr17.fa'csv='pred.csv'Dataloader to load variants from vcfdl=SplicingVCFDataloader(gtf,fasta,vcf,tissue_specific=False)To predict tissue-specific effect, in the dataloader usetissue_specific=Truein the dataloader insteaddl=SplicingVCFDataloader(gtf,fasta,vcf,tissue_specific=True)Run prediction with default MMSplice parameters# Specify modelmodel=MMSplice()# Or predict and return as dfpredictions=predict_all_table(model,dl,pathogenicity=True,splicing_efficiency=True)To predict variant effect onscale instead of. This option only works with tissue specific predictionsdl = SplicingVCFDataloader(..., tissue_specific=True):# Or predict and return as dfpredictions=predict_all_table(model,dl,natural_scale=True)One variant might map to multiple exons. In the end we summarize the effect of as the maximum across all exons.# Summerize with maximum effect sizepredictionsMax=max_varEff(predictions)OutputOutput of MMSplice is an tabular data which contains following described columns:ID: id string of the variantdelta_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.exons: Genetics location of exon whose inclusion rate is effected by variantexon_id: Genetic id of exon whose inclusion rate is effected by variantgene_id: Genetic id of the gene which the exon belongs to.gene_name:  Name of the gene which the exon belongs to.transcript_id: Genetic id of the transcript which the exon belongs to.ref_acceptorIntron: acceptor intron score of the reference sequenceref_acceptor: acceptor score of the reference sequenceref_exon: exon score of the reference sequenceref_donor: donor score of the reference sequenceref_donorIntron: donor intron score of the reference sequencealt_acceptorIntron: acceptor intron score of variant sequencealt_acceptor: acceptor score of the sequence with variantalt_exon: exon score of the sequence with variantalt_donor: donor score of the sequence with variantalt_donorIntron: donor intron score of the sequence with variantpathogenicity: Potential pathogenic effect of the variant.efficiency: The effect of the variant on the splicing efficiency of the exon.VEP PluginThe VEP plugin wraps the prediction function frommmsplicepython package. Please check documentation of vep pluginunder VEP_plugin/README.md.=======
History1.0.0 (2019-07-23)Dependicies fixed #16Valide gtf, fasta, vcf chrom annotation #15Ship mmsplice with prebuild exon set. #12Faster variant overlapping with pyranges #11Batch prediction with masking update in exon module0.1.0 (2018-07-17)First release on PyPI.