[BioC] how can I use the limma result as input in topGo

James W. MacDonald jmacdon at med.umich.edu
Thu Nov 8 16:13:34 CET 2007


Hi Caroline,

You need an as.character() for the gene names. So you might need to 
construct your genelist differently. Something like

genelist <- mytable$P.Value
names(genelist) <- as.character(mytable[,1])

should work.

Best,

Jim



Caroline Reiff wrote:
>    I wonder if somebody can tell me how I can use my P values from the limma
>    test as input into topGo. This is what I tried:
>    In topGo I usually do the following using the standard t-test:
>    > geneList <- getPvalues(exprs(esetSub), classlabel = y, alternative =
>    "two.sided", correction = "BH")
>    > geneList[1:10]
>        1415670_at    1415671_at    1415672_at    1415673_at  1415674_a_at
>    1415675_at
>        0.15021513    0.07711458    0.38562825    0.78996178    0.64844312
>    0.16257882
>    1415676_a_at   1415677_at   1415678_at   1415679_at
>      0.92404052   0.01690829   0.30654309   0.55264382
>    > length(geneList)
>    [1] 9103
>    > topDiffGenes <- function(allScore) {
>    + return(allScore < 0.01)
>    + }
>    > GOdata <- new("topGOdata",
>    + ontology = "BP",
>    + allGenes = geneList,
>    + geneSel = topDiffGenes,
>    + description = "GO analysis of data. Diff. Expre. between WT and IL10",
>    + annot = annFUN.hgu,
>    + affyLib = affyLib)
>    Building most specific GOs .....        ( 2088 GO terms found. )
>    Build GO DAG topology ..........        ( 3286 GO terms and 5438 relations.
>    )
>    Annotating nodes ...............        ( 6088 genes annotated to the GO
>    terms. )
>    I tried to replace geneList with the results from limma in the following
>    way:
>    > geneList<-as.array(mytable$P.Value)
>    > dimnames(geneList) <- list(mytable$ID)
>    This gives me a genelist just as the one before except that the results are
>    ordered by P-value as they come from the limma table
>    > geneList[1:10]
>           1423677_at NuGO_emt025263_at        1421628_at        1436576_at
>         4.335431e-10      2.530289e-09      4.326564e-09      4.470340e-09
>           1450034_at        1422632_at        1453080_at        1438037_at
>         5.625014e-09      5.931422e-09      6.114187e-09      6.872450e-09
>           1422953_at        1446280_at
>         1.078998e-08      1.143128e-08
>    > length(geneList)
>    [1] 9103
>    but when I use this as input in topGo I get an error message:
>    > topDiffGenes <- function(allScore) {
>    + return(allScore < 0.01)
>    + }
>    > GOdata <- new("topGOdata",
>    + ontology = "BP",
>    + allGenes = geneList,
>    + geneSel = topDiffGenes,
>    + description = "WT versus Il10 ko",
>    + annot = annFUN.hgu,
>    + affyLib = affyLib)
>    Error in checkSlotAssignment(object, name, value) :
>             assignment of an object of class "AsIs" is not valid for slot
>    "allGenes" in an object of class "topGOdata"; is(value, "character") is not
>    TRUE
>    >
>     Hope somebody can help, Many thanks Caroline
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor

-- 
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623



More information about the Bioconductor mailing list