Year 2019: Difference between revisions

From QiuLab
Jump to navigation Jump to search
imported>Lab
imported>Lab
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=TD Project=
=TD Project=
* Credit: Christopher Panlasigui
* Credit: Christopher Panlasigui
* Main computational steps:
* Brief computational/statistical steps:
# Quantile normalization between all replicates (with log2 transformatuon)
# Quantile normalization between all replicates (with log2 transformatuon)
# Linear model among the 3 groups
# Linear model among the 3 groups
Line 7: Line 7:
# Map gene names
# Map gene names
# Cluster and show by interactive heatmaps in R
# Cluster and show by interactive heatmaps in R
#[http://diverge.hunter.cuny.edu/~weigang/heatmap_td.html Heatmap 1. Scaled per row]
<syntaxhighlight lang="bash">
## [http://diverge.hunter.cuny.edu/~weigang/heatmap_fc_td.html heatmap of top differentiately expressed genes (p<0.001, 1e-3). Values are Fold Change over mean Wild Tyoe]
# 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