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/30 10:56]
sotacam
tutorial [2013/03/30 11:07]
sotacam
Line 28: Line 28:
   > source(file.path(mypath,​ "​fewreplicates.R"​))   > source(file.path(mypath,​ "​fewreplicates.R"​))
  
-**4)** Read your data as in NOISeq (see the following example with Marioni'​s data) to convert them to a NOISeq object:+**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)   > data(Marioni)
   > mydata = readData(data = mycounts, factors = myfactors)   > mydata = readData(data = mycounts, factors = myfactors)
  
-Follow this example of application of NOISeqBIO with your own data:+**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.
  
-  ​mydata ​readData()  ​# as in NOISeq ​(please go to the Tutorial for more information+**6)** Finally, select the differentially expressed genes: 
-  > myresults ​noiseqbio() +  # Probability cutoff. It is equivalent to a FRD (adjusted p-value) of 0.05 
-  > myq = 0.95 # Cutoff for the probability of differential ​expression (1-FDR+  ​myq 0.95   
-  > mydeg =  +  > mydeg = mynoiseq.test@results[[1]][which(mynoiseq.test@results[[1]][,"​prob"​] > myq),] 
-   +  > nrow(mydeg) 
-Pleasenote that you can choose the same normalization procedures as in NOISeq.+  [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 20col = "​red",​ cex = 0.5)