[BioC] help with ath1121501
Seth Falcon
sfalcon at fhcrc.org
Fri Oct 13 16:17:52 CEST 2006
Hi Martin,
Martin Olivier <martinol at ensam.inra.fr> writes:
> I have (again) some problems to use the package ath1121501.
> I don't understand the difference between ath1121501G02PROBE and
> ath1121501GO2ALLPROBES...
Here's the description from the help pages of those two environments:
ath1121501GO2PROBE is an R environment that provides mappings
between GO identifiers and manufacturer identifiers.
ath1121501GO2ALLPROBES is an R environment that provides mappings
between a given GO identifier and all manufactuerer identifiers
annotated at that GO term or one of its children in the GO
ontology.
> I made a list listGO2GENE to have for each term GO all the genes that belong
> to this term GO. For this, I use ath1121501G02PROBE or
> ath1121501GO2ALLPROBES. The problem is that the result depends on the choice
> between ath1121501G02PROBE or ath1121501GO2ALLPROBES.
Since the two environments are different, is this a problem? ;-)
> For example, if I use ath1121501G02PROBE, listGO2GENE["GO:0008104"] gives me
> three genes in the the GO term GO:0008104
> $"GO:0008104"
> [1] "AT1G48090" "AT3G50380" "AT5G24740"
>
> and if I use ath1121501GO2ALLPROBES, I obtain more than 570 genes
> for this GO term...
>
> So what is the right file I have to use to obtain the list that gives me
> all the genes
> (in TAIR format) for a particular GO term.
It depends a bit on what you want, but I think you want the
*GO2ALLPROBES environment. This one says, given GO term X, give me
all the probe set IDs annotated at X or at a term that is a descendant
of X. That is the real annotation list for GO term X.
> Here under, I give you the code I used to obtain the list
> listGO2GENE...may be
> the pb is in my code??But it corresponds to a part of the code GOHyperG,
> so it
> would be right...
>
> goV<-mget(ls(ath1121501GO2PROBE),ath1121501GO2PROBE)
as.list(someEnv) would be easier here.
> listGO2GENE<- sapply(goV, function(x) {
> if (length(x) == 0 || is.na(x))
> return(NA)
Not sure this part does what you want. The x may have length > 1 in
which case you return NA for x = c(NA, foo, bar, baz), but not for x =
c(foo, bar, NA, baz). You probably want:
if (length(x) == 0 || (length(x) == 1 && is.na(x)))
> lls <- unique(unlist(mget(x,
> get("ath1121501LOCUSID",mode="environment"))))
If you know the name of the env, there is no reason to use get().
> lls <- lls[!is.na(lls)]
> lls
> })
Also, FYI, GOstats has gone through a major revision in the 1.9
release; GOHyperG is deprecated in favor of hyperGTest (see the
vignette).
Also, you didn't tell us versions of anything and that would, in
general, be helpful.
+ seth
More information about the Bioconductor
mailing list