[BioC] GoStats
Robert Gentleman
rgentlem at jimmy.harvard.edu
Wed Oct 27 01:08:22 CEST 2004
On Thu, Oct 07, 2004 at 06:25:45PM +0200, Auer Michael wrote:
> When applying GOHyperG to a series of Locus IDs, the function only reports
> the GO ID and the corresponding frequencies. But what most people want to
> have, when interpreting the GO results is the corresponding Affy IDS which
> map on the different Locus IDs and GO IDS.
>
> Code I use
>
> Locusids<-mget(AffyIDS,env=hgu133aLOCUSID)
> /*retrieves the LOCUS LINK IDS from a series of AffyIDS*/
>
> MF<- GOHyperG(Locusids,lib="hgu133a",what="MF")
> /*reports the occurring Gene Ontologies, the frequencies and the
> hypergeometric p values*/
>
> How can I get a result of the form
>
> 1. GO ID, freq (output of GoHyperG)
>
> 2. GO ID, LOCUS ID (multiple occurring GO IDs)
>
> 3. LOCUS ID, AFFY ID (multiple occurring LOCUS IDs)
>
>
> I know that there is the function hgu95av2GO2ALLPROBES$"GO:0000166" which
> retrieves all the probes mapping on a GO, but still it is not the result.
> Ok, one would have to make a for loop and look for the occurring probes in
> the sample. But isn't there a better way????
Hi,
I have updated the return value for the package, I hope that comes
close to addressing your concerns.
GO maps to LocusLink, so it does not make sense for this function to
start with Affy (or at least I don't think it does). So if you have
some affy ids, you can use the LOCUSID environment to get the locus
link values.
[if you have your affy id's in a vector x, you can go
y = unlist(mget(x, hgu95av2LOCUSID))
names(y) = NULL
byLL = split(x, y) ##gets Affy id by locuslink;]
Given a unique set of LocusLink IDs you can call GOHyperG, and now
in the return value you will get a mapping from GO id to all Affy
IDs, at that probe. You can then use other things - to reduce these
to unique LocusLink etc)
So, if we presume the output of GOHyperG is in the variable xx (as
it will be if you just use exampel(GOHyperG),
you will now see (or when you get the new version)
> names(xx)
[1] "pvalues" "goCounts" "chip" "go2Affy" "intCounts" "numLL"
[7] "numInt" "intLLs"
and now we can use go2Affy to find the GO to LL maps
myGO2LL = lapply(xx$go2Affy, function(x) unique(unlist(mget(x,
hgu95av2LOCUSID))))
I think that gets pretty close to what you wanted, but let me know
if it is not yet correct.
Robert
>
>
> Thanks a lot
>
> Michael Auer
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
--
+---------------------------------------------------------------------------+
| Robert Gentleman phone : (617) 632-5250 |
| Associate Professor fax: (617) 632-2444 |
| Department of Biostatistics office: M1B20 |
| Harvard School of Public Health email: rgentlem at jimmy.harvard.edu |
+---------------------------------------------------------------------------+
More information about the Bioconductor
mailing list