Commit 440aa400 authored by Beatriz Vicoso's avatar Beatriz Vicoso
Browse files

Update TPM.md

parent b17c2f7f
......@@ -84,5 +84,25 @@ diploid<-(subA[!(subA[,1] %in% tetnames),])
## Plot
```
boxcols<-c( "#A6CEE3", "#B2DF8A", "#1F78B4", "#FF7F00")
boxnames<-c("subA", "subB", "A+B", "1:1")
boxplot(tetraploid$carptpm.A, tetraploid$carptpm.B, tetraploid$carptpm.A+tetraploid$carptpm.B, diploid$carptpm, notch=T, outline=F, names=boxnames, col=boxcols, main="", ylab="Log2(TPM)")
abline(h=median(tetraploid$carptpm.A+tetraploid$carptpm.B, na.rm=T), lty=2)
ycoord<-(quantile(diploid$carptpm, 0.75, na.rm=T)-quantile(diploid$carptpm, 0.25, na.rm=T))*1.5+quantile(diploid$carptpm, 0.75, na.rm=T)-0.03
#segments(1, ycoord, 4, ycoord, col="darkgrey")
#add stats
ptable<-cbind(wilcox.test(tetraploid$carptpm.A, diploid$carptpm)$p.value, wilcox.test(tetraploid$carptpm.B, diploid$carptpm)$p.value, wilcox.test(tetraploid$carptpm.A+tetraploid$carptpm.B, diploid$carptpm)$p.value)
ptable
ptable[ ptable <0.001 ] <- "***"
ptable[ ptable > 0 & ptable <0.01 ] <- "**"
ptable[ ptable > 0 & ptable <0.05 ] <- "*"
ptable[ ptable > 0 & ptable >0.05 ] <- " "
ptable
text(1,ycoord-0.35, ptable[1], cex=1.3)
text(2,ycoord-0.35, ptable[2], cex=1.3)
text(3,ycoord-0.35, ptable[3], cex=1.3)
median(diploid$carptpm, na.rm=T)/median(tetraploid$carptpm.A+tetraploid$carptpm.B, na.rm=T)
```
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment