Karl,

Thanks for your help. I tried converting the identifiers as you suggested (which works fine) but the output is still the same, GO terms followed by NaN. Maybe it's just me but it wasn't obvious from the vignette that the identifiers need to be converted. Additionally, when I run PGSEA() after converting the rownames I see errors that weren't there before. If I run the following:

mcs <- go2smc()[1:10]
pg <- PGSEA(data.table, cl=mcs)

Then the output is like this:
[1] 1
[1] 2
[1] 3
[1] 4
[1] 5
Error in apply(texprs, 2, mean, na.rm = TRUE) :
        dim(X) must have a positive length
[1] 6
Error in apply(texprs, 2, mean, na.rm = TRUE) :
        dim(X) must have a positive length
[1] 7
Error in apply(texprs, 2, mean, na.rm = TRUE) :
        dim(X) must have a positive length
[1] 8
[1] 9
[1] 10

I'm assuming that this is something in the internals of the PGSEA fuction but I have no idea what causes it. Anymore ideas?

Richard




On Saturday 08 September 2007 14:41:35 you wrote:
> Richard,
>
> I think your problem is that the identifiers of your data matrix are
> affymetrix IDs and the identifiers that GO uses are entrez genes. You can
> change them something like this (assuming you are using this type of
> microarray...)
>
> library(hgu133plus2)
> rownames(data.table) <-
> unlist(mget(rownames(data.table),env=hgu133plus2ENTREZID,ifnotfound=NA))
>
> Let me know if you're still having problems and I can help more once I get
> back to work on Monday.
>
> -karl
>
>
>
> ------ Forwarded Message
> From: Richard Birnie <richard.birnie@pro-curetherapeutics.com>
> Organization: Pro-Cure Therapeutics
> Date: Fri, 7 Sep 2007 10:27:00 +0100
> To: <bioconductor@stat.math.ethz.ch>
> Subject: [BioC] PGSEA returning NaN?
>
> Dear Bioconductor people,
>
> I'm trying to use the PGSEA package to analyse some affymetrix gene
> expression data for over represented gene ontology terms. Instead of
> returning a list of GO terms with their score/p-value the PGSEA function is
> returning a list of GO terms followed by NaN. I can't understand why I'm
> getting 'Not a Number' instead of the expected results See below for
> further explanation. I've tried to stick as closely as possible to the
> example code in the package vignette and I just can't see the problem
>
> This is a subset of the data matrix I am using as input:
>
> ProbeID PE228 alpha2lo PE228 CD133 PE434 alpha2lo PE434 CD133
> 1553186_x_at 6.08 7.96 6.54 6.24
> 1556416_s_at 4.61 4.76 4.66 4.88
> 1557578_at 4.85 5.31 5.11 5.55
> 1558783_at 5.51 4.74 3.92 5.53
> 201292_at 8.85 9.57 5.47 8.02
> 203753_at 7.94 8.83 8.64 8.70
>
> I load the data set like so:
> data.table <-
> as.matrix(read.table(file="/home/richard/Work/Microarray/Data/UPstemSB_log2
>. txt",
>        header=TRUE, row.names=1, sep="\t", quote=""))
>
> I create my smc object of GO terms as in the package vignette like this:
> mcs <- go2smc()
>
> Then I run the PGSEA function like so;
> pg <- PGSEA(data.table, cl=mcs)
>
> This returns output like below (each GO term is a single line):
> PE228.alpha2lo
> GO:0000002 mitochondrial genome maintenance
> NaN
> GO:0000030 mannosyltransferase activity
> NaN
> GO:0000049 tRNA binding
> NaN
> GO:0000051 urea cycle intermediate metabolic process
> NaN
> GO:0000059 protein import into nucleus, docking
> NaN
> GO:0000060 protein import into nucleus, translocation
> NaN.
>
> If I use the example data set from the vignette I get the following:
> data(nbEset)
> pg <-PGSEA(nbEset@exprs, cl=mcs)
> returns:
>
> GSM90388.CEL
> GO:0000002 mitochondrial genome maintenance
> 4.550111
> GO:0000030 mannosyltransferase activity
> 3.600518
> GO:0000049 tRNA binding
> NA
> GO:0000051 urea cycle intermediate metabolic process
> -3.354720
> GO:0000059 protein import into nucleus, docking
> 5.197919
> GO:0000060 protein import into nucleus, translocation
> NA
>
> This makes me suspect there is something wrong with the format of my input
> data but I can't see what. class() tells me that my data and the example
> data are both matrices. If I print the two datasets they look the same.
> I've been working on this for over a day now, can someone tell me what I'm
> doing wrong
>
> sessionInfo()
> R version 2.5.1 (2007-06-27)
> i686-pc-linux-gnu
>
> locale:
> LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.UTF-
>8
> ;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NA
>M
> E=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATIO
>N =C
>
> attached base packages:
> [1] "tools"     "stats"     "graphics"  "grDevices" "utils"     "datasets"
> [7] "methods"   "base"
>
> other attached packages:
>       GO    PGSEA    Ruuid  Biobase
>
> Apologies for the length of this e-mail I hope I've made myself clear. All
> help greatly appreciated.
>
> regards,
> Richard
>
>
> --
> Dr Richard Birnie
>
> Research Scientist
> Procure-Therapeutics
> Biocentre
> Innovation Way
> York Science Park
> Heslington
> York
> YO10 5NY
>
> Tel:01904 435125
> e-mail:richard.birnie@pro-curetherapeutics.com
>  [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
>
> ------ End of Forwarded Message
>
>
> This email message, including any attachments, is for the ...{{dropped}}

