Mercurial > repos > fubar > differential_count_models
comparison rgedgeR/rgedgeRpaired.xml @ 22:79e3d80d34f9 draft
Uploaded
author | fubar |
---|---|
date | Sat, 27 Jul 2013 22:01:16 -0400 |
parents | 1ba6b7c6f4df |
children | 37b851eb8203 |
comparison
equal
deleted
inserted
replaced
21:1fe9db11189b | 22:79e3d80d34f9 |
---|---|
532 dev.off() | 532 dev.off() |
533 dg = DGEList[order(DE\$table\$PValue),] | 533 dg = DGEList[order(DE\$table\$PValue),] |
534 #normData = (1e+06 * dg\$counts/expandAsMatrix(dg\$samples\$lib.size, dim(dg))) | 534 #normData = (1e+06 * dg\$counts/expandAsMatrix(dg\$samples\$lib.size, dim(dg))) |
535 efflib = dg\$samples\$lib.size*dg\$samples\$norm.factors | 535 efflib = dg\$samples\$lib.size*dg\$samples\$norm.factors |
536 normData = (1e+06*dg\$counts/efflib) | 536 normData = (1e+06*dg\$counts/efflib) |
537 outpdfname="edgeR_heatmap.pdf" | 537 outpdfname="edgeR_top_100_heatmap.pdf" |
538 hmap2(normData,nsamp=100,TName=TName,group=group,outpdfname=outpdfname,myTitle=myTitle) | 538 hmap2(normData,nsamp=100,TName=TName,group=group,outpdfname=outpdfname,myTitle=paste('edgeR Heatmap',myTitle)) |
539 outSmear = "edgeR_smearplot.pdf" | 539 outSmear = "edgeR_smearplot.pdf" |
540 outMain = paste("Smear Plot for ",TName,' Vs ',CName,' (FDR@',fdrthresh,' N = ',nsig,')',sep='') | 540 outMain = paste("Smear Plot for ",TName,' Vs ',CName,' (FDR@',fdrthresh,' N = ',nsig,')',sep='') |
541 smearPlot(DGEList=DGEList,deTags=deTags, outSmear=outSmear, outMain = outMain) | 541 smearPlot(DGEList=DGEList,deTags=deTags, outSmear=outSmear, outMain = outMain) |
542 qqPlot(descr=paste(myTitle,'edgeR adj p QQ plot'),pvector=tt\$adj.p.value,outpdf='edgeR_qqplot.pdf') | 542 qqPlot(descr=paste(myTitle,'edgeR adj p QQ plot'),pvector=tt\$adj.p.value,outpdf='edgeR_qqplot.pdf') |
543 norm.factor = DGEList\$samples\$norm.factors | 543 norm.factor = DGEList\$samples\$norm.factors |
579 ybig = abs(max(rDESeq\$log2FoldChange)) | 579 ybig = abs(max(rDESeq\$log2FoldChange)) |
580 ylimit = min(4,ysmall,ybig) | 580 ylimit = min(4,ysmall,ybig) |
581 pdf("DESeq2_MA_plot.pdf") | 581 pdf("DESeq2_MA_plot.pdf") |
582 plotMA(resDESeq,main=paste(myTitle,"DESeq2 MA plot"),ylim=c(-ylimit,ylimit)) | 582 plotMA(resDESeq,main=paste(myTitle,"DESeq2 MA plot"),ylim=c(-ylimit,ylimit)) |
583 dev.off() | 583 dev.off() |
584 rlogres = rlogTransformation(resDESeq) | 584 rlogres = rlogTransformation(sresDESeq) |
585 sampledists = dist( t( assay(rlogres) ) ) | 585 sampledists = dist( t( assay(rlogres) ) ) |
586 sdmat = as.matrix(sampledists) | 586 sdmat = as.matrix(sampledists) |
587 pdf("DESeq2_sample_distance_plot.pdf") | 587 pdf("DESeq2_sample_distance_plot.pdf") |
588 heatmap.2(sdmat,trace="none",main=paste(myTitle,"DESeq2 sample distances"), | 588 heatmap.2(sdmat,trace="none",main=paste(myTitle,"DESeq2 sample distances"), |
589 col = colorRampPalette( rev(brewer.pal(9, "RdBu")) )(255)) | 589 col = colorRampPalette( rev(brewer.pal(9, "RdBu")) )(255)) |
590 dev.off() | 590 dev.off() |
591 outpdfname="DESeq2_top100_heatmap.pdf" | |
592 hmap2(rlogres,nsamp=100,TName=TName,group=group,outpdfname=outpdfname,myTitle=paste('DESeq2 Heatmap',myTitle)) | |
591 sink() | 593 sink() |
592 result = try( (ppca = plotPCA( varianceStabilizingTransformation(deSeqDatdisp,blind=T), intgroup=c("Rx","Name")) ) ) | 594 result = try( (ppca = plotPCA( varianceStabilizingTransformation(deSeqDatdisp,blind=T), intgroup=c("Rx","Name")) ) ) |
593 if ("try-error" %in% class(result)) { | 595 if ("try-error" %in% class(result)) { |
594 print.noquote('DESeq2 plotPCA failed.') | 596 print.noquote('DESeq2 plotPCA failed.') |
595 } else { | 597 } else { |