Commit 873e2471 authored by Holger Brandl's avatar Holger Brandl

moved limma workflow into ngs tools

parent e833e7c9
[TOC]: # " RNA Seq workflow tutorial"
# RNA Seq workflow tutorial
- [Setup](#setup)
- [Running the workflow](#running-the-workflow)
- [Synchronizing back to fileserver](#synchronizing-back-to-fileserver)
- [Project Setup](#project-setup)
- [RNA-Seq with DESeq2](#rna-seq-with-deseq2)
- [Differential expression with limma](#differential-expression-with-limma)
Project Setup
-------------
Setup
-----
1. Create new git repo under `git.mpi-cbg.de`
2. Clone repo to cluster `../scripts/${PRJ_NAME}`
3. Create project directory under `/projects/bioinfo/data/${PRJ_NAME}`
4. Create `README.md` in repo and populate with project info
5. Copy template `dge_workflow/dge_star_template.sh` into project repo
6. Check quota with `quotalist` for enough space (rule of thumb 10gb per sample)
7. Adjust template properties and run.
5. Check quota with `quotalist` for enough space (rule of thumb 10gb per sample)
Running the workflow
--------------------
RNA-Seq with DESeq2
-------------------
Done
1. Copy template `dge_workflow/dge_star_template.sh` into project repo
2. Adjust template properties and run.
Synchronizing back to fileserver
--------------------------------
Differential expression with limma
----------------------------------
Prepare design, contrasts and expression/abundance matrix as for DESeq2 workflow and run
This diff is collapsed.
x = DGEList(counts = expMatrix, group = orderMatcheExpDesign$condition)
# expMatrix = expMatrix/max(expMatrix)
# lcpm <- cpm(expMatrix, log=TRUE)
# cpm <- cpm(x)
# x = cpm
normFac <- calcNormFactors(x, method = "TMM")
normFac$samples$norm.factors
x2 <- x
x2$samples$norm.factors <- 1
x2$counts[,1] <- ceiling(x2$counts[,1]*0.05)
x2$counts[,2] <- x2$counts[,2]*5
par(mfrow=c(1,2))
lcpm <- cpm(x2, log=TRUE)
boxplot(lcpm, las=2, col=col, main="")
title(main="A. Example: Unnormalised data",ylab="Log-cpm")
x2 <- calcNormFactors(x2)
# x2$samples$norm.factors
lcpm <- cpm(x2, log=TRUE)
boxplot(lcpm, las=2, col=col, main="")
title(main="B. Example: Normalised data",ylab="Log-cpm")
## [1] 0.0547 6.1306 1.2293 1.1705 1.2149 1.0562 1.1459 1.2613 1.1170
lcpm <- cpm(x2, log=TRUE)
boxplot(lcpm, las=2, col=col, main="")
title(main="B. Example: Normalised data",ylab="Log-cpm")
Markdown is supported
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