Year 2019: Difference between revisions

From QiuLab
Jump to navigation Jump to search
imported>Lab
(Created page with "=TD Project= * Credit: Christopher Panlasigui * Heatmap 1 * Heatmap 2")
 
imported>Lab
 
(11 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=TD Project=
=TD Project=
* Credit: Christopher Panlasigui
* Credit: Christopher Panlasigui
* Heatmap 1
* Brief computational/statistical steps:
* Heatmap 2
# Quantile normalization between all replicates (with log2 transformatuon)
# Linear model among the 3 groups
# Select top significant genes
# Map gene names
# Cluster and show by interactive heatmaps in R
<syntaxhighlight lang="bash">
# Quantile normalization
library(preprocessCore)
w2.mat <- as.matrix(w2[,3:17]) #convert original data to matrix
w2.mat.norm <- normalize.quantiles.robust(w2.mat, copy = TRUE, use.log2 = TRUE)
rownames(w2.mat.norm) <- w2$Geneid
 
# linear model
fits <- lmList(log.counts ~ group | geneID, data=w2.norm.melt)
lm.sum <- lapply(fits, function(x){
  out<-summary(x);
  fstat <- out$fstatistic;
  pf(fstat[1], fstat[2], fstat[3], lower.tail=F)
})
p.df <- data.frame(gene=names(fits), p.val=as.numeric(lm.sum))
w2.out <- cbind(w2[,1:2], w2.mat.norm, p.df[,1:2])
 
# heatmap
heatmaply(td.mat, scale = "none" , cexRow = 0.50, colors = colorspace::diverge_hsv(16), branches_lwd = 0.3)
 
 
</syntaxhighlight>
* Results
# [http://diverge.hunter.cuny.edu/~weigang/heatmap_td.html Heatmap 1. p<1e-5, showing Fold Change over mean of wild type]

Latest revision as of 17:24, 8 February 2019

TD Project

  • Credit: Christopher Panlasigui
  • Brief computational/statistical steps:
  1. Quantile normalization between all replicates (with log2 transformatuon)
  2. Linear model among the 3 groups
  3. Select top significant genes
  4. Map gene names
  5. Cluster and show by interactive heatmaps in R
# Quantile normalization
library(preprocessCore)
w2.mat <- as.matrix(w2[,3:17]) #convert original data to matrix
w2.mat.norm <- normalize.quantiles.robust(w2.mat, copy = TRUE, use.log2 = TRUE)
rownames(w2.mat.norm) <- w2$Geneid

# linear model
fits <- lmList(log.counts ~ group | geneID, data=w2.norm.melt)
lm.sum <- lapply(fits, function(x){
  out<-summary(x);
  fstat <- out$fstatistic;
  pf(fstat[1], fstat[2], fstat[3], lower.tail=F)
})
p.df <- data.frame(gene=names(fits), p.val=as.numeric(lm.sum))
w2.out <- cbind(w2[,1:2], w2.mat.norm, p.df[,1:2])

# heatmap
heatmaply(td.mat, scale = "none" , cexRow = 0.50, colors = colorspace::diverge_hsv(16), branches_lwd = 0.3)
  • Results
  1. Heatmap 1. p<1e-5, showing Fold Change over mean of wild type