edgeR- plotSmear
2
0
Entering edit mode
@sridhara-gupta-kunjeti-4449
Last seen 9.7 years ago
United States
Hello, I have used edgeR for DGE analysis and also generated plotSmear. I guess by dufault the plotSmear shows red dots for differentially expressed genes. But, I want to generate a black and white plot, is there a possbility to gene using different shape of the points, may be 'x' for the differentially expressed genes. If any one know how to change this it will be helpful. Many thanks in advance! Sridhara -- Sridhara G Kunjeti PhD Candidate University of Delaware Department of Plant and Soil Science email- sridhara@udel.edu Ph: 832-566-0011 [[alternative HTML version deleted]]
edgeR edgeR • 4.0k views
ADD COMMENT
0
Entering edit mode
@sridhara-gupta-kunjeti-4449
Last seen 9.7 years ago
United States
Hello Davis, Here is the history of the codes: d <- DGEList(counts = d, group = group) d d <- estimateCommonDisp(d) d <- estimateTagwiseDisp(d, prior.n = 10, grid.length = 500) prior.n <- estimateSmoothing(d) prior.n de.tgw <- exactTest(d, common.disp = FALSE) de.tgw sum(de.tgw$table$p.value < 0.01) sum(de.tgw$table$p.value > 0.01) detags.tgw <- rownames(topTags(de.tgw, n = sum(de.tgw$table$p.value < 0.01))$table) plotSmear(d, de.tags = detags.tgw, main = "FC Plot using tagwise dispersion") abline(h = c(-2, 2), col = "dodgerblue", lwd = 2) plotSmear(d, de.tags = detags.tgw, main = "FC Plot using tagwise dispersion", cex=0.8, pch=plotsymbols) plotSmear(d, main = "FC Plot using tagwise dispersion", cex=0.8, pch=plotsymbols) de <- as.logical(abs(decideTestsDGE(d))) Error in decideTestsDGE(d) : Need DGEExact or DGELRT object I guess this error message is because all my objects are in DGEList. Any other code that I could use to get the plot in Black and White with different shapes for non-DE and DE will be highly appreciated. Thanks, Sridhara On Wed, Apr 13, 2011 at 10:48 PM, Davis McCarthy <dmccarthy@wehi.edu.au>wrote: > Hi Sridhara > > Remember that all of the usual R plotting commands can be passed to > plotSmear in the '...' argument (see ?plotSmear). You can just change the > pch argument as required (the standard R parameter for plotting symbol). > > This code is one way of doing what you want to do (assuming that your DE > results are in a DGEExact or DGELRT object called "results"): > > de <- as.logical(abs(decideTestsDGE(results))) > plotsymbols <- rep(19, nrow(results)) > plotsymbols[de] <- 4 > plotSmear(results, cex=0.8, main="MA Plot", pch=plotsymbols) > > This will give you closed circles for non-DE genes and 'x's for DE genes. > You can play with the choice of symbols as you please. > > Cheers > Davis > > > On Apr 13, 2011, at 11:54 PM, Sridhara Gupta Kunjeti wrote: > > > Hello, > > I have used edgeR for DGE analysis and also generated plotSmear. I guess > by > > dufault the plotSmear shows red dots for differentially expressed genes. > > But, I want to generate a black and white plot, is there a possbility to > > gene using different shape of the points, may be 'x' for the > differentially > > expressed genes. If any one know how to change this it will be helpful. > > > > Many thanks in advance! > > Sridhara > > > > > > -- > > Sridhara G Kunjeti > > PhD Candidate > > University of Delaware > > Department of Plant and Soil Science > > email- sridhara@udel.edu > > Ph: 832-566-0011 > > > > [[alternative HTML version deleted]] > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor@r-project.org > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > > -------------------------------------------------------------------- ---- > Davis J McCarthy > Research Technician > Bioinformatics Division > Walter and Eliza Hall Institute of Medical Research > 1G Royal Parade, Parkville, Vic 3052, Australia > dmccarthy@wehi.edu.au > http://www.wehi.edu.au > > > ______________________________________________________________________ > The information in this email is confidential and inte...{{dropped:22}}
ADD COMMENT
0
Entering edit mode
Hi Sridhara Yes, you are right that the error is occurring because you are giving the decideTestsDGE() function the object 'd' as an argument and 'd' is a DGEList object. As the error message informs, decideTestsDGE() only works on a DGEExact or DGELRT object. This is because decideTestsDGE() summarises the DE status for the genes in your study, so must operate on the results of the statistical testing procedure for DE. In edgeR these DE results are stored in either a DGEExact object (produced by exactTest) or a DGELRT object (produced by glmLRT). If you pass your 'de.tgw' object (the one produced by exactTest) to decideTestsDGE instead of 'd' then you should get what you're after. Cheers Davis On Apr 15, 2011, at 1:20 AM, Sridhara Gupta Kunjeti wrote: > Hello Davis, > > Here is the history of the codes: > d <- DGEList(counts = d, group = group) > d > d <- estimateCommonDisp(d) > d <- estimateTagwiseDisp(d, prior.n = 10, grid.length = 500) > prior.n <- estimateSmoothing(d) > prior.n > de.tgw <- exactTest(d, common.disp = FALSE) > de.tgw > sum(de.tgw$table$p.value < 0.01) > sum(de.tgw$table$p.value > 0.01) > detags.tgw <- rownames(topTags(de.tgw, n = sum(de.tgw$table$p.value < 0.01))$table) > plotSmear(d, de.tags = detags.tgw, main = "FC Plot using tagwise dispersion") > abline(h = c(-2, 2), col = "dodgerblue", lwd = 2) > plotSmear(d, de.tags = detags.tgw, main = "FC Plot using tagwise dispersion", cex=0.8, pch=plotsymbols) > plotSmear(d, main = "FC Plot using tagwise dispersion", cex=0.8, pch=plotsymbols) > de <- as.logical(abs(decideTestsDGE(d))) > Error in decideTestsDGE(d) : Need DGEExact or DGELRT object > > I guess this error message is because all my objects are in DGEList. > Any other code that I could use to get the plot in Black and White with different shapes for non-DE and DE will be highly appreciated. > > > Thanks, > Sridhara > > > > > On Wed, Apr 13, 2011 at 10:48 PM, Davis McCarthy <dmccarthy@wehi.edu.au> wrote: > Hi Sridhara > > Remember that all of the usual R plotting commands can be passed to plotSmear in the '...' argument (see ?plotSmear). You can just change the pch argument as required (the standard R parameter for plotting symbol). > > This code is one way of doing what you want to do (assuming that your DE results are in a DGEExact or DGELRT object called "results"): > > de <- as.logical(abs(decideTestsDGE(results))) > plotsymbols <- rep(19, nrow(results)) > plotsymbols[de] <- 4 > plotSmear(results, cex=0.8, main="MA Plot", pch=plotsymbols) > > This will give you closed circles for non-DE genes and 'x's for DE genes. You can play with the choice of symbols as you please. > > Cheers > Davis > > > On Apr 13, 2011, at 11:54 PM, Sridhara Gupta Kunjeti wrote: > > > Hello, > > I have used edgeR for DGE analysis and also generated plotSmear. I guess by > > dufault the plotSmear shows red dots for differentially expressed genes. > > But, I want to generate a black and white plot, is there a possbility to > > gene using different shape of the points, may be 'x' for the differentially > > expressed genes. If any one know how to change this it will be helpful. > > > > Many thanks in advance! > > Sridhara > > > > > > -- > > Sridhara G Kunjeti > > PhD Candidate > > University of Delaware > > Department of Plant and Soil Science > > email- sridhara@udel.edu > > Ph: 832-566-0011 > > > > [[alternative HTML version deleted]] > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor@r-project.org > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > > -------------------------------------------------------------------- ---- > Davis J McCarthy > Research Technician > Bioinformatics Division > Walter and Eliza Hall Institute of Medical Research > 1G Royal Parade, Parkville, Vic 3052, Australia > dmccarthy@wehi.edu.au > http://www.wehi.edu.au > > > ______________________________________________________________________ > The information in this email is confidential and intended solely for the addressee. > You must not disclose, forward, print or use it without the permission of the sender. > ______________________________________________________________________ > > > > > > > -- > Sridhara G Kunjeti > PhD Candidate > University of Delaware > Department of Plant and Soil Science > email- sridhara@udel.edu > Ph: 832-566-0011 ---------------------------------------------------------------------- -- Davis J McCarthy Research Technician Bioinformatics Division Walter and Eliza Hall Institute of Medical Research 1G Royal Parade, Parkville, Vic 3052, Australia dmccarthy@wehi.edu.au http://www.wehi.edu.au ______________________________________________________________________ The information in this email is confidential and intended solely for the addressee. You must not disclose, forward, print or use it without the permission of the sender. ______________________________________________________________________ [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Hello Davis, I tried using 'de.tgw' instead of 'd' and I got the following error message: > de <- as.logical(abs(decideTestsDGE(de.tgw))) > plotsymbols <- rep(19, nrow(de.tgw)) > plotsymbols[de] <- 4 > plotSmear(de.tgw, cex = 0.8, main="MM Plot", pch=plotsymbols) Error in plotSmear(de.tgw, cex = 0.8, main = "MM Plot", pch = plotsymbols) : Currently only supports DGEList/DGELRT objects as the object argument. Any thoughts on this, will be of great help. Many thanks! Sridhara On Thu, Apr 14, 2011 at 7:44 PM, Davis McCarthy <dmccarthy@wehi.edu.au>wrote: > Hi Sridhara > > Yes, you are right that the error is occurring because you are giving the > decideTestsDGE() function the object 'd' as an argument and 'd' is a DGEList > object. As the error message informs, decideTestsDGE() only works on a > DGEExact or DGELRT object. This is because decideTestsDGE() summarises the > DE status for the genes in your study, so must operate on the results of the > statistical testing procedure for DE. In edgeR these DE results are stored > in either a DGEExact object (produced by exactTest) or a DGELRT object > (produced by glmLRT). > > If you pass your 'de.tgw' object (the one produced by exactTest) to > decideTestsDGE instead of 'd' then you should get what you're after. > > Cheers > Davis > > > > On Apr 15, 2011, at 1:20 AM, Sridhara Gupta Kunjeti wrote: > > Hello Davis, > > Here is the history of the codes: > d <- DGEList(counts = d, group = group) > d > d <- estimateCommonDisp(d) > d <- estimateTagwiseDisp(d, prior.n = 10, grid.length = 500) > prior.n <- estimateSmoothing(d) > prior.n > de.tgw <- exactTest(d, common.disp = FALSE) > de.tgw > sum(de.tgw$table$p.value < 0.01) > sum(de.tgw$table$p.value > 0.01) > detags.tgw <- rownames(topTags(de.tgw, n = sum(de.tgw$table$p.value < > 0.01))$table) > plotSmear(d, de.tags = detags.tgw, main = "FC Plot using tagwise > dispersion") > abline(h = c(-2, 2), col = "dodgerblue", lwd = 2) > plotSmear(d, de.tags = detags.tgw, main = "FC Plot using tagwise > dispersion", cex=0.8, pch=plotsymbols) > plotSmear(d, main = "FC Plot using tagwise dispersion", cex=0.8, > pch=plotsymbols) > de <- as.logical(abs(decideTestsDGE(d))) > Error in decideTestsDGE(d) : Need DGEExact or DGELRT object > > I guess this error message is because all my objects are in DGEList. > Any other code that I could use to get the plot in Black and White with > different shapes for non-DE and DE will be highly appreciated. > > > Thanks, > Sridhara > > > > > On Wed, Apr 13, 2011 at 10:48 PM, Davis McCarthy <dmccarthy@wehi.edu.au>wrote: > >> Hi Sridhara >> >> Remember that all of the usual R plotting commands can be passed to >> plotSmear in the '...' argument (see ?plotSmear). You can just change the >> pch argument as required (the standard R parameter for plotting symbol). >> >> This code is one way of doing what you want to do (assuming that your DE >> results are in a DGEExact or DGELRT object called "results"): >> >> de <- as.logical(abs(decideTestsDGE(results))) >> plotsymbols <- rep(19, nrow(results)) >> plotsymbols[de] <- 4 >> plotSmear(results, cex=0.8, main="MA Plot", pch=plotsymbols) >> >> This will give you closed circles for non-DE genes and 'x's for DE genes. >> You can play with the choice of symbols as you please. >> >> Cheers >> Davis >> >> >> On Apr 13, 2011, at 11:54 PM, Sridhara Gupta Kunjeti wrote: >> >> > Hello, >> > I have used edgeR for DGE analysis and also generated plotSmear. I guess >> by >> > dufault the plotSmear shows red dots for differentially expressed genes. >> > But, I want to generate a black and white plot, is there a possbility to >> > gene using different shape of the points, may be 'x' for the >> differentially >> > expressed genes. If any one know how to change this it will be helpful. >> > >> > Many thanks in advance! >> > Sridhara >> > >> > >> > -- >> > Sridhara G Kunjeti >> > PhD Candidate >> > University of Delaware >> > Department of Plant and Soil Science >> > email- sridhara@udel.edu >> > Ph: 832-566-0011 >> > >> > [[alternative HTML version deleted]] >> > >> > _______________________________________________ >> > Bioconductor mailing list >> > Bioconductor@r-project.org >> > https://stat.ethz.ch/mailman/listinfo/bioconductor >> > Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> ------------------------------------------------------------------- ----- >> Davis J McCarthy >> Research Technician >> Bioinformatics Division >> Walter and Eliza Hall Institute of Medical Research >> 1G Royal Parade, Parkville, Vic 3052, Australia >> dmccarthy@wehi.edu.au >> http://www.wehi.edu.au >> >> >> ______________________________________________________________________ >> The information in this email is confidential and intended solely for the >> addressee. >> You must not disclose, forward, print or use it without the permission of >> the sender. >> ______________________________________________________________________ >> >> >> >> > > > -- > Sridhara G Kunjeti > PhD Candidate > University of Delaware > Department of Plant and Soil Science > email- sridhara@udel.edu > Ph: 832-566-0011 > > > -------------------------------------------------------------------- ---- > Davis J McCarthy > Research Technician > Bioinformatics Division > Walter and Eliza Hall Institute of Medical Research > 1G Royal Parade, Parkville, Vic 3052, Australia > dmccarthy@wehi.edu.au > http://www.wehi.edu.au > > > > > ______________________________________________________________________ > The information in this email is confidential and inte...{{dropped:20}}
ADD REPLY
0
Entering edit mode
@davis-mccarthy-4138
Last seen 10.2 years ago
Hi Sridhara Remember that all of the usual R plotting commands can be passed to plotSmear in the '...' argument (see ?plotSmear). You can just change the pch argument as required (the standard R parameter for plotting symbol). This code is one way of doing what you want to do (assuming that your DE results are in a DGEExact or DGELRT object called "results"): de <- as.logical(abs(decideTestsDGE(results))) plotsymbols <- rep(19, nrow(results)) plotsymbols[de] <- 4 plotSmear(results, cex=0.8, main="MA Plot", pch=plotsymbols) This will give you closed circles for non-DE genes and 'x's for DE genes. You can play with the choice of symbols as you please. Cheers Davis On Apr 13, 2011, at 11:54 PM, Sridhara Gupta Kunjeti wrote: > Hello, > I have used edgeR for DGE analysis and also generated plotSmear. I guess by > dufault the plotSmear shows red dots for differentially expressed genes. > But, I want to generate a black and white plot, is there a possbility to > gene using different shape of the points, may be 'x' for the differentially > expressed genes. If any one know how to change this it will be helpful. > > Many thanks in advance! > Sridhara > > > -- > Sridhara G Kunjeti > PhD Candidate > University of Delaware > Department of Plant and Soil Science > email- sridhara at udel.edu > Ph: 832-566-0011 > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor ---------------------------------------------------------------------- -- Davis J McCarthy Research Technician Bioinformatics Division Walter and Eliza Hall Institute of Medical Research 1G Royal Parade, Parkville, Vic 3052, Australia dmccarthy at wehi.edu.au http://www.wehi.edu.au ______________________________________________________________________ The information in this email is confidential and intended solely for the addressee. You must not disclose, forward, print or use it without the permission of the sender. ______________________________________________________________________ -------------- next part --------------
ADD COMMENT

Login before adding your answer.

Traffic: 733 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6