User Tools

Site Tools


mkatari-bioinformatics-august-2013-deseq

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
mkatari-bioinformatics-august-2013-deseq [2013/08/23 16:20] mkatarimkatari-bioinformatics-august-2013-deseq [2013/08/23 16:26] mkatari
Line 95: Line 95:
  
 <code> <code>
-pdf("MAplot.pdf")+maFile = paste(pathToOutputDir, "MAplot.pdf", sep=""
 +pdf(maFile)
 plotMA(res) plotMA(res)
 dev.off() dev.off()
 </code> </code>
  
-#To get the genes that have FDR of 10%+#To get the genes that have FDR of 10% and save it in the output directory. 
 +<code> 
 +resSig = res[ which(res$padj < 0.1), ] 
 + 
 +outfile = paste(pathToOutputDir,"Deseq.results.txt", sep="")  
 write.table(resSig,  write.table(resSig, 
-            pathToOutput+            outfile
             sep="\t",              sep="\t", 
             col.names=T,              col.names=T, 
             row.names=F,             row.names=F,
             quote=F)             quote=F)
 +</code>
 +
 +Now the beauty of the script is that a user does not need to start R or even know how to use R to run the script. Simply call the script as any command and the results will be saved in an output directory. This is also great way to build a workflow of several R functions. The command to run the script is shown below. Feel free to put it in your sbatch file.
  
 +<code>
 +/export/apps/R/3.0.0/bin/Rscript /home/mkatari/Rscripts/DESeq.R /home/mkatari/testDeseq/NextGenRaw.txt /home/mkatari/testDeseq/expdesign.txt /home/mkatari/testDeseq/
 +<code>
mkatari-bioinformatics-august-2013-deseq.txt · Last modified: 2015/08/21 14:13 by mkatari