PGSEA and smcPlot
Entering edit mode
Last seen 8 months ago
United States
Hi Iain, Without a sample of your code, it is difficult to tell where you are having problems. My guess is that you are not appending an additional 'GS' row name to your new vector of row names. If we take the example from page 2 of the vignette, the plot call is smcPlot(pg[,],sub,scale=c(-12,12),show.grid=T,margins=c(1,1,7,13),col= .rwb) We see we have 6 rows, dim(pg[,]) We create 6 new names and add the 'GS', rnames <- c('GS', LETTERS[1:nrow(pg[,])]) smcPlot(pg[,],sub,scale=c(-12,12),show.grid=T,margins=c(1,1,7,13),col= .rwb, rnames=rnames) Notice the row names are reversed (E -> A insead of A -> E). This happens in smcPlot code. If you type smcPlot you will see the source code and here hold <- as.matrix(m[nrow(m):1,]) is where the rows of the matrix are reversed. To get the proper ordering or row names, you can either enter the row names in reverse order, rnames <- c('GS', LETTERS[nrow(pg[,]):1]) smcPlot(pg[,],sub,scale=c(-12,12),show.grid=T,margins=c(1,1,7,13),col= .rwb, rnames=rnames) or change the row names of your data before calling the smcPlot function, rownames(pg) <- LETTERS[1:nrow(pg[,])] smcPlot(pg[,],sub,scale=c(-12,12),show.grid=T,margins=c(1,1,7,13),col= .rwb) Valerie On 07/27/2011 11:44 AM, Iain Gallagher wrote: > Hi List > > I'm using PGSEA and I would like to plot the results of my analysis using the smcPlot function in the package. > > Using this function appends a row labelled 'GS' at the bottom of the plot. I would like to use custom row labels for my plot and have created a vector of names as suggested in the package documentation. > > When I try to use this I get the following error: > > Error in axis(4, 1:nrow(m), las = 2, line = -0.5, tick = 0, labels = rnames, : > 'at' and 'labels' lengths differ, 52 != 51 > > suggesting that my rnames vector and the number of rows in the matrix used for the plot have different lengths. They don't however - both are 51. > > The 'GS' not in the matrix before it goes into the plotting function (smcPlot) and I can't see anything indicating that this is added in the plotting function. > > I've also tried adding a 'dummy' label to my vector of row labels (i.e. to make it 52 in length) but the result is the same. > > Could anyone enlighten me? > > Thanks > > iain > >> sessionInfo() > R version 2.13.1 (2011-07-08) > Platform: x86_64-pc-linux-gnu (64-bit) > > locale: > [1] LC_CTYPE=en_GB.utf8 LC_NUMERIC=C > [3] LC_TIME=en_GB.utf8 LC_COLLATE=en_GB.utf8 > [5] LC_MONETARY=C LC_MESSAGES=en_GB.utf8 > [7] LC_PAPER=en_GB.utf8 LC_NAME=C > [9] LC_ADDRESS=C LC_TELEPHONE=C > [11] LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > other attached packages: > [1] pheatmap_0.3 limma_3.6.6 PGSEA_1.14.0 > [4] samr_1.28 impute_1.26.0 GOstats_2.18.0 > [7] graph_1.30.0 Category_2.16.0 genefilter_1.32.0 > [10] hgu133plus2.db_2.4.5 RSQLite_0.9-4 > [13] DBI_0.2-5 annotate_1.28.0 AnnotationDbi_1.14.1 > [16] affy_1.28.0 Biobase_2.10.0 > > loaded via a namespace (and not attached): > [1] affyio_1.18.0 colorspace_1.0-1 GO.db_2.5.0 > [4] grid_2.13.1 GSEABase_1.12.1 preprocessCore_1.12.0 > [7] RBGL_1.28.0 splines_2.13.1 survival_2.36-9 > [10] tools_2.13.1 XML_3.4-0 xtable_1.5-6 > > > > _______________________________________________ > Bioconductor mailing list > Bioconductor at > > Search the archives:
GO hgu133plus2 PGSEA GO hgu133plus2 PGSEA • 799 views

Login before adding your answer.

Traffic: 239 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6