This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tutorial [2013/03/30 11:03] sotacam |
tutorial [2014/01/08 11:55] (current) sotacam |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== NOISeq Tutorial ====== | ====== NOISeq Tutorial ====== | ||
- | The NOISeq tutorial can be downloaded from Bioconductor website. Click [[http://www.bioconductor.org/packages/2.12/bioc/html/NOISeq.html|here]]. | + | The NOISeq tutorial can be downloaded from Bioconductor website. Click [[http://www.bioconductor.org/packages/release/bioc/html/NOISeq.html|here]]. |
- | In NOISeq package, you can find not only the method to compute **differential expression** between two experimental conditions from RNA-seq data, but also other functions in order to learn more about saturation, contamination or other biases in your data as well as to explore the differential expression results. | + | In NOISeq package, you can find not only the methods NOISeq and NOISeqBIO to compute **differential expression** between two experimental conditions from RNA-seq data, but also other functions in order to learn more about saturation, contamination or other biases in your data as well as to explore the differential expression results. |
- | |||
- | |||
- | ====== NOISeqBIO Tutorial ====== | ||
- | |||
- | Please, follow these instructions to run NOISeqBIO: | ||
- | |||
- | **1)** Install NOISeq Bioconductor package (see [[downloads|Downloads]]) and load it: ''library(NOISeq)''. | ||
- | |||
- | **2)** Download the zip file containing the R scripts for NOISeqBIO (from [[downloads|Downloads]]) and unzip it. | ||
- | |||
- | **3)** To load the NOISeqBIO functions in R from your working directory: | ||
- | |||
- | # Remember you have to change this path if you are not in the same directory: | ||
- | > mypath = "NOISeqBIO_v00" | ||
- | | ||
- | > source(file.path(mypath, "auxiliar.R")) | ||
- | > source(file.path(mypath, "MDbio.R")) | ||
- | > source(file.path(mypath, "allMDbio.R")) | ||
- | > source(file.path(mypath, "noiseqbio.R")) | ||
- | > source(file.path(mypath, "classes.R")) | ||
- | > source(file.path(mypath, "normalization.R")) | ||
- | > source(file.path(mypath, "fewreplicates.R")) | ||
- | |||
- | **4)** Read your data as in NOISeq (see the following example with Marioni's data, where liver and kidney tissues are compared) to convert them to a NOISeq object: | ||
- | > data(Marioni) | ||
- | > mydata = readData(data = mycounts, factors = myfactors) | ||
- | |||
- | **5)** To apply NOISeqBIO with TMM normalization (you can choose the same normalization procedures as in NOISeq): | ||
- | > mynoiseq.test = noiseqbio(mydata, norm = "tmm", factor = "Tissue", r = 10) | ||
- | The parameter //r// is the number of permutations of sample labels to generate null distribution. | ||
- | |||
- | **6)** Finally, select the differentially expressed genes: | ||
- | # Probability cutoff. It is equivalent to a FRD (adjusted p-value) of 0.05 | ||
- | > myq = 0.95 | ||
- | > mydeg = mynoiseq.test@results[[1]][which(mynoiseq.test@results[[1]][,"prob"] > myq),] | ||
- | > nrow(mydeg) | ||
- | [1] 2837 | ||
- | > head(mydeg) | ||
- | Kidney Liver theta prob | ||
- | ENSG00000187642 12.8606633 4.332902 0.8107475 0.9601231 | ||
- | ENSG00000188290 17.7544458 4.961376 1.3160369 0.9999999 | ||
- | ENSG00000187608 19.2702201 34.329320 -0.7153955 0.9543329 | ||
- | ENSG00000188157 691.1874857 141.575959 5.9237953 1.0000000 | ||
- | ENSG00000186891 0.8230924 2.736435 -0.7348520 0.9568449 | ||
- | ENSG00000078808 372.5016774 483.708484 -1.0066939 0.9787270 | ||
- | |||
- | |||
- | Unfortunately, the DE plots in NOISeq package cannot be used yet on these DE results. Please, find below how to draw a plot to illustrate the DE results: | ||
- | > cond1 = log2(rowMeans(mycounts[,grep("Kidney", colnames(mycounts))]) + 1) | ||
- | > cond2 = log2(rowMeans(mycounts[,grep("Liver", colnames(mycounts))]) + 1) | ||
- | > plot(cond1, cond2, cex = 0.7, xlab = "Kidney (Average expression in log-scale)", | ||
- | ylab = "Liver (Average expression in log-scale)", main = "NOISeqBIO on Marioni's data") | ||
- | > points(cond1[rownames(mydeg)], cond2[rownames(mydeg)], pch = 20, col = "red", cex = 0.5) |