{"items":["5f7007605f9fcc0017abe9e4","5f7007605f9fcc0017abe9e5","5f7007605f9fcc0017abe9e6"],"styles":{"galleryType":"Columns","groupSize":1,"showArrows":true,"cubeImages":true,"cubeType":"max","cubeRatio":1.7777777777777777,"isVertical":true,"gallerySize":30,"collageAmount":0,"collageDensity":0,"groupTypes":"1","oneRow":false,"imageMargin":30,"galleryMargin":0,"scatter":0,"rotatingScatter":"","chooseBestGroup":true,"smartCrop":false,"hasThumbnails":false,"enableScroll":true,"isGrid":true,"isSlider":false,"isColumns":false,"isSlideshow":false,"cropOnlyFill":false,"fixedColumns":0,"enableInfiniteScroll":true,"isRTL":false,"minItemSize":50,"rotatingGroupTypes":"","rotatingCropRatios":"","columnWidths":"","gallerySliderImageRatio":1.7777777777777777,"numberOfImagesPerRow":3,"numberOfImagesPerCol":1,"groupsPerStrip":0,"borderRadius":0,"boxShadow":0,"gridStyle":0,"mobilePanorama":false,"placeGroupsLtr":true,"viewMode":"preview","thumbnailSpacings":4,"galleryThumbnailsAlignment":"bottom","isMasonry":false,"isAutoSlideshow":false,"slideshowLoop":false,"autoSlideshowInterval":4,"bottomInfoHeight":0,"titlePlacement":["SHOW_ON_THE_RIGHT","SHOW_BELOW"],"galleryTextAlign":"center","scrollSnap":false,"itemClick":"nothing","fullscreen":true,"videoPlay":"hover","scrollAnimation":"NO_EFFECT","slideAnimation":"SCROLL","scrollDirection":0,"scrollDuration":400,"overlayAnimation":"FADE_IN","arrowsPosition":0,"arrowsSize":23,"watermarkOpacity":40,"watermarkSize":40,"useWatermark":true,"watermarkDock":{"top":"auto","left":"auto","right":0,"bottom":0,"transform":"translate3d(0,0,0)"},"loadMoreAmount":"all","defaultShowInfoExpand":1,"allowLinkExpand":true,"expandInfoPosition":0,"allowFullscreenExpand":true,"fullscreenLoop":false,"galleryAlignExpand":"left","addToCartBorderWidth":1,"addToCartButtonText":"","slideshowInfoSize":200,"playButtonForAutoSlideShow":false,"allowSlideshowCounter":false,"hoveringBehaviour":"NEVER_SHOW","thumbnailSize":120,"magicLayoutSeed":1,"imageHoverAnimation":"NO_EFFECT","imagePlacementAnimation":"NO_EFFECT","calculateTextBoxWidthMode":"PERCENT","textBoxHeight":60,"textBoxWidth":200,"textBoxWidthPercent":75,"textImageSpace":10,"textBoxBorderRadius":0,"textBoxBorderWidth":0,"loadMoreButtonText":"","loadMoreButtonBorderWidth":1,"loadMoreButtonBorderRadius":0,"imageInfoType":"ATTACHED_BACKGROUND","itemBorderWidth":0,"itemBorderRadius":0,"itemEnableShadow":false,"itemShadowBlur":20,"itemShadowDirection":135,"itemShadowSize":10,"imageLoadingMode":"BLUR","expandAnimation":"NO_EFFECT","imageQuality":90,"usmToggle":false,"usm_a":0,"usm_r":0,"usm_t":0,"videoSound":false,"videoSpeed":"1","videoLoop":true,"jsonStyleParams":"","gallerySizeType":"px","gallerySizePx":1000,"allowTitle":true,"allowContextMenu":true,"textsHorizontalPadding":-30,"itemBorderColor":{"themeName":"color_12","value":"rgba(230,230,230,0)"},"showVideoPlayButton":true,"galleryLayout":2,"calculateTextBoxHeightMode":"MANUAL","targetItemSize":1000,"selectedLayout":"2|bottom|1|max|true|0|true","layoutsVersion":2,"selectedLayoutV2":2,"isSlideshowFont":true,"externalInfoHeight":60,"externalInfoWidth":0.75},"container":{"width":300,"galleryWidth":330,"galleryHeight":0,"scrollBase":0,"height":null}}

# Probability distribution in NGS data analysis

In previous POST, we discussed some basics of probability distribution and corresponding hypothesis testing. Here let's continue this topic and talk about the usage of probability distribution in NGS data analysis. More specifically, why do we choose what we choose to represent NGS data? What is the logics in our choice? We will take two examples commonly seen in NGS data analysis to make the point.

Let's take somatic variant calling as first example. We know that multiple steps in NGS protocol can generate artifacts, such as sequencing error. The goal of variant calling is to distinguish real somatic variants from these artifacts. Assuming the rate of sequencing error is known, we can then make null hypothesis regarding the distribution of such sequencing error. those mismatches not following the assumed distribution will be assigned as somatic variants. The question is: **which probability distribution should we choose to best represent sequencing error?** Considering that we are modeling independent sampling process (random sequencing error), Binomial distribution is probably the first one comes to our mind. Then we realize that, in a mature sequencing platform, the rate of sequencing error is pretty low (~0.1%). In addition, the sequencing depth of tumor sample is usually relatively high. To model distribution with such characteristics, **Poisson distribution** is probably a better choice. In fact, some of the current somatic variant callers take advantage of Poisson model where sigma is used to represent average rate of sequencing error. Given that the rate of sequencing error is different across chromosome, we can move one step further by using basecall quality to represent error rate and building a site specific error model. Now someone may realize that sequencing error is not the only source of artifacts, among which there are at least PCR error and sequencing misalignment. Indeed, Some modern methods apply Bayesian approach to achieve better accurate by integrating more error sources (such as mappability or sequencing context) into prior probability. We will leave this in a separate discussion in the future.

Another example we would like to make is differential expression analysis in RNA-Seq. We try to discover aberrantly expressed genes between group of sample with different phenotypical condition. However, how different is different? Now we need set up distribution of gene expression between samples with same phenotypical condition as null hypothesis. We can think the total reads as a pool and we are randomly sampling reads that comes from particular gene. This is again an Binomial process. Similarly, we have very large n (total reads) and very small p (fraction of reads from this particular gene). Now we have Poisson distribution. We should also consider that the variation of gene expression is influenced by technical variantion during experiment as well as biological variantion between individual. It is likely that we are dealing with a dispersed Poisson distribution where variance > mean. We can confirm this thought through the figure below based on gene expression of scRNA-Seq experiment. Therefore a dispersed Poisson, aka **negative bionomial distribution** may be a better chioic in this case.

We briefly described the thinking process of choosing probability distribution from biological / biotechnology point of view. By making appropriate statistical assumption, we can make more accurate estimation given limited data access.