There are many instances in genomics data analyses where measurements are made on a multivariate response. For example, alternative splicing can lead to multiple expressed isoforms from the same primary transcript. There are situations where differences  in the relative ratio of expressed isoforms may have significant phenotypic consequences or lead to prognostic capabilities. Similarly, knowledge of single nucleotide polymorphisms (SNPs) that affect splicing, so-called splicing quantitative trait loci (sQTL) will help to characterize the effects of genetic variation on gene expression. RNA sequencing (RNA-seq) has provided an attractive toolbox to carefully unravel alternative splicing outcomes and recently, fast and accurate methods for transcript quantification have become available. We propose a statistical framework based on the Dirichlet-multinomial distribution that can discover changes in isoform usage between conditions and SNPs that affect relative expression of transcripts using these quantifications. The Dirichlet-multinomial model naturally accounts for the differential gene expression without losing information about overall gene abundance and by joint modeling of isoform expression, it has the capability to account for their correlated nature. The main challenge in this approach is to get robust estimates of model parameters with limited numbers of replicates. We approach this by sharing information and show that our method improves on existing approaches in terms of standard statistical performance metrics. The framework is applicable to other multivariate scenarios, such as Poly-A-seq or where beta-binomial models have been applied . Our method is available as a Bioconductor R package called DRIMSeq. With the development of digital high-throughput sequencing technologies, the analysis of count data in genomics has become an important theme motivating the investigation of new, more powerful and robust approaches that handle complex overdispersion patterns while accommodating the typical small numbers of experimental units.5. A natural extension of the Poisson distribution that accounts for overdispersion is the negative-binomial distribution, which has been extensively studied in the small-sample situation and has become an essential tool in genomics applications3.The basic distribution for modeling univariate count responses is the Poisson distribution, which also approximates the binomial distribution. One important limitation of the Poisson distribution is that the mean is equal to the variance, which is not sufficient for modeling, for example, gene expression from RNA sequencing (RNA-seq) data where the variance is higher than the mean due to technical sources and biological variability6. Because of its flexibility, the DM distribution has found applications in forensic genetics7, microbiome data analysis8, the analysis of single-cell data9 and for identifying nucleosome positions10. Another extension of the multinomial is the Dirichlet negative multinomial distribution11, which allows modeling of correlated count data and was applied in the analysis of clinical trial recruitment12. Notably, the beta-binomial distribution, such as those used in differential methylation from bisulphite sequencing data15, represent a special case of the DM.Analogously, the fundamental distribution for modeling multivariate count data is the multinomial distribution, which models proportions across multiple features. To account for overdispersion, the multinomial can be extended to the Dirichlet-multinomial (DM) distribution16. Hence, gene expression can be viewed as a multivariate expression of transcripts or exons and such a representation allows the study of not only the overall gene expression, but also the expressed variant composition. Differences in the relative expression of isoforms can have significant phenotypic consequences and aberrations are associated with disease18. Thus, biologists are interested in using RNA-seq data to discover differences in transcript usage between conditions or to study the specific molecular mechanisms that mediate these changes, for example, alternative splice site usage. In general terms, we collect all these together under the term “differential splicing” (DS)19.Genes may express diverse transcript isoforms (mRNA variants) as a consequence of alternative splicing or due to the differences in transcription start sites and polyadenylation sitesAlternative splicing is a process regulated by complex protein-RNA interactions that can be altered by genetic variation. Knowledge of single nucleotide polymorphisms (SNPs) that affect splicing, known as splicing quantitative trait loci (sQTL), can help to characterize this layer of regulation.20. In particular, weighted likelihood is used to moderate the gene-wise dispersion toward a common or trended value.In this article, we propose the DM distribution to model relative usage of isoforms. The DM model treats transcript expression as a multivariate response and allows for flexible small-sample estimation of overdispersion. We address the challenge of obtaining robust estimates of the model parameters, especially dispersion, when only a small number of replicates is available by applying an empirical Bayes approach to share information, similar to those proven successful in negative-binomial frameworksBioconductor R package calledDRIMSeq, is applicable to both differential transcript usage (DTU) analysis between conditions and transcript usage quantitative trait loci (tuQTL) analysis. It has been evaluated and compared to the current best methods in extensive simulations and in real RNA-seq data analysis using transcript and exon counts, highlighting thatDRIMSeq performs best with transcript counts. Furthermore, the framework can be applied to other types of emerging multivariate genomic data, such as PolyA-seq where the collection of polyadenylated sites for a given gene are measured21 and to settings where the beta-binomial is already applied .The Dirichlet-multinomial framework, implemented as a23. Independently, a set of methods was developed for detecting genetic variation associated with changes in splicing (sQTLs). While sQTL detection represents a different application, it is essentially DS between groups defined by genotypes. In the following overview, we do not distinguish between applications but rather between the general concepts used to detect differences in splicing.RNA-seq has provided an attractive toolbox to unravel alternative splicing outcomes. There are various methods designed explicitly to detect DS based on samples from different experimental conditionsfeatureCounts24). Exons from different isoforms may have different boundaries, thus the authors ofDEXSeq25 quantify withHTSeq26 non-overlapping windows defined by projecting all exons to the linear genome. However, this strategy does not utilize the full information from junction reads. Such reads are counted multiple times , artificially increasing the total number of counts per gene and ignoring that junction reads support the isoforms that explicitly contain the combinations of exons spanned by these reads. This issue is captured inAltrans27, which quantifies exon-links (exon junctions) or inMISO28,rMATS29,SUPPA30 andSGSeq31, all of which calculate splicing event inclusion levels expressed as percentage spliced in (PSI). Such events capture not only cassette exons but also alternative 3’ and 5’ splice sites, mutually exclusive exons or intron retention.GLiMMPS32 and Jiaet al.33, with quantification fromPennSeq34, use event inclusion levels for detecting SNPs that are associated with differential splicing. However, there are  instances where changes in splicing pattern may not be captured by exon-level quantifications . Furthermore, detection of more complex transcript variations remains a challenge for exon junction or PSI methods . Sonesonet al.23 considered counting which accommodates various types of local splicing events, such as exon paths traced out by paired reads, junction counts or events that correspond to combinations of isoforms; in general, the default exon-based counting resulted in strongest performance for DS gene detection.DS can be studied in three main ways: as differential transcript usage (DTU) or, in a more local context, as differential exon or exon junction usage (DEU) or as specific splicing events , and all have their advantages and disadvantages. A survey of the main methods can be found inMISO28,BitSeq36,casper37,Cufflinks38,RSEM39,FlipFlop40 and more recent, extremely fast pseudoalignment-based methods, such asSailfish41,kallisto42 andSalmon43. Additionally,Cufflinks,casper andFlipFlop allow forde novo transcriptome assembly. Recently, performance of various methods was extensively studied45, including a webtool45 to allow further comparisons. Regardless of this progress, it remains a complex undertaking to quantify isoform expression from short cDNA fragments since there is a high degree of overlap between transcripts in complex genes; this is a limitation of the technology, not the algorithms. In the case of incomplete transcript annotation, local approaches may be more robust and can detect differential changes due to transcripts that are not in the catalog27. Nevertheless, DS at the resolution of isoforms is the ultimate goal within theDRIMSeq framework, and with the emergence of longer reads (fragments), transcript quantifications will become more accurate and methods for multivariate transcript abundances will be needed.The above methods allow for detection of differential usage of local splicing features, which can serve as an indicator of differential transcript usage but often without knowing specifically which isoforms are differentially regulated. This can be a disadvantage in cases where knowing the isoform ratio changes is important, since isoforms are the ultimate determinants of proteins. Moreover, exons are not independent transcriptional units but building blocks of transcripts. Thus, the main alternative is to make a calculation of DS using isoform-level quantitations. A vast number of methods is available for gene isoform quantification, such as47 or exon ratio48 ignores the correlated structure of these quantities . Similarly, separate modeling and testing of exon junctions (Altrans27) or splicing events  of a gene leads to non-independent statistical tests, although the full effect of this on calibration  is not known. Nevertheless, with the larger number of tests, the multiple testing correction becomes more extreme. In sQTL analyses, this burden is even larger since there are many SNPs tested for each gene. There, the issue of multiple comparisons is usually accounted for by applying a permutation scheme in combination with the false discovery rate (FDR) estimation50.Whether the differential analysis is done at the transcript or local level, modeling and testing independently each transcriptDEXSeq andvoom-diffSplice5 undertake another approach, where the modeling is done per gene.DEXSeq fits a generalized linear model (GLM), assuming that (exonic) read counts follow the negative-binomial distribution. A bin is deemed differentially used when its corresponding group-bin interaction is significantly different. The exact details ofvoom-diffSplice are not published. Nevertheless, exons are again treated as independent in the gene-level model.MISO28,Cuffdiff51 andsQTLseekeR35 model alternative splicing as a multivariate response.MISO is designed for DS analyses only between two samples and does not handle replicates. Variability among replicates is captured withinCuffdiff via the Jensen-Shannon divergence metric on probability distributions of isoform proportions as a measure of changes in isoform relative abundances between samples.sQTLseekeR tests for the association between genotype and transcript composition, using an approach similar to a multivariate analysis of variance (MANOVA) without assuming any probabilistic distribution and Hellinger distance as a dissimilarity measure between transcript ratios. Very recently,LeafCutter52 gives intron usage quantifications that can be used for both DS analyses  and sQTL analyses via a correlation-based approach withFastQTL50.In contrast,sQTLseekeR,Altrans,LeafCutter and other earlier methods for the sQTL analysis48 employ feature ratios to account for the overall gene expression. A potential drawback of this approach is that feature ratios do not take into account whether they are based on high or low expression, while the latter have more uncertainty in them.DRIMSeq naturally builds this invia the multinomial model.features of a gene. These features can be transcripts, exons, exonic bins or other multivariate measurable units, which for DS, contain information about isoform usage and can be quantified with (estimated) counts.In the application of the DM model to DS, we refer toq features with relative expression defined by a vector of proportionsπ = , and the feature countsY =  are random variables. Lety =  be the observed counts andm=∑j=1q yj. Here,m is treated as an ancillary statistic since it depends on the sequencing depth and gene expression, but not on the model parameters. The simplest way to model feature counts is with the multinomial distribution with probability function defined as:Y are (Y) =mπ and (Y) = diag(π) –ππT, respectively.Assume that a gene hasΠ, follow the (conjugate) Dirichlet distribution, with density function:jγ,j = 1, …,q are the Dirichlet parameters andγ+=∑j=1qγj. The mean and covariance matrix of random proportionsΠ are (Π) =γ/γ+ =π and(∏)={γ+diag(γ)−γγT}/{γ+2(γ++1)}, respectively. We can see that proportionsΠ are proportional toγ and their variance is inversely proportional toγ+, which is called the concentration or precision parameter. Asγ+ gets larger, the proportions are more concentrated around their means.To account for overdispersion due to true biological variation between experimental units as well as technical variation, such as library preparation and errors in transcript quantification, we assume the feature proportions,Y by multiplying densities Y by multY is unchanged at (Y) = {(Y|Π)} = (mΠ) =γm/γ+ =πm, while the covariance matrix ofY is given by (Y) =cm{diag(π) −ππT}, wherec = (m+γ+)/(1+γ+) is an additional factor when representing the Dirichlet-multinomial covariance to the ordinary multinomial covariance.c depends on concentration parameterγ+ which controls the degree of overdispersion and is inversely proportional to variance ofY.The mean ofπ =γ/γ+ andθ = 1/(1 +γ+); then, the covariance ofY can be represented as (Y) =n{diag(π) −ππT} {1 +θ(n − 1)}, whereθ can be interpreted as a dispersion parameter. Whenθ grows , the variance becomes larger. From the knowledge of the gamma function,xΓ(x) = Γ(x + 1), we can writeΓ(α+x)Γ(α)=∏r=1x{α+(r–1)}. Hence, the DM density function becomes:θ = 0, DM reduces to multinomial.We can represent the DM distribution using an alternative parameterization:DRIMSeq, the DM method can be used to detect the differential usage of gene features between two or more conditions. For simplicity, suppose that features of a gene are transcripts and the comparison is done between two groups. The aim is to determine whether transcript ratios of a gene are different in these two conditions. Formally, we want to test the hypothesisH0 :π1 =π2 against the alternativeH1 :π1 ≠π2. For the convenience of parameter estimation, we decide to use the DM parameterization with precision parameterγ+, which can take any non-negative value, instead of dispersion parameterθ, which is bounded to values between 0 and 1. Because our goal is to compare the proportions from two groups,γ+ is a nuisance parameter that gets estimated in the first step (see the following Section). Letl be the joint log-likelihood function. Assumingγ+=γ^+, the maximum likelihood (ML) estimates ofπ1,π2 are the solution ofdld=0. Under the hypothesisH1 :π1 =π2 =π, the ML estimate ofπ is the solution ofdldπ=0. We test the null hypothesis using a likelihood ratio statistic of the formχq–12 with q − 1 degrees of freedom. In comparisons acrossc groups, the number of degrees of freedom is (c − 1) × (q − 1). After all genes are tested, p-values can be adjusted for multiple comparisons with the Benjamini-Hochberg method.Within50, we apply a permutation approach to empirically assess the null distribution of associations and use it for the adjustment of nominal p-values  SNPs associatedwith transcript usage of a gene. Model fitting and testing is performed for each gene-SNP pair, and grouping of samples is defined by the genotype, typically translated into the number of minor alleles . Thus, tuQTL analyses are similar to DTU analyses with the difference that multiple models are fitted and tested for each gene. Additional challenges to be handled in tuQTL analyses include a large number of tests per gene with highly variable allele frequencies (models) and linkage disequilibrium, which can be accounted for in the multiple testing corrections. As in other sQTL studiesedgeR strategy53, we propose multiple approaches for dispersion estimation, all based on the maximization and adjustment of the profile likelihood, since standard maximum likelihood (ML) is known to produce biased estimates as it tends to underestimate variance parameters by not allowing for the fact that other unknown parameters are estimated from the same data55.Accurate parameter estimation is a challenge when only a small number of replicates is available. Following theγ+ . Hence, at this stage, proportionsπ1 andπ2 can be considered nuisance parameters and the profile log-likelihood (PL) forγ+ can be constructed by maximizing the log-likelihood function with respect to proportionsπ1 andπ2 for fixedγ+:In the DM model parameterization of our choice, we are interested in estimating the precision (concentration) parameter,55. To correct for that, one can apply an adjustment proposed by Cox and Reid56 and obtain an adjusted profile likelihood (APL):det denotes determinant andI is the observed information matrix for1π and2π. The interpretation of the correction term inAPL is that it penalizes values ofγ+ for which the information about1π and2π is relatively large. When data consists of many samples, one can use gene-wise dispersion estimates, i.e., the dispersion is estimated for each geneg = 1,…,G separately:The profile likelihood is then treated as an ordinary likelihood function for estimation and inference about parameters of interest. Unfortunately, with large numbers of nuisance parameters, this approach can produce inefficient or even inconsistent estimatesThese estimates become more unstable as the sample size decreases. At the other extreme, one can assume a common dispersion for all genes and use all genes to estimate it:58. Thus, moderated dispersion is a trade-off between gene-wise and common dispersion and estimates are calculated with an empirical Bayes approach, which uses a weighted combination of the common and individual likelihood:Common dispersion estimates are more stable but the assumption of a single dispersion for all genes is rather strong, given that some genes are under tighter regulation than others3, one can apply shrinkage towards this trend instead of to the common dispersion:If a dispersion-mean trend is present see, as commC is a set of genes that have similar gene expression as geneg andW is a weight defining the strength of moderation . In the first case, all genes have the same (common) dispersion, and in the second one, each gene has different (genewise) dispersion. Simulations for evaluating the dispersion moderation are intended to better resemble a real dataset. For these instances (repeated 25 times for 5000 genes), genes have expression, dispersion and proportions that were estimated from the real data. SeeWe first investigated the performance of the DM model and the approach for parameter estimation and inference in the case where only few replicates are available. We performed simulations that correspond to a two-group comparison with no DTU (i.e. null model) where feature counts were generated from the DM distribution with identical parameters in both groups. Simulations were repeated 50 times for 1000 genes. In these simulations, we can vary the overall expression (m), number of features (q), proportions (prop) and sample size in one condition (n). Proportions follow a uniform or decaying distribution or are estimated based onγ+ in comparison to raw profile likelihood (PL) estimates. Additionally, the median error of concentration estimates for Cox-Reid APL is always lower than for PL or maximum likelihood (ML) used in thedirmult package7  results in higher than expected nominal FP rates . MeanwhiAs expected, common dispersion estimation is effective when all genes indeed have the same dispersion, though this cannot be generally assumed in most real RNA-seq datasets (see results of simulations in the following section). In contrast, pure gene-wise estimates of dispersion lead to relatively high estimation error in small sample sizes . Thus, sIn these simulations, the overall best performance of the DM model is achieved when dispersion parameters are estimated with the Cox-Reid APL and the dispersion moderation is applied. This strategy leads to p-value distributions that in most of the cases are closer to the uniform distribution .et al.23, where RNA-seq reads were generated such that 1000 genes had isoform switches between two conditions of the two most abundant transcripts. For each condition three replicates were simulated resulting in 3 versus 3 comparisons. Altogether, we summarize results for three scenarios: i) Drosophila melanogaster with no differential gene expression; ii) Homo sapiens without differential gene expression; iii) Homo sapiens with differential gene expression.Next, we use the simulated data from SonesonDRIMSeq againstDEXSeq, which emerged among the top performing methods for detection of DTU from RNA-seq data23. ForDRIMSeq, we consider different dispersion estimates: common, gene-wise with no moderation and with moderation-to-common and to-trended dispersion. We use the exonic bin counts provided byHTSeq (same input to theDEXSeq pipeline), and transcript counts obtained withkallisto. Additionally, we useHTSeq andkallisto counts that are re-estimated after the removal of lowly expressed transcripts  from the gene annotation (pre-filtering) as proposed by Sonesonet al.23 andkallisto filtered counts that exclude the lowly expressed transcripts .DRIMSeq returns a p-value per gene. To make results comparable, we used the module withinDEXSeq that summarizes exon-level p-values to a gene-level adjusted p-value.The aim of these analyses is to compare the performance ofDRIMSeq achieves the best performance with moderated gene-wise dispersion estimates, while the difference in performance between moderating to common or to trended dispersion is quite small, with moderated-to-trend dispersion estimates being slightly more conservative  compared to gene-wise dispersions.rvative .et al.23, detecting DTU in human is harder than in fruit fly due to the more complex transcriptome of the first one; all methods have much smaller false discovery rate (FDR). Nevertheless, none of the methods manages to control the FDR at a given threshold in either of the simulations.As noted by Soneson23, affectsDEXSeq andDRIMSeq in a different way. ForDEXSeq, it strongly reduces the FDR. ForDRIMSeq, it increases power without a strong reduction of FDR. Moreover, the results forkallisto filtered and pre-filtered are almost identical . Similarly, dispersion estimation gives better results for transcript counts . In part59 . The aim was to identify genes regulated bypasilla, the Drosophila ortholog of mammalian splicing factorsNOVA1 andNOVA2. In this experiment, libraries were prepared from seven biologically independent samples: four control samples and three samples in whichpasilla was knocked down. Libraries were sequenced using a mixture of single-end and paired-end reads as well as different read lengths. The second data set is from matched human lung normal and adenocarcinoma samples from six Korean female nonsmoking patients60, using paired-end reads .To compare the methods further, we consider two public RNA-seq data sets. The first is the pasilla datasetDRIMSeq, but can be applied withinDEXSeq’s GLM framework. To make the comparison fair, we fit multiple models. For the pasilla dataset, we compare four control samples versus three pasilla knock-down samples without taking into account the library layout (model full) as well as compare only the paired-end samples, which removes the covariate. To not diminishDEXSeq for its ability to fit more complex models, we run it using a model that does the four control versus three knock-down comparison with library layout as an additional covariate (model full 2). For the adenocarcinoma data, we do a two-group comparison of six normal versus six cancer samples (model full) and forDEXSeq, we fit an extra model that takes into account patient effects (model full 2). Additionally, we do so-called "mock" analyses where samples from the same condition are compared (model null), and the expectation is to detect no DS since it is a within-condition comparison . In order to account for such effects, one should rather use a regression approach, which currently is not supported byDRIMSeq calls similar or fewer DS genes thanDEXSeq, and a majority of them are contained within theDEXSeq calls (DRIMSeq andDEXSeq and slightly more conservative nature ofDRIMSeq. Accounting for covariates inDEXSeq (model full 2) or performing the analysis on a subgroup without covariates (model full paired) results in more DS genes detected , where the two groups of individuals (each consisting of three women) happened to be very distinct , where the twoistinct . TherefoDEXSeq, this is also the case in the null comparisons, which shows thatDEXSeq works better with exonic counts than with transcript counts.DRIMSeq, on the other hand, has better performance on transcript counts, for which it calls less DS genes in the null analysis than with exon counts. In particular, the p-value distributions under the null indicate that DM fits better to transcript counts than exon counts  and even outperformsDEXSeq when the sample size is very small (model full paired).Method comparisons based on real data are very challenging as the truth is simply not known. In this sense the pasilla data is very precious, as the authors of this study have validated alternative usage of exons in 16 genes using RT-PCR. Of course, these validations represent an incomplete truth, and ideally, large-scale independent validation would be needed to comprehensively compare the DTU detection methods. InDRIMSeq to tuQTL analysis, we use the data from the GEUVADIS project46 where 465 RNA-seq samples from lymphoblastoid cell lines were sequenced, 422 of which were sequenced in the 1000 Genomes Project Phase 1. Here, we present the analysis of 91 samples corresponding to the CEU population and 89 samples from the YRI population. Expected transcript counts (obtained with Flux Capacitor) and genotype data were downloaded from the GEUVADIS project website. We choose to compare the performance ofDRIMSeq withsQTLseekeR, because it is a very recent tool that performs well35, can be directly applied to transcript count data and models transcript usage as a multivariate outcome.To demonstrate the application ofDRIMSeq andsQTLseekeR to have the same baseline for the comparison of the statistical engines offered by these packages. We keep the protein coding genes that have at least 10 counts in 70 or more samples and at least two transcripts left after the transcript filtering, which keeps the one that has at least 10 counts and proportion of at least 5% in 5 or more samples. The numbers of tested and associated genes and tuQTLs are indicated inFor both of the methods, we investigate only the bi-allelic SNPs with a minor allele present in at least five samples  and at least two alleles present in a population. Given a gene, we keep the SNPs that are located within 5 Kb upstream or downstream of the gene. We use the same pre-filtered counts inDRIMSeq andsQTLseekeR is quite high and reaches 75%. Nevertheless, there is considerable difference between the number and type of genes that are uniquely identified by each method.sQTLseekeR finds more genes with alternative splicing associated to genetic variation , we may see in the near future more direct counting of full-length transcripts, making transcript-level quantification more robust and accurate. Even with current standard RNA-seq data, ultrafast and lightweight methods make transcript counting more accessible and users will want to make comparative analyses directly from these estimates.Overall, there are many tradeoffs to be made in DS analyses. For example, deriving transcript abundances from RNA-seq data is more difficult  than directly counting exon inclusion levels of specific events. On the other hand, local splicing events may be not able to capture biologically interesting splice changes  but have ultimately more ability to detect DS in case when the transcript catalog is incomplete. Despite these tradeoffs and given the results observed here,vice versa;DRIMSeq is one of few tools that bridge these two applications. In particular, parameter estimation withDRIMSeq is suited for a situation where only a few replicates are available per group  as well as analyses over larger samples sizes . For small sample sizes, accurate dispersion estimation is especially challenging. Thus, we incorporate estimation techniques analogous to those used in negative binomial frameworks, such as Cox-Reid APL; perhaps not surprisingly, raw profile likelihood or standard maximum likelihood approaches do not perform as well in our tests of estimation performance. In addition, as with many successful genomics modeling frameworks, sharing information across genes leads to more stable and accurate estimation and therefore better inference .In principle, existing DS methods that allow multiple group comparisons could be adapted to the sQTL framework andDRIMSeq seems to be more conservative than bothDEXSeq (using transcript counts) andsQTLseekeR, identifying fewer DTU genes and tuQTLs, respectively. On the other hand,DEXSeq is known to be somewhat liberal23. Moreover, the sQTL associations detected byDRIMSeq have more enrichment in splicing-related features thansQTLseekeR tuQTLs, which could be due to the fact thatDRIMSeq accounts for the higher uncertainty of lowly expressed genes by using transcript counts instead of transcript ratios.In comparison to other available methods,DRIMSeq. As mentioned, the DM distribution is a multivariate generalization of the beta-binomial distribution, as the binomial and beta distributions are univariate versions of the multinomial and Dirichlet distributions, respectively. Although untested here, theDRIMSeq framework could be applied to analyses where the beta-binomial distribution are used with the advantage of naturally accommodating small-sample datasets. Interesting beta-binomial-based analyses include differential methylation using bisulphite sequencing data, where counts of methylated and unmethylated cytosines (a bivariate outcome) at specific genomic loci are compared, or allele-specific gene expression, where the expression of two alleles  are compared across experimental groups.Our developed DM framework is general enough that it can be applied to other genomic data with multivariate count outcomes. For example, PolyA-seq data quantifies the usage of multiple RNA polyadenylation sites. During polyadenylation, poly(A) tails can be added to different sites and thus more than one transcript can be produced from a single gene ; comparisons between groups of replicates can be conducted withDRIMSeq treats transcript estimates as fixed, even though they have different uncertainty, depending on the read coverage and complexity of the set of transcripts within a gene. Although untested here, propagation of this uncertainty could be achieved by incorporating observational weights that are inversely proportional to estimated uncertainties or, in case of fast quantification methods likekallisto, by making effective use of bootstrap samples. At this stage, there is no consensus on how these approaches will perform and ultimately may require considerable additional computation.One particularly important future enhancement is a regression framework, which would allow direct analysis of more complex experimental designs. For example, covariates such as batch, sample pairing or other factors could be adjusted for in the model. In the tuQTL analysis, it would allow studying samples from the pooled populations, with the subpopulation as a covariate, allowing larger sample sizes and increased power to detect interesting changes. Another potential limitation is thatThe Dirichlet-multinomial framework described in this paper is implemented within an R package called DRIMSeq. In addition to the user friendly workflow for the DTU and tuQTL analyses, it provides plotting functions that generate diagnostic figures such as the dispersion versus mean gene expression figures and histograms of p-values. User can also generate figures of the observed proportions and the DM estimated ratios for the genes of interest to visually investigate their individual splicing patterns.DRIMSeq is available on Bioconductorhttp://bioconductor.org/packages/DRIMSeq, and the latest development version can be found on GitHubhttps://github.com/markrobinsonuzh/DRIMSeq.The release version ofThe data referenced by this article are under copyright with the following copyright statement: Copyright: © 2016 Nowicka M and Robinson MDet al.23, where all the details on data generation and accessibility are available.Data for simulations that mimic real RNA-seq was obtained from SonesonDifferential splicing analyses were performed on the publicly available pasilla dataset, which was downloaded from the NCBI’s Gene Expression Omnibus (GEO) under the accession number GSE18508, and adenocarcinoma dataset under the accession number GSE37764.Data for the tuQTL analyses was downloaded from the GEUVADIS project website.All the details about data availability and preprocessing are described in theDRIMSeq analyses for this paper were done with version 0.3.3 available on Zenodohttps://zenodo.org/record/5308461 and Bioconductor release 3.2. Source code used for the analyses in this paper is available on Zenodohttps://zenodo.org/record/16730562. http://bioconductor.org/packages/MultiAssayExperiment) that allows multiple assay types over multiple sample sets.I appreciate that the authors have made an effort to address my comments and I'm particularly happy to see that my suggestion to check the overlap of tuQTLs with splice site binding sites reveals an improved enrichment by DRIMSeq. I also understand now the decision you took about not using the 'SummarizedExperiment' class. For the future development of DRIMSeq you may want to consider using the MultiAssayExperiment class , where both authors of DRIMSeq were involved, Cudiff was very conservative in detecting differential isoform/transcript usage (DTU). In that paper the authors assess DTU by switching the two most abundant isoforms and show that Cufdiff has a low true positive rate (TPR) at small magnitudes of the difference in relative abundance between the two most abundant isoforms per gene. However, in Supplementary Figure 10 of that paper, the authors show that at larger magnitudes of that difference, the TPR of Cufdiff improves substantially while correctly controlling the false discovery rate (FDR). The authors say that it is not worth made a comparison with Cufdiff because in the study by Soneson2 et al. (2014) find that Cuffdiff is very conservative. However, as far as I understand that paper, Frazee and co-workers are not evaluating DTU but differential transcript expression (DTE), and therefore, in my view, the experiments conducted on that paper do not warrant the conclusion that Cufdiff is overly conservative for DTU. In this paper the authors assess DTU following the same strategy of switching the two most abundant isoforms and I think it would be again very interesting to see how Cufdiff and DRIMSeq compare at different magnitudes of the change in isoform usage. The authors also argue that Frazee3et al. (2011) concluded that ESE predictions themselves are a poor indicator of the effect of SNPs on splicing patterns. However, Lalonde and co-workers scored ESE motifs with ESEfinder 3.0 , a method based on SELEX experiments conducted about 10 years ago and I would expect some advance in this field in the last decade. A recent study that seems to successfully use more recent ESE and ESS data to assess their enrichment with respect to polymorphisms is Supek4et al. (2014). The authors decided not to perform an enrichment analysis of tuQTLs on ESEs and ESSs because Lalonde While these two aspects remain, in my opinion, open, I think the statistical model of DRIMSeq proposed for DTU makes a lot sense and people interested in addressing biological questions that involve DTU should give it try, and I'm happy to approve the paper.I have read this submission. I believe that I have an appropriate level of expertise to confirm that it is of an acceptable scientific standard. package of the same name, to detect isoform expression changes between two conditions from RNA-seq data. The same method can be used to search for significant associations between SNPs and isoform quantifications obtained also from RNA-seq data (sQTLs).  The main novelty of this method with respect to the existing literature on this problem, is the joint modelling of transcript quantification values derived from isoforms of the same gene, by using a Dirichlet-multinomial model. This allows the method to account of the intrinsic dependency between quantification values of these isoforms.This article introduces a new statistical method, called DRIMSeq and implemented in a R/Bioconductor1, a statistical method for differential exon inclusion from RNA-seq data, as function of two different "isoform" quantification strategies: exonic-bin  count values calculated with HTSeq and transcript-quantification values calculated with kallisto2. The assessment of DRIMSeq on differential isoform usage provides a comparison of its performance with DEXSeq The experimental results make perfect sense, DRIMSeq works better than DEXSeq with transcript-quantification values and DEXSeq works better than DRIMSeq with exonic-bin count values. However, while both methods, and both types of "isoform" quantification input data, allow one to study the post-transcriptional processing of RNA transcripts, the kind of questions that can be addressed with each of them are different. Exonic-bin count values and DEXSeq can be used to investigate differential exon inclusion across conditions, which is a consequence of differential isoform usage, while transcript-quantification values and DRIMSeq can be used to directly investigate differential isoform usage.3 or sleuth4. A potentially interesting outcome of this comparison in the paper could be some sort of guidelines about when is it more sensible to investigate differential exon inclusion or differential isoform usage, depending on factors such as the biological question at hand, sequencing depth or number of biological replicates. However, this is apparently beyond the scope of this paper and the experimental results are in principle geared towards convincing the reader that DRIMSeq improves on existing approaches to discover changes in isoform usage, as suggested in the abstract. In my view, the experimental results do not address this question and I would suggest the authors to compare DRIMSeq with methods that also work with transcript-quantification values and assess differential isoform usage such as, for instance, Cuffdiff5. Evaluating performance in this context is challenging and the idea of assessing enrichment with respect to splicing-related features is a good one. However, the (two) presented features in Table 1 could be made more precise. It is unclear that a SNP close to a GWAS hit should be necessarily related to splicing and it is also unclear why one should expect splicing-related enrichment more than a few hundred nucleotides away from the intervening exon. While it is technically interesting to see a method being used to address two completely different research questions, in my view, mixing both types of analyses makes the article less focused. I would argue that both questions deserve separate papers, and that would allow the authors to investigate in depth critical aspects of both types of analysis that are currently not addressed in the current article. The experimental results on searching for sQTLs compare favourably DRIMSeq with an existing tool for that purpose, sQTLseekR In summary, this article provides an interesting new methodology for the analysis of differential isoform usage from RNA-seq data, it is well-written and the implemented software runs smoothly and is well documented. However, in my view, the current experimental results of the article are not that informative for the reader to learn what advantages DRIMSeq provides over other tools for differential isoform usage analysis, and to decide whether he/she should be doing a differential isoform usage, or a differential exon inclusion analysis, if this were a goal of the comparison with DEXSeq.I would replace the term "edgeR ideology" in page 5 by "edgeR strategy".In page 9 it is described that the distributions of raw p-values shown in Supplementary Figures S28 and S29 fit "better" when derived from transcript quantification values than from exonic-bin count values, but in fact in both cases the distributions are non-uniform for p-values distributed under the null hypothesis. This can be easily shown with the data from vignette of the DRIMSeq package when skipping the step that reduces the transcript set to analyze to speed up the building time of the vignette. This is not openly discussed in the paper but I would argue that it is quite critical to know under what technical assumptions the proposed hypothesis test leads to uniform raw p-values under the null, as this has a direct consequence on the control of the probability of the type-I error.The sQTL analysis described in pages 9, 10 and 11 uses transcript-quantification values from FluxCapacitor. If the entire first part of the paper shows the performance metrics of DRIMSeq using kallisto, in my view, it would make more sense to use kallisto for this analysis as well.6.With regard to the implementation in the R/Bioconductor software package DRIMSeq, the authors have implemented a specialized S4 object class called 'dmDSdata' to act as a container for counts and information about samples.  Since the package forms part of the Bioconductor project, I think it would better for both, the end-user and the developer authors, that the package re-uses the 'SummarizedExperiment' class as container for counts and sample information. This would facilitate the integration of DRIMSeq into existing or new workflows for the analysis of RNA-seq data. As an example of the limitations derived from providing a completely new specialized object class, the dimensions of a 'dmDSdata' object in terms of number of features and number of samples cannot be figured out using the expected call to the 'dim' accessor method. Of course the authors may add that method to the 'dmDSdata' object class but, in general, there are obvious advantages derived from enabling data interoperability through the use of common data structures across Bioconductor software packages Minor comments:I have read this submission. I believe that I have an appropriate level of expertise to confirm that it is of an acceptable scientific standard, however I have significant reservations, as outlined above. Thank you for taking the time to read and review our paper.DEXSeq is a package designed for the differential exon usage (DEU) and returns exon-level p-values, which can be also summarized to the gene level. In principle,DEXSeq’s implementation could be used to address the question of differential isoform/transcript usage (DTU) as well, which was done, for example, in the simulation study by Sonesonet al. [1]. They use different counting strategies, among them transcript quantifications fromkallisto [2], coupled withDEXSeq’s differential engine to detect differential transcript usage.DRIMSeq, based on the Dirichlet-multinomial model, was developed to detect differential usage of any kind of multivariate genomic features at the gene-level. Thus potentially, bothDEXSeq andDRIMSeq can be applied to exon counts and to transcript quantifications. However, from our comparisons, which were performed at the gene-level, the performance ofDEXSeq andDRIMSeq is different on these different types of counts.DEXSeq performs better on exon counts andDRIMSeq on transcript counts.Cuffdiff [3] in our comparisons here because in the study by Sonesonet al. [1], it performed poorly compared toDEXSeq. In particular,Cuffdiff was very conservative having low false discovery rate (FDR) at the cost of very low power for detecting DTU. The conservative nature ofCuffdiff for differential transcript expression, was also pointed out by Frazeeet al. [4]. We decided to compareDRIMSeq only to the top performing method,DEXSeq. The other tool proposed by the Reviewer, sleuth [5], is meant for differential transcript expression analyses, not DTU. We have not usedDRIMSeq since it outperformedDEXSeq in this type of analysis and there are no other tools for differential transcript usage that were intended for transcript level quantifications from the latest generation of fast quantification tools, such as kallisto [2] orSalmon [7]. The scope of this paper was not to justify exon or transcript level analysis, for that one could refer to the comparison paper by Hooper [6], but to propose a methodologically-sound tool for differential isoform usage analysis or detect transcript usage QTLs based on transcript quantifications. We propose to useDEXSeq returns p-values per feature (exon or transcript), which can be also summarized to the gene level.DRIMSeq performs gene-level tests and returns p-values per gene only. When the interest is in detecting specific exons or isoforms that change, one should useDEXSeq because currentlyDRIMSeq does not provide any post hoc analysis . We have not investigated the differences in performance due to sequencing depth or number of biological replicates, but we believe that the requirements would be basically the same in these terms for both of the methods. What matters is the completeness of annotation. Detecting DTU based on exon counts is generally more robust than that based on transcript quantifications when the annotation is incomplete, which was investigated in detail by Sonesonet al. [1]. Importantly,DRIMSeq andsQTLseekeR, we use the splicing-related features that were also used in thesQTLseekeR paper [8] to comparesQTLseekeR against other methods. The Reviewer suggested to consider other splicing-related features, such as exonic splicing enhancers (ESEs), exonic splicing silencers (ESSs) and splice sites. We have added the frequency of tuQTL overlapping with the splice sites to Table 1. However, we have not performed analyses on ESEs and ESSs since Lalondeet al. [9] concluded from their study that "ESE predictions themselves are a poor indicator of the effect of SNPs on splicing patterns". To compare the performance ofDRIMSeq. We believe we have addressed in sufficient depth aspects of both of these analyses providing comparisons on simulated and real data. By addressing differential splicing and sQTLs in one paper, our aim was to show that methods used for these analyses are based on statistical approaches that in the end tackle ultimately the same question: differential splicing between conditions. Both analyses employ the same methods for gene feature quantification and potentially one main differential engine could be used with slight analysis- specific adjustments, such as information sharing between genes for small sample size data or using genotypes as grouping factor, which is done inWe have replaced the term "edgeR ideology" in page 5 by "edgeR strategy".DRIMSeq p-value distributions under the null hypothesis of no differential transcript usage . Overall, using the Cox-Reid adjusted profile likelihood and the dispersion moderation leads to p-value distributions that in most cases are closer to the uniform distribution . The better fit of the DM model to transcript counts in comparison to exon counts can be seen in Figure S14, where the p-value distributions are more uniform for simulations that mimickallisto counts than for simulations that mimicHTseq counts.As suggested, we have investigated in more depth, based on simulations from the DM model, thekallisto counts would be more consistent with the rest of our manuscript. Nevertheless, we decided to to use the Flux Capacitor counts because they were already available on the GEUVADIS project website and have been used extensively in other projects, for example, in the sQTLseekeR paper. Moreover, we think that using other counts should not affect the comparison between DRIMSeq and sQTLseekeR.Yes, usingWe had already considered the SummarizedExperiment class while developing the DRIMSeq package. However, it does not provide features and functionality that we need for storing the count data and DRIMSeq results. In particular, the dimensions of Assays in SummarizedExperiment must be the same. That is not the case for us for two reasons. Firstly, each gene has multiple transcripts and, for example, the table with proportion estimates per transcript is larger than a table with dispersion estimates which are available per gene. Second, in the QTL analysis, table with transcript counts has different dimensions than table with genotypes. Additionally, we use matrices instead of data frames to store our data because the former occupies less space. Specifically, we have created a class called MatrixList, which is adjusted to store data where each gene has multiple features quantified and allows a quick access to these counts in per gene basis. We have not implemented the dim method on dmDSdata or dmSQTLdata because we want to keep consistency between them and, for example, dmSQTLdata contains transcript counts and genotypes which have different dimensions. Thus we decided to make the dim methods available for the counts and genotypes slots in these classes but not for the classes themselves. Addressing the minor comments: References [1]  Charlotte Soneson, Katarina L Matthes, Malgorzata Nowicka, Charity W Law, and Mark D Robinson. Isoform prefiltering improves performance of count-based methods for analysis of differential transcript usage. Genome Biology, 17(1):1–15, 2016. [2]  Nicolas L Bray, Harold Pimentel, Pall Melsted, and Lior Pachter. Near-optimal probabilistic RNA-seq quantification. Nat Biotech, advance on, Apr 2016. [3]  Cole Trapnell, David G Hendrickson, Martin Sauvageau, Loyal Goff, John L Rinn, and Lior Pachter. Differential analysis of gene regulation at transcript resolution with RNA-seq. Nature biotechnology, 31(1):46–53, 2013. [4]  A. C. Frazee, G. Pertea, a. E. Jaffe, B. Langmead, S. L. Salzberg, and J. T. Leek. Flexible isoform-level differential expression analysis with Ballgown. bioRxiv, pages 0–13, 2014. [5]  Harold J Pimentel, Nicolas Bray, Suzette Puente, Páll Melsted, and Lior Pachter. Differential analysis of RNA-Seq incorporating quantification uncertainty. bioRxiv, Jun 2016. [6]  Joan E Hooper. A survey of software for genome-wide discovery of differential splicing in RNA-Seq data. Human genomics, 8:3, 2014. [7]  Rob Patro, Geet Duggal, and Carl Kingsford. Salmon: Accurate, Versatile and Ultrafast Quantification from RNA-seq Data using Lightweight-Alignment. bioRxiv, page 021592, 2015. [8]  Jean Monlong, Miquel Calvo, Pedro G. Ferreira, and Roderic Guigó. Identification of genetic variants associated with alternative splicing using sQTLseekeR. Nature Communications, 5(May):4698, Aug 2014. [9]  Emilie Lalonde, Kevin C H Ha, Zibo Wang, Amandine Bemmo, Claudia L Kleinman, Tony Kwan, Tomi Pastinen, and Jacek Majewski. RNA sequencing reveals the role of splicing polymorphisms in regulating human gene expression. Genome Research, 21(4):545–554, Apr 2011. Nowicka and Robinson propose a novel method, called DRIMSeq, to test for differential transcript usage between groups of samples using RNA-seq. The method is based on the Dirichlet-multinomial distribution.et al. provide a proof of principle of their method by applying it to both simulated and real RNA-seq data. They also compare the performance of DRIMSeq with DEXSeq and sQTLseekeR in detecting differential transcript usage and splicing quantitative trait loci (sQTLs), respectively. DRIMSeq shows high concordance with DEXSeq. Furthermore, the authors demonstrate that DRIMSeq performs better than DEXSeq when using transcript-level counts. DRIMSeq and sQTLseekeR were also highly concordant. Nevertheless, sQTL genes detected by DRIMSeq were expressed higher than those detected by sQTLseekeR, and sQTLs detected by DRIMSeq were in closer proximity to exons compared to sQTLs detected by sQTLseeker. DRIMSeq is implemented as an R/Bioconductor package. The authors evaluate different existing approaches to estimate the parameters of their model using simulated experiments with a small number of replicates, which is a common scenario of high-throughput sequencing experiments. Furthermore, Nowicka Overall, the manuscript is well presented and is scientifically sound. The description of the method is clear, the comparisons are fair, and the conclusions are supported by data and analyses. Below some minor comments:Transcription of multiple isoforms from a single gene can be the consequence of differences in the following molecular mechanisms: transcription start sites, splicing, and termination of transcription.  The terms “differential splicing” and “splicing QTLs”, which are used throughout the manuscript and the package vignette, focus only on splicing. Consider a hypothetical example of an isoform switch between conditions in which the two isoforms only diverge by the transcription start site of the first exon. DRIMSeq should also detect this difference, and this would not be due to differential splicing. Thus, the authors could use more generic terminology that describes all possible interpretations of the outcome of their test. Perhaps “differential transcript usage” or “transcript usage QTLs”?PL andAPL are understandable from the context but are not defined in the text. In equations 6-11,et al. (2016) in the main text of this manuscript .It would be useful for the reader to include more information of the simulated data from SonsesonThe authors describe how DEXSeq can account for additional covariates in complex experimental designs. This paragraph, as well as the figures and supplementary material associated to it, could be understood as if DEXSeq fits GLMs only for complex experimental designs. In reality, DEXSeq always fits GLMs, even for simple two-group comparisons.There are some panels from the supplementary figures where data are missing. Specifically, Fig. S13 has 3 empty panels and Fig. S21 the left panels are missing the data for “dexseq.prefilter5” and “drimseq_genewise_grid_trended.filter5”.et al., 2016) could also be added.The list of software for splicing event quantification is already very extensive, however a citation to the Bioconductor package SGSeq .  Since many abbreviations repeat several times through the supplementary information, it would be useful to include a glossary of all abbreviations at the beginning of all supplementary figures.   I have read this submission. I believe that I have an appropriate level of expertise to confirm that it is of an acceptable scientific standard. Thank you for taking the time to read and review our paper. As per your suggestion, we have now stressed that DRIMSeq can be applied to differential transcript usage (DTU), which accounts for not only differential splicing but also the differences in transcription start sites and differential transcript termination. In the QTL analysis, as we test for associations between genotypes and transcript usage and not only splicing, following your suggestion, we have also changed the term from splicing QTLs (sQTLs) to transcript usage QTLs (tuQTLs).defining the abbreviations of profile likelihood (PL) and adjusted profile likelihood (APL),et al. [1],adding the sample size information about the simulations from Sonesonin order to remove the misleading suggestion that DEXSeq fits GLMs only in the complex designs, we have changed the names of the models used in real data analysis from "model full glm" to "model full 2" and paraphrased the corresponding manuscript sections,we have included results for the panels with missing data in the Supplementary Figures S15, S16 and S24,we have included the citation to SGSeq [2] - the Bioconductor package for analyzing splice events from RNA-seq data,in the Supplementary Materials, we have prepared a section explaining abbreviations used in the subsequent Supplementary Figures. References We have addressed all the other minor comments which include: [1]  Charlotte Soneson, Katarina L Matthes, Malgorzata Nowicka, Charity W Law, and Mark D Robinson. Isoform prefiltering improves performance of count-based methods for analysis of differential transcript usage. Genome Biology, 17(1):1–15, 2016. [2]  Leonard D Goldstein, Yi Cao, Gregoire Pau, Michael Lawrence, Thomas D Wu, Somasekar Seshagiri, and Robert Gentleman. Prediction and Quantification of Splice Events from RNA-Seq Data. PLoS ONE, 11(5):e0156132, may 2016.


We use stochastic variational inference for efficient posterior estimates and demonstrate superior precision and recall for simulations compared to state-of-the-art isoform reconstruction methods. biisq shows the most gains for low abundance isoforms, with 36% more isoforms correctly inferred at low coverage versus a multi-sample method and 170% more versus single-sample methods. We estimate isoforms in the GEUVADIS RNA-seq data and validate inferred isoforms by associating genetic variants with isoform ratios.Most human protein-coding genes can be transcribed into multiple distinct mRNA isoforms. These alternative splicing patterns encourage molecular diversity, and dysregulation of isoform expression plays an important role in disease etiology. However, isoforms are difficult to characterize from short-read RNA-seq data because they share identical subsequences and occur in different frequencies across tissues and samples. Here, we develop  biisq, a Bayesian nonparametric approach to discover and quantify isoforms from RNA-seq data.Alternative splicing leads to transcript isoform diversity. Here, Aguiar et al. develop  Isoforms can differ by alternative transcription initiation sites, alternative usage of splice sites (either 5′ donor or 3′ acceptor sites), alternative polyadenylation sites, or variable inclusion of entire exons or introns  that do not generalize to mixtures of existing technologies or new technologies with different biases.While many tools exist for isoform reconstruction using RNA-seq data, these methods have a number of drawbacks. First, many quantification methods assume that a high-resolution isoform sequence reference is available for each gene in the genomebiisq), addresses these limitations. First, biisq uses annotations of transcribed regions as prior information25, but the number and composition of isoforms across samples are estimated directly from the data, and the catalog of isoforms may grow with additional observations. Second, biisq explicitly captures isoforms shared across samples using a Bayesian hierarchical admixture model, which models multiple samples jointly and borrows statistical strength across samples to identify shared isoforms that may be in low abundance. Third, biisq assumes that each nucleotide base in an isoform has an independent frequency in the mapped reads, allowing biisq to account for read mapping biases in RNA-seq data26.Our method, Bayesian isoform discovery and individual specific quantification  software16 and by simulating short-read data from available Pacific Biosciences (PacBio) Iso-seq data, which include 1–10 kb sequence reads potentially capturing full-length isoforms28. Finally, we apply biisq to a large RNA-seq data set from lymphoblastoid cell lines (LCLs)29 to identify the catalog of isoforms across samples. We use our catalog of sample-specific inferred isoforms and genotype data to identify genetic variants associated with isoform ratios and then to assess the functional significance of alternatively spliced genes and associated splicing variants.We develop a computationally tractable stochastic variational inference (SVI) algorithm to fit this model to short-read RNA-seq data to estimate the structure of isoforms, probabilistically assign reads to isoforms, and compute sample-specific and global isoform proportionsbiisq, approaches this problem by postulating a model of isoform composition and relative isoform abundance shared across samples. Specifically, biisq implements a Bayesian nonparametric hierarchical model of RNA-seq reads and isoforms inspired by the hierarchical Dirichlet process30, and we use stochastic variational inference (SVI) methods for computationally tractable and robust posterior inference27. Importantly, in our model, exon usage, RNA-seq read assignments, and the sample-specific and global isoform proportions are interpretable parameters that translate directly to isoform composition, and global and sample-level isoform quantification (see Methods).The goal of isoform reconstruction and quantification is to robustly estimate both absolute and relative mRNA isoform expression levels for transcripts expressed at both low and high levels, and for each sample in short-read RNA-seq data from multiple samples. Our method, biisq model probabilistically maps each RNA-seq read into a distribution over isoform exon compositions. Sample-specific isoform proportions are drawn from a global distribution over an arbitrarily large catalog of isoforms. The exon composition of each isoform is modeled with a structured prior over exon usage that constrains the space of possible isoforms to those with support in the observed RNA-seq reads. The model grows the global isoform catalog by constructing novel isoforms given observed RNA-seq reads inconsistent with the current catalog.The biisq32. In brief, the posterior distribution of the biisq model is intractable to compute directly; instead, we hypothesize a family of tractable variational distributions. Then, we iteratively compute the values of the variational parameters that minimize the distance between the variational and true posterior distributions with respect to the Kullback–Leibler divergence34. biisq implements stochastic variational inference (SVI), an extension of variational inference that uses random subsets of the samples to update the variational parameters27.Variational methods enable computationally tractable posterior inference in Bayesian models such as 35. Transcriptome annotation-dependent methods require complete annotation of the transcriptome, including isoform transcripts and splice junctions16. In contrast, annotation-free methods require neither transcriptome nor genome annotations37. A third class of method requires annotations of transcribed regions but is agnostic to isoform and splicing annotations22; our method biisq is in this category. Methods may include modes that cross these categories. For example, Cufflinks has evaluation modes that can be annotation free or guided by reference annotations of transcribed regions20.Methods for jointly inferring and quantifying alternatively spliced transcripts can be broadly partitioned based on the required level of reference annotationbiisq with four representative isoform reconstruction and quantification methods: Cufflinks20, CEM22, SLIDE21, and ISP19. These methods were selected based on the following criteria: (i) the ability to use annotations of transcribed genomic regions for isoform discovery and quantification, but no requirement for isoform transcripts or splice junction annotations; (ii) coverage of combinatorial and statistical approaches; (iii) support for both single-end and paired-end reads; and (iv) high-quality performance in a recent benchmark study of isoform detection and quantification38. While ISP does not leverage available gene annotations, it does support isoform reconstruction across multiple samples simultaneously.We compared results from 20. After filtering erroneous spliced read alignments, aligned reads are assigned to vertices in an overlap graph, whose edges represent isoform compatibility between aligned reads. Transcript assembly then reduces to finding a minimum set of paths through the overlap graph such that each aligned read is part of a path. Transcript quantification uses a statistical model for RNA-seq reads to compute a point estimate of the isoform quantifications, extending an earlier unpaired modelCufflinks uses a parsimonious approach to isoform discovery in order to find the minimal number of transcripts to explain the aligned reads40, constructs a connectivity graph to generate a set of candidate isoforms22. CEM and IsoLasso model the coverage of aligned reads at each location as a Poisson distribution and use lasso regression to produce a set of inferred isoforms and abundance levels. The principle difference between CEM and IsoLasso is how candidate isoforms are selected: CEM uses expectation maximization (EM) while IsoLasso solves a quadratic program. In our comparison, we preferred CEM because of superior performance demonstrated on benchmark data22.CEM, an extension of the method IsoLasso21. SLIDE computes the number of aligned read start and end positions that group into transcribed regions of exons and organizes them into bins. Isoform proportions are quantified using a linear model of the observed bin proportions; a modified lasso penalty limits the number and composition of isoforms. We ran SLIDE using two settings of the regularization parameter, λ = 0.01 (denoted SLIDE_more) and λ = 0.2 (denoted SLIDE_fewer), which encourages more and fewer discovered isoforms, respectively.The sparse linear modeling for isoform discovery and abundance estimation (SLIDE) method implements a statistical approach based on the start and end positions of aligned reads41; vertices in this graph denote transcribed segments, and edges connect two segments if there exists one or more reads supporting their adjacency. In this model, every distinct path corresponds to a possible isoform segment. By assigning weights to edges that are inversely proportional to the probability of inclusion in an isoform, the problem of isoform reconstruction is equivalent to solving an iterative shortest path problem.The iterative shortest path (ISP) isoform reconstruction method builds a multi-sample generalization of the connectivity graph often used for transcriptome assembly42. Precision and recall were calculated based on exact full-length isoform matches between simulated and estimated isoforms biisq showed significantly higher precision across the 3102 genes . However, ISP showed significantly higher recall at the cost of lower precision than both biisq and Cufflinks . biisq achieves the second highest recall for both perfect and partial matches.To test the accuracy of each method, we applied the five isoform reconstruction methods to these simulated data and computed the precision and recall of the isoform discovery results—both perfect and partial matches Fig. . For bot42. When only the exons internal to the true transcription start and end sites are considered, the performance of all methods improves dramatically; biisq achieves the highest mean precision with 0.612, and ISP achieves the highest mean recall with 0.568, while the relative ranking of the methods in terms of precision and recall remains the same  when factoring the results by the number of transcripts . Correlation improves for biisq, Cufflinks, and CEM for high coverage transcripts . We omitted ISP from these results as ISP reports expression as a percentage and relies on third-party methods to compute RPKMods Fig. , typical28. Iso-Seq reads may span entire RNA transcripts, making the characterization of isoform composition straightforward relative to inference from short-read data, where a short read may map to multiple isoforms. While long-read sequencing allows experimentally driven evaluation of isoform reconstruction, the cost and platform-specific error rates make this technology unlikely to replace short-read RNA-seq in the near future, necessitating the development of methods such as biisq. Further, while long reads facilitate isoform reconstruction, quantifying isoforms is challenging due to low throughput, making precision and recall the principal metrics for evaluation of Iso-Seq data44.The BEERS-simulated data models technology-specific biases of short-read RNA-seq data but does not capture the exon composition of true transcript isoforms. The Pacific Biosciences Iso-Seq protocol enables single molecule transcriptome sequencing with read lengths of up to 10 kb45 . To account for the platform-specific biases in Iso-Seq, we evaluated both GMAP and STARlong’s Iso-Seq read alignments to the human genome version hg1946, we evaluated the four methods that support PacBio reference sequences: biisq, CEM, Cufflinks, and SLIDE. biisq achieved the highest precision and recall from both exact and partial matching thresholds across the seven Iso-Seq transcripts  precision and recall. Due to the complex error profile and high error rates in PacBio sequencingpts Fig. . This stpts Fig. . Importare Figs. .Fig. 4Cobiisq inferred 5395 transcripts while Cufflinks, SLIDE_fewer, SLIDE_more, and CEM inferred 3111, 2074, 1221, and 1003 transcripts, respectively. Rankings of quantification results on paired-end data largely mirrored the BEERS simulations, with Cufflinks and biisq achieving the highest correlation between true and inferred expression . biisq and Cufflinks showed the greatest agreement between any pair of methods  from the GEUVADIS RNA sequencing project for 1000 Genomes Project samples29. We built a model of transcription for each gene from the human genome annotations in GENCODE release 19 and mapped RNA-seq reads with STAR 2-pass to the human genome version hg19 (Methods). Applying biisq to these data, we discovered 31,712 novel and 14,044 known transcript isoforms with respect to the GENCODE database v19 transcript isoform annotations, considering only perfect matches to isoform exon composition. When using a matching threshold of 0.2, we discovered 24,871 novel and 20,885 known isoforms. The distribution of the number of isoforms per gene is peaked for genes with no evidence of alternative splicing (one transcript) and heavily spliced genes (≥7 transcripts), although this distribution could be confounded by erroneous splice junctions and fragmented transcripts in the biisq output  or population  when counts were aggregated across protein-coding genes. We computed population- and sex-specific transcript ratio distributions for each protein-coding gene separately using likelihood ratio (LR) tests (Methods). We found 924 and 148 genes that showed population- and sex-specific transcript ratio distributions, respectively , but females show more variable isoform expression levels than males, in particular for isoform 5 . We set the MAF threshold relatively high for this test because we wanted to discriminate between closely related populations with fewer samples in each. We also found an overabundance of European- or African-specific alleles . We found a similar overabundance of sex-specific alleles ; allelic variation for autosomal chromosomes is unbiased, and thus sex thresholds are closer to 0.5.Next, due to scarce information on population- or sex-specific transcript ratios, we validated these results by testing for over-representation of population- and sex-specific variants in the exonic and intronic regions of the 924 and 148 genes  associate transcript ratios with genotype, deconvolving regulation of expression of each of the gene transcripts29. We validated the RNA isoforms that biisq identified in GEUVADIS by finding both cis-eQTLs and cis-trQTLs using GEUVADIS genotype data, by separating CEU and YRI populations (following the GEUVADIS paper), and also jointly across both populations50 (see Methods). In the CEU/YRI separated analysis, we identified 692  unique cis-trQTLs at 5% FDR compared to 639  in the GEUVADIS study29. Finding three times as many cis-trQTLs in YRI may be indicative of biisq's increased power to find lowly expressed isoforms or a relative deficiency of YRI transcripts compared to CEU in reference databases. Only 27 of the 639 genes (4.2%) identified as cis-trQTLs in GEUVADIS were also annotated as cis-trQTLs in our analysis. In total, 492 of the 692 cis-trQTLs (71.1%) in our results also had significant evidence as cis-eQTLs; in contrast, 292 of the 639 cis-trQTLs (45.7%) in the GEUVADIS study were also cis-eQTLs. This suggests that some loci may act simultaneously as a cis-eQTL and cis-trQTL, or that the regulation of transcript ratios can obfuscate gene-level quantification.Expression quantitative trait loci (eQTLs) are genetic variants that regulate RNA expressionIn the joint mapping of CEU and YRI data, we identified a total of 766 cis-trQTLs and 11,687 cis-eQTLs  was identified for gene LCN8 by biisq 49. We also identified the SNCA gene among the 721 genes with a significant cis-trQTL; mutations in SNCA, which is typically expressed in neurons but also in LCLs, have been associated with Parkinson’s disease51. It has been shown that alternatively spliced transcripts can cause proteins to misfold52 and the misfolding of SNCA’s protein has been suggested as a therapeutic target to treat Parkinson’s disease53. These results suggest that the alternatively spliced transcripts of SNCA might be interesting targets for future research and demonstrate the unique utility of biisq.We computed genes with cis-trQTLs exclusively inferred by 8 and cis-regulatory elements (CREs) from ENCODE in a diverse set of cell types56. VSE is a statistical test that computes the significance of enrichment or depletion of an associated variant set (here cis-trQTLs) with respect to a genomic annotation. Here, we computed enrichment of cis-trQTLs in DNase I hypersensitive sites (DHSs), H3K4me3 sites, and H3K27ac sites  but not when jointly considering DHSs and H3K4me3 marks, or DHSs and H3K27ac marks . Furthermore, cis-trQTLs were enriched in an annotation track that combines DHSs, FAIRE, and ChIP to identify regions associated with chromatin accessibility and regulatory activity in LCL samples  and clusters of alternatively excised introns identified by LeafCutter . We only find significant enrichment in three of the ten control cell types, including embryonic stem cells , cervical carcinoma cells , and mesoderm leukemia cells , indicating that there may be significant sharing of cis-trQTL-related chromatin markers between these cell types and LCLs  analysis for regions associated with variable intron splicing events identified by LeafCutter, which identifies regions that associate spatially with splicing QTLs60 , which exhibit high proteomic and functional diversity as the result of alternative splicing62. These database enrichment results demonstrate that cis-trQTLs and spliced gene sets identified by biisq are enriched for alternative splicing functions and pathways.To understand if our cis-trQTL target genes shared biological function, we quantified enrichment of cis-trQTLs in the Database for Annotation, Visualization and Integrated Discovery (DAVID)biisq, for quantifying RNA isoforms in short-read RNA-seq samples, which shares strength across samples to estimate isoforms—especially those at low abundance—without reference isoform compositions. We used a stochastic variational inference method to fit biisq to data that allows our approach to scale to transcriptome-wide study data; further, biisq scaled efficiently as the coverage or length of a gene increased in simulated paired-end Iso-Seq data. We demonstrated that our method improves substantially over four state-of-the-art methods in precision of isoforms on two different types of simulated data, with significant improvement for low abundance transcripts. biisq also achieves relatively high recall while retaining high precision. We applied biisq to the GEUVADIS RNA-seq data and identified known and novel isoforms that we validated, in part, by identifying cis-trQTLs. The cis-trQTLs cluster near known splice junctions and are significantly enriched in cis-regulatory elements associated with chromatin accessibility, alternatively excised intron clusters, and histone modifications, which are all associated with splicing regulation and isoform diversity59.We presented a statistical model, biisq has several advantages over existing representations of RNA isoforms: (1) sample-specific isoforms are drawn from a collection of global isoforms, which leads to higher power to discover low frequency isoforms by sharing strength across samples; (2) a Bayesian hierarchical approach enables the principled incorporation of high-quality prior information such as variance in the number of known global isoforms or observed variation in the exon composition of isoforms; and (3) a nonparametric approach allows us to flexibly combine computationally tractable posterior inference with model selection, allowing the number of isoforms to grow with more samples. biisq also enables the interpretation of model parameters as specific quantities in RNA-seq analyses, for example, the probability of assignment of a read term to a specific isoform. biisq is guaranteed to converge to a local maximum, but the results on BEERS and Iso-Seq data demonstrate that the quality of isoform reconstruction is improved from taking the best maximum a posteriori solution from multiple random restarts.biisq captures biologically interesting trends. This suggests that the partial transcript catalog identified by biisq can be biologically meaningful and considered for downstream analyses. The flexible and robust model for isoform identification and quantification from short-read RNA-seq data in biisq enables a more precise estimate of transcript isoform levels than is currently available, and opens the door to a better characterization of the cellular regulation and role of transcript isoforms in complex systems.Our results on GEUVADIS data show that biisq model, we consider each gene independently and a gene is defined as an ordered list of contiguous transcribed exons or retained introns; we will refer to both DNA sequence types as exons for simplicity. A gene’s exons are ordered from the 5′ to 3′ end of the gene, and gene transcripts are represented by an ordered list of integers denoting the exons included in that transcript. A gene includes ι = 1: E exons, and the set of global and sample-specific isoforms are indexed by k = 1: K and BRCA2, covers exons 1 and 2, and skips the first intron. The boundaries for the first two exons of BRCA2 are  and , so the corresponding read term tuple is .In the V is the total number of read terms observed across all m samples and xvj denotes the number of times read term v was observed in sample j; let xj⋅ =  denote the vector of read term counts observed in sample j. The biisq model assumes xj⋅ is generated from a multinomial distribution with probability vector determined by isoform k, which follows a Dirichlet distribution bkv ~ Bernoulli (πι) controls whether read term v is expressed in isoform k, πι ~ β if read term v starts in exon ι; this forms a many-to-one mapping between read terms and exons. In other words, all read terms that start in exon ι share the prior πι ~ β. The hyperparameters r and s may be tuned to encourage isoform compositions with fewer exons or, equivalently, induce sparsity over read term usage in the vector Observations are encoded by the matrix ω and a uniform base distribution G0, and concentration parameter α: Gj|α,G0 ~ DP. The sharing of the base distribution G0 ensures isoforms are shared among the samples, and the clustering property of the Dirichlet process encourages new observations to join existing isoforms with the largest numbers of observations (rich-get-richer property). Sample-specific and global isoforms are related through a multinomial mapping variable cj,l, and the latent isoform assignment for each read is drawn from a multinomial distributionbiisq model.The distribution of global isoforms follows a Dirichlet process with concentration parameter xon gene 1. Samplebiisq model, following earlier work on SVI for the hierarchical Dirichlet process (HDP)27. We modified this method for the biisq-specific model parameters as follows. We add constant noise using hyperparameter bkv ~ Bernoulli (πι) which ensures that the Dirichlet distribution βk is defined. Sparsity, in terms of the number of exons per isoform, may be induced by controlling the hyperparameters of the beta-Bernoulli hierarchy, which affects the probability of emitting the corresponding read terms in the Dirichlet distribution  method to tractably and robustly estimate posterior probabilities in the 65. For every pair of isoforms, the merge step calculates the likelihood of the data before and after merging the pair of isoforms; if the sample likelihood is greater after the merge, the merge is accepted. biisq proposes new isoforms by computing the union of exons in randomly sampled, poorly mapped read terms, where the likelihood of that read mapping to existing isoforms is <0.5. If at least one novel isoform is proposed, biisq reinitializes all variational parameters (Algorithm 1 in Supplementary Methods). Finally, the reduce step removes isoform k from the local and global distributions if, for all samples, there are no reads that map to isoform k with a probability >0.01.To handle the expansion and contraction of the population-wide isoforms, we implemented a merge-propose-reduce step in SVI and executed this step every 30 iterationsXt is the number of reads mapped to transcript t, Lt is the length of transcript t and N is the total number of mapped reads. For biisq, the number of reads mapped to a transcript is calculated by the product of the total number of reads mapped to the gene and the per-sample isoform proportions (Supplementary Methods).After convergence of SVI, transcripts are quantified for each sample using RPKM16. The number of reads required to detect a full range of isoforms in human RNA-seq experiments has been estimated to be at least 200 million66; therefore, we generated a pool of (2 × 108/2 × 104) × Ng reads where Ng is the number of genes for each simulation. We divided the gene models into three equally sized groups according to exon count, producing groups of genes with 3–6, 7–12, and 13–182 exons. Gene models were drawn from two reference annotation data sets, the RefSeq database and a database collection composed of ten annotation tracks including UCSC and Ensembl databases (Supplementary Methods). We varied the number of novel transcripts in {2,4,6,12,16}67, the minimum gene coverage in {1, 5, 15, 50, 100}, and the number of samples in {100, 250}. We also included 30 simulated genes for read lengths in {200, 400}. For each gene model, we sampled reads according to their parameter configuration from the aligned RNA-seq reads in the BEERS-simulated read pool. We sampled 10 genes for each parameter configuration and discarded data from BEERS-simulated genes that were under the desired coverage or did not have at least one read in each exon. This resulted in a pool of 3102 simulated genes from 532,800 RNA-seq samples. The start position of a read was sampled from a gamma distribution with a parameter that decreases linearly with the position to simulate a 5′ bias. The exonic composition of a novel splice form was generated by BEERS, and isoform proportions for each sample were sampled from a Dirichlet distribution with concentration parameter α = 1.Single-end RNA-seq reads were generated by the benchmarker for evaluating the effectiveness of RNA-seq software (BEERS)28. The gene identifiers provided in the reference files were created independently for each tissue, so we constructed a reference set of genes and their transcripts across tissues as follows. For each gene, we created a standard set of exons by parsing its transcripts and collapsing overlapping exons in the GFF files. We then mapped genes across the three tissues based on a base pair overlap of 95% and discarded non-unique mappings. For each gene, we then mapped transcripts across tissues based on a 95% overlap (see Supplementary Methods). This process was conservative by design, leading to a confident baseline of cross-tissue isoforms. We found seven genes having at least two transcripts isoforms shared across two tissues  reference files for each tissue45. We built an Iso-Seq short-read simulator (ISSRS) that simulates short reads from longer Iso-Seq reads. The inputs to ISSRS are sequencing parameters, a gene reference file with exon boundaries, and an aligned sequence read file. The outputs of ISSRS are aligned sequences in SAM format that contain short sequence reads but retain the read mapping biases present in the Iso-Seq data by copying the sequence position from the Iso-Seq reads. In brief, the simulator works as follows: (1) compute Iso-Seq reads that map to the exons of a known transcript; (2) for each read, determine the amount of sampling based on input coverage; (3) sample reads by attempting to add insert sizes distributed normally with mean 10 bp and 40 bp standard deviation; (4) output sampled reads while preserving sequence and quality scores from the aligned Iso-Seq transcripts in SAM and biisq format (see Supplementary Methods). For step (1), STARlong mappings yielded fewer false positives than GMAP, but GMAP produced many more usable alignments  transcripts from the comprehensive gene annotations in GENCODE release 19 for human genome assembly version GRCh37.p13. We then built a set of representative exons for each protein-coding gene. Most genes had a single transcript annotated as basic; for the remaining genes, we kept the transcript with the largest number of exons.RNA-seq reads from EBV-transformed LCLs were downloaded from the Genetic European Variation in Health and Disease (GEUVADIS) projectTo build the read terms, we mapped the raw RNA-seq reads with STAR 2-pass to the human genome version 19. We removed unmapped reads or non-primary reads that failed quality checks or were marked as duplicates. For each mapped read, we computed the set of overlapping transcript exons, producing an intersection file. The full catalog of read terms was built from a first pass through the intersection files of each sample; we then constructed read term expression files for each sample from a second pass with the read term catalog. A final step reduces the number of read terms by collapsing terms with a similar start position and exon content to an approximate target number of read terms of 2500.68 to perform association mapping for local eQTLs and transcript ratio QTLs (cis-trQTLs), where the ratio of expression levels for each isoform to all isoforms in a gene—or the transcript ratio—replaces the RPKM values for each gene69. Logistic regression . To achieve well calibrated null hypothesis p-values and filter transcripts containing false splice junctions, transcripts with ratios of 0 or 1 in all samples and transcripts expressed in less than 10% of the samples were discarded.We used Matrix eQTLion Fig.  was compFor the comparisons to the GEUVADIS study, we used Matrix eQTL for association mapping with a cis region of 1 Mb, 10 PEER factors, quantile normalization, 5% FDR, and 3 genotype PCs for CEU and 2 genotype PCs for YRI. In order to accommodate partially constructed transcripts, we required only 10% of samples to have >0 expression.60. We compiled sets of high confidence isoforms for each gene by filtering out transcript isoforms not present in ≥10% of the samples. To reduce the affects of linkage disequilibrium (LD) on the variant set enrichment analysis, we filtered genetic variants for YRI, CEU, FIN, GBR, and TSI populations such that the MAF >0.001, pairwise r2 < 0.8, and genotyping rate >0.8 using the rAggr interface to Haploview on the 1000 Genomes Project phase 3 data73. Variant set enrichment analysis was run on the LD blocks for ENCODE Encyclopedia 3 annotations: DNase I hypersensitive sites, H3K4me3, H3K27ac, annotations generated from a chromatin state segmentation computational tool sourcing from the Broad Histone UCSC track for nine factors and nine cell types, DNase I/FAIRE/ChIP synthesis annotations from ENCODE and OpenChrom57, and LeafCutter clusters (Supplementary Table p ≤ 0.01), which is required by VSE  analysis included functional enrichment for nine databases . We describe the processing for population-specific variants . First, to control for linkage disequilibrium (LD), we masked variants in pairwise LD >0.90 using PLINK v1.9 (indep-pairwise 100000 1000 0.9). We then extracted two orthogonal sets of variants in protein-coding gene regions: population-specific genes (selected set) and non-population-specific genes (background set). For a specific variant, let the count of an allele An isoform transcript is defined by the set of exons that are expressed from a known gene reference. An evaluation criterion that requires the true and inferred exon sets to be identical is often conservative due to variable read coverage of exons. Therefore, isoform reconstruction was evaluated by considering both perfect and imperfect matchings to determine precision and recall  between each computed transcript and the true transcripts as follows. Let KC and KT be the set of estimated and true isoforms, respectively, which are Boolean vectors of length E exons {1,2, …, E}. A 1 at position ι signifies that exon ι is contained within that isoform, and k[ι] indexes the position of the Boolean vector k. We define the distance between an inferred and true isoform dk,l for all k ∈ KC and l ∈ KT to be the Hamming distance.For inexact matches, partial precision and recall were calculated by defining a matching M is then the solution to the optimization problemThe Hamming distance counts the number of mismatched exons between the estimated and true isoforms. The maximum cardinality minimum weight I, finding a maximum cardinality minimum weight matching can be solved in O(I3) time74. If k ∈ KC and true isoform M, then k is a true  positive; if k is a p-partial true  positive (p-TP and p-FP). Any true isoform not matched by a p-partial true positive is a p-partial false negative (p-FN). Using these definitions of p-TP, p-FP, and p-FN, we can compute p-precision and p-recall as in Eq. Supplementary InformationPeer Review FileDescription of Additional Supplementary FilesSupplementary Data 1