{"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}}

# From variant calling approach: Frequentist vs Bayesian

**Frequentist's approach**: Assume sequencing error distribution.

Frequentist's method makes the null hypothesis that non-reference allele is caused by sequencing error and the sequencing error follows either binomial or Poisson distribution. Then we fit error rate into proposed distribution:

Finally, we determine the variant based on the p-value. This method assumes same sequencing error rate across all chromosome position.

More advanced method models sequencing error based on base call quality score (phred score) and fits the error rate into Poisson binomial distribution.

Such method tries to make better variant call by assigning different error rate based on actual sequencing chemistry.

**Bayesian approach**: Take advantage of data from previous study.

In general, Bayesian approach does not assume distribution. It makes inference with the help from previous data. According to Bayes' theorem:

Where G is genotype and D is observed data

Breaking down the formula:

We can ignore P(D) because it is the same for all possible genotype

P(G) is the prior probability of genotype in population based on previous large scale studies, for example (1000 Genome, dbSNP or ExAC)

P(D|G) is the conditional probability of the data given haplotype

When ignoring P(D), we can see that P(D|G) is actually the Frequentist's approach. The only difference between these two approaches is **whether a prior probability is taken into consideration.**

Now, let's consider such alignment with base call quality score:

ACACGCTA**G**CTAGCT

TA**G**CT Qscore = 20

CTA**A**CT Qscore = 10

GCTA**G**C Qscore = 50

Based on Qscore, the corresponding error probability is 0.01, 0.1 and 0.00001. P(D|G) is first decomposed to H1H2 indicating diploid and then computed for each aligned allele.

The probability of genotype being AG given observed data is the conditional probability P(D|AG) weighted by prior probability P(AG) from previous study.

With the same approach, we can compute the P(AA|D) and P(GG|D), finally find the most likely genotype.

We can see from this Bayes process that both **base call quality and sequencing depth** affect variant calling.