NOISeq

User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tutorial [2013/03/27 11:11]
sotacam
tutorial [2013/03/30 11:07]
sotacam
Line 11: Line 11:
 Please, follow these instructions to run NOISeqBIO: Please, follow these instructions to run NOISeqBIO:
  
-  - Install NOISeq Bioconductor package (see [[downloads|Downloads]]). +**1)** ​Install NOISeq Bioconductor package (see [[downloads|Downloads]]) ​and load it: ''​library(NOISeq)''​
-  ​- ​Download the zip file containing the R scripts for NOISeqBIO (from [[downloads|Downloads]]). + 
-  - Unzip this file. +**2)** ​Download the zip file containing the R scripts for NOISeqBIO (from [[downloads|Downloads]]) ​and unzip it
-  ​- ​To load the NOISeqBIO functions from the R consoleplease type: ''​> source("​NOISeqBIO_v00/​loadingFunctions.R")''​Remember you have to change the path if you are in another working directory+ 
-  ​- Convert ​your data into a NOISeq object ​using the //readData()// ​function from NOISeq package (see NOISeq tutorial for more information). +**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 
 +Please, remember that this is a toy example and only about 5000 genes are considered, so the results may not be trustable. 
 + 
 +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)