[BioC] PGSEA and smcPlot
vobencha at fhcrc.org
Mon Aug 1 17:56:30 CEST 2011
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
We see we have 6 rows,
We create 6 new names and add the 'GS',
rnames <- c('GS', LETTERS[1:nrow(pg[,])])
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])
or change the row names of your data before calling the smcPlot function,
rownames(pg) <- LETTERS[1:nrow(pg[,])]
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?
> R version 2.13.1 (2011-07-08)
> Platform: x86_64-pc-linux-gnu (64-bit)
>  LC_CTYPE=en_GB.utf8 LC_NUMERIC=C
>  LC_TIME=en_GB.utf8 LC_COLLATE=en_GB.utf8
>  LC_MONETARY=C LC_MESSAGES=en_GB.utf8
>  LC_PAPER=en_GB.utf8 LC_NAME=C
>  LC_ADDRESS=C LC_TELEPHONE=C
>  LC_MEASUREMENT=en_GB.utf8 LC_IDENTIFICATION=C
> attached base packages:
>  stats graphics grDevices utils datasets methods base
> other attached packages:
>  pheatmap_0.3 limma_3.6.6 PGSEA_1.14.0
>  samr_1.28 impute_1.26.0 GOstats_2.18.0
>  graph_1.30.0 Category_2.16.0 genefilter_1.32.0
>  hgu133plus2.db_2.4.5 org.Hs.eg.db_2.4.6 RSQLite_0.9-4
>  DBI_0.2-5 annotate_1.28.0 AnnotationDbi_1.14.1
>  affy_1.28.0 Biobase_2.10.0
> loaded via a namespace (and not attached):
>  affyio_1.18.0 colorspace_1.0-1 GO.db_2.5.0
>  grid_2.13.1 GSEABase_1.12.1 preprocessCore_1.12.0
>  RBGL_1.28.0 splines_2.13.1 survival_2.36-9
>  tools_2.13.1 XML_3.4-0 xtable_1.5-6
> Bioconductor mailing list
> Bioconductor at r-project.org
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
More information about the Bioconductor