knitr::opts_chunk$set(echo = TRUE)
## It needs bamDataset, hcd, and others

Started on r format(Sys.time(), "%Y-%m-%d %H:%M:%S")

VCF-Report {.tabset}

IGV

IGV link to view variants: IGV.

Sample Clustering based on Variants

plot(hcd, main="Cluster by Genotype", xlab="")

Variants by Chromosomes

Genotype colors are: blue - homozygous reference; gray - heterozygous; red - homozygyous variant

for(ch in names(chromSizes)[isRealChrom]){
      par(mar=c(4.1, 10, 4.1, 2.1))
      plot(0, 0, type="n", main=paste("Chromsome", ch), xlab="pos", 
           xlim=c(1, chromSizes[ch]), ylim=c(0, 3*ncol(gt)),
           axes=FALSE, frame=FALSE, xaxs="i", yaxs="i", ylab="")
      axis(1)
      mtext(side = 2, at = seq(1, 3*ncol(gt), by=3), text = colnames(gt), las=2,
            cex = 1.0, font=2, col=sampleColors)
      idx = idxList[[ch]]
      xStart = pos[idx]
      nm  = colnames(gt)[1]
      for (i in 1:ncol(gt)){
        offSet = match(gt[idx ,i], names(snpColors))
        yTop = (i-1) * 3 + offSet
        rect(xStart, yTop - 1, xStart+1, yTop, col = snpColors[offSet],
             border=snpColors[offSet])
      }
      abline(h=seq(0, 3*ncol(gt), by=3))
}

Input Dataset

ezInteractiveTableRmd(bamDataset)

SessionInfo

ezSessionInfo()


uzh/ezRun documentation built on Dec. 26, 2024, 9:53 a.m.