mkatari-bioinformatics-august-2013-deseq
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
mkatari-bioinformatics-august-2013-deseq [2015/06/17 06:15] – mkatari | mkatari-bioinformatics-august-2013-deseq [2015/08/21 14:13] (current) – mkatari | ||
---|---|---|---|
Line 21: | Line 21: | ||
First we will load the count data file. | First we will load the count data file. | ||
< | < | ||
- | counts = read.table(pathToCountsData, header=T, row.names=1) | + | counts = read.table(" |
</ | </ | ||
Then we will load the experimental design. An example is provided [[https:// | Then we will load the experimental design. An example is provided [[https:// | ||
< | < | ||
- | expdesign = read.table(pathToExpDesign) | + | expdesign = read.table(" |
</ | </ | ||
Line 53: | Line 53: | ||
An important part of DESeq is to estimate dispersion. This is simply a form of variance for the genes. | An important part of DESeq is to estimate dispersion. This is simply a form of variance for the genes. | ||
< | < | ||
+ | # if you have replicates do the following: | ||
cds = estimateDispersions( cds ) | cds = estimateDispersions( cds ) | ||
+ | ### HOWEVER, If you have NO replicates, then try this | ||
+ | cds = estimateDispersions( cds, method=" | ||
</ | </ | ||
To visualize the disperson graph | To visualize the disperson graph | ||
< | < | ||
- | dispersionFile = paste(pathToOutputDir, | + | dispersionFile = " |
pdf(dispersionFile) | pdf(dispersionFile) | ||
plotDispEsts( cds ) | plotDispEsts( cds ) | ||
Line 77: | Line 80: | ||
< | < | ||
- | maFile = paste(pathToOutputDir, | + | maFile = " |
pdf(maFile) | pdf(maFile) | ||
plotMA(res) | plotMA(res) | ||
Line 85: | Line 88: | ||
#To get the genes that have FDR of 10% and save it in the output directory. | #To get the genes that have FDR of 10% and save it in the output directory. | ||
< | < | ||
- | resSig | + | resSigind |
+ | resSigrep = res[ which(res$padj < 0.1 & res$log2FoldChange < -1), ] | ||
- | outfile | + | indoutfile |
+ | repoutfile | ||
- | write.table(resSig, | + | write.table(resSigind, |
- | | + | |
+ | sep=" | ||
+ | col.names=T, | ||
+ | row.names=F, | ||
+ | quote=F) | ||
+ | |||
+ | write.table(resSigrep, | ||
+ | repoutfile, | ||
sep=" | sep=" | ||
col.names=T, | col.names=T, |
mkatari-bioinformatics-august-2013-deseq.1434521738.txt.gz · Last modified: 2015/06/17 06:15 by mkatari