[BioC] problem with GOstats, developmental version?

Jenny Drnevich drnevich at uiuc.edu
Wed Sep 5 17:02:40 CEST 2007


Hi Seth & Mark,

After updating all packages, it does work (see long code and 
sessionInfo() below). However, are you using a different version of 
the vignette than the one I get from GOstats 2.3.16, dated Aug 30, 
2007?  If so, then I'm surprised it built because it's missing a line 
of code to create the subsetType object used in the first chuck of 
code after loading all the libraries. I highlighted this part in the 
code below. I only knew how to fix it because I had your GOstats 
handout from the BioC2007 workshop, which does have the correct code.

Thanks,
Jenny




R version 2.6.0 Under development (unstable) (2007-08-28 r42679)
Copyright (C) 2007 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

   Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

 > update.packages(ask='graphics')
--- Please select a CRAN mirror for use in this session ---
trying URL 
'http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.6/RSQLite_0.6-2.zip'
Content type 'application/zip' length 544615 bytes (531 Kb)
opened URL
downloaded 531 Kb

package 'RSQLite' successfully unpacked and MD5 sums checked

The downloaded packages are in
         C:\Documents and Settings\drnevich\Local 
Settings\Temp\Rtmppth2jw\downloaded_packages
updating HTML package descriptions
 > source("http://bioconductor.org/biocLite.R")
 > biocLite("Biobase")
Running biocinstall version 2.1.7 with R version 2.6.0 (under development)
Your version of R requires version 2.1 of Bioconductor.
trying URL 
'http://bioconductor.org/packages/2.1/bioc/bin/windows/contrib/2.6/Biobase_1.15.30.zip'
Content type 'application/zip' length 2635716 bytes (2.5 Mb)
opened URL
downloaded 2.5 Mb

package 'Biobase' successfully unpacked and MD5 sums checked

The downloaded packages are in
         C:\Documents and Settings\drnevich\Local 
Settings\Temp\Rtmppth2jw\downloaded_packages
updating HTML package descriptions
 > library(Biobase)
Loading required package: tools

Welcome to Bioconductor

   Vignettes contain introductory material. To view, type
   'openVignette()'. To cite Bioconductor, see
   'citation("Biobase")' and for packages 'citation(pkgname)'.

 > repos <- biocReposList()
 > update.packages(repos=repos,ask=FALSE)
trying URL 
'http://bioconductor.org/packages/2.1/bioc/bin/windows/contrib/2.6/AnnotationDbi_0.1.12.zip'
Content type 'application/zip' length 608740 bytes (594 Kb)
opened URL
downloaded 594 Kb

trying URL 
'http://bioconductor.org/packages/2.1/bioc/bin/windows/contrib/2.6/Category_2.3.30.zip'
Content type 'application/zip' length 622607 bytes (608 Kb)
opened URL
downloaded 608 Kb

trying URL 
'http://bioconductor.org/packages/2.1/bioc/bin/windows/contrib/2.6/geneplotter_1.15.9.zip'
Content type 'application/zip' length 1760946 bytes (1.7 Mb)
opened URL
downloaded 1.7 Mb

trying URL 
'http://bioconductor.org/packages/2.1/bioc/bin/windows/contrib/2.6/GOstats_2.3.16.zip'
Content type 'application/zip' length 1683604 bytes (1.6 Mb)
opened URL
downloaded 1.6 Mb

trying URL 
'http://bioconductor.org/packages/2.1/bioc/bin/windows/contrib/2.6/limma_2.11.11.zip'
Content type 'application/zip' length 1487293 bytes (1.4 Mb)
opened URL
downloaded 1.4 Mb

trying URL 
'http://bioconductor.org/packages/2.1/bioc/bin/windows/contrib/2.6/simpleaffy_2.13.01.zip'
Content type 'application/zip' length 833437 bytes (813 Kb)
opened URL
downloaded 813 Kb

trying URL 
'http://bioconductor.org/packages/2.1/bioc/bin/windows/contrib/2.6/vsn_3.0.14.zip'
Content type 'application/zip' length 1978325 bytes (1.9 Mb)
opened URL
downloaded 1.9 Mb

package 'AnnotationDbi' successfully unpacked and MD5 sums checked
package 'Category' successfully unpacked and MD5 sums checked
package 'geneplotter' successfully unpacked and MD5 sums checked
package 'GOstats' successfully unpacked and MD5 sums checked
package 'limma' successfully unpacked and MD5 sums checked
package 'simpleaffy' successfully unpacked and MD5 sums checked
package 'vsn' successfully unpacked and MD5 sums checked

The downloaded packages are in
         C:\Documents and Settings\drnevich\Local 
Settings\Temp\Rtmppth2jw\downloaded_packages
updating HTML package descriptions
 > library(GOstats)
Loading required package: graph
Loading required package: GO.db
Loading required package: AnnotationDbi
Loading required package: DBI
Loading required package: RSQLite
Loading required package: annotate
Loading required package: RBGL
Loading required package: Category
Loading required package: genefilter
Loading required package: survival
Loading required package: splines
 > shell.exec("C:/PROGRA~1/R/R-26~1.0DE/library/GOstats/doc/GOstatsHyperG.pdf")
 > library("ALL")
 > library("hgu95av2.db")

Attaching package: 'hgu95av2.db'


         The following object(s) are masked from package:GO.db :

          db_conn,
          db_file

 > library("GO.db")
 > library("annotate")
 > library("genefilter")
 > library("GOstats")
 > library("RColorBrewer")
 > library("xtable")
 > library("Rgraphviz")

Attaching package: 'Rgraphviz'


         The following object(s) are masked from package:annotate :

          toFile

 > data(ALL, package = "ALL")
 > Bcell <- grep("^B", as.character(ALL$BT))


############################
 > bcrAblOrNegIdx <- which(as.character(ALL$mol) %in% c("NEG", subsetType))
Error in inherits(x, "factor") : object "subsetType" not found

 > subsetType <- "ALL/AF4"       ### I added this line of code
#############################


 > bcrAblOrNegIdx <- which(as.character(ALL$mol) %in% c("NEG", subsetType))
 > bcrAblOrNeg <- ALL[, intersect(Bcell, bcrAblOrNegIdx)]
 > bcrAblOrNeg$mol.biol = factor(bcrAblOrNeg$mol.biol)
 > entrezIds <- mget(featureNames(bcrAblOrNeg), envir = hgu95av2ENTREZID)
 > haveEntrezId <- names(entrezIds)[sapply(entrezIds, function(x) !is.na(x))]
 > numNoEntrezId <- length(featureNames(bcrAblOrNeg)) - length(haveEntrezId)
 > bcrAblOrNeg <- bcrAblOrNeg[haveEntrezId, ]
 > haveGo <- sapply(mget(featureNames(bcrAblOrNeg), hgu95av2GO),
+ function(x) {
+ if (length(x) == 1 && is.na(x))
+ FALSE
+ else TRUE
+ })
 > numNoGO <- sum(!haveGo)
 > bcrAblOrNeg <- bcrAblOrNeg[haveGo, ]
 > iqrCutoff <- 0.5
 > bcrAblOrNegIqr <- apply(exprs(bcrAblOrNeg), 1, IQR)
 > selected <- bcrAblOrNegIqr > iqrCutoff
 > chrN <- mget(featureNames(bcrAblOrNeg), envir = hgu95av2CHR)
 > onY <- sapply(chrN, function(x) any(x == "Y"))
 > onY[is.na(onY)] <- FALSE
 > selected <- selected & !onY
 > nsFiltered <- bcrAblOrNeg[selected, ]
 > numNsWithDups <- length(featureNames(nsFiltered))
 > nsFilteredIqr <- bcrAblOrNegIqr[selected]
 > uniqGenes <- findLargest(featureNames(nsFiltered), nsFilteredIqr,
+ "hgu95av2")
 > nsFiltered <- nsFiltered[uniqGenes, ]
 > numSelected <- length(featureNames(nsFiltered))
 > BCRcols = ifelse(nsFiltered$mol == subsetType, "goldenrod", "skyblue")
 > cols = brewer.pal(10, "RdBu")
 > affyUniverse <- featureNames(nsFiltered)
 > entrezUniverse <- unlist(mget(affyUniverse, hgu95av2ENTREZID))
 > chipAffyUniverse <- featureNames(bcrAblOrNeg)
 > chipEntrezUniverse <- mget(chipAffyUniverse, hgu95av2ENTREZID)
 > chipEntrezUniverse <- unique(unlist(chipEntrezUniverse))
 > ttestCutoff <- 0.05
 > ttests = rowttests(nsFiltered, "mol.biol")
 > smPV = ttests$p.value < ttestCutoff
 > pvalFiltered <- nsFiltered[smPV, ]
 > selectedEntrezIds <- unlist(mget(featureNames(pvalFiltered),
+ hgu95av2ENTREZID))
 > hgCutoff <- 0.001
 > params <- new("GOHyperGParams", geneIds = selectedEntrezIds,
+ universeGeneIds = entrezUniverse, annotation = "hgu95av2.db",
+ ontology = "BP", pvalueCutoff = hgCutoff, conditional = FALSE,
+ testDirection = "over")
 > hgOver <- hyperGTest(params)
 > hgOver
Gene to GO BP  test for over-representation
3029 GO BP ids tested (0 have p < 0.001)
Selected gene set size: 2889
     Gene universe size: 2889
     Annotation package: hgu95av2.db
 > sessionInfo()
R version 2.6.0 Under development (unstable) (2007-08-28 r42679)
i386-pc-mingw32

locale:
LC_COLLATE=English_United States.1252;LC_CTYPE=English_United 
States.1252;LC_MONETARY=English_United 
States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252

attached base packages:
[1] splines   tools     stats     graphics  grDevices utils     datasets
[8] methods   base

other attached packages:
  [1] Rgraphviz_1.15.5     xtable_1.5-1         RColorBrewer_1.0-1
  [4] hgu95av2.db_1.17.3   ALL_1.4.3            GOstats_2.3.16
  [7] Category_2.3.30      genefilter_1.15.11   survival_2.32
[10] RBGL_1.13.6          annotate_1.15.6      GO.db_1.17.1
[13] AnnotationDbi_0.1.12 RSQLite_0.6-2        DBI_0.2-3
[16] graph_1.15.14        Biobase_1.15.30

loaded via a namespace (and not attached):
[1] cluster_1.11.7
 >




At 10:52 PM 9/4/2007, Seth Falcon wrote:
>Mark W Kimpel <mkimpel at iupui.edu> writes:
>
> > Seth and Jenny,
> >
> > I had the exact same problem last night using code of mine that had
> > been working the past year. I updated all packages and the problem
> > persisted. I would have reported it but was too busy with something
> > that was due today. I am also using R-devel.
>
>Without more detail it is hard to help further.  Note that in
>yesterday's build report GOstats passed all its checks which means
>that the vignette built.
>
>Jenny, if you get a chance to update your packages, can you let us
>know if that resolves the issue for you?
>
>+ seth
>
>--
>Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
>BioC: http://bioconductor.org/
>Blog: http://userprimary.net/user/

Jenny Drnevich, Ph.D.

Functional Genomics Bioinformatics Specialist
W.M. Keck Center for Comparative and Functional Genomics
Roy J. Carver Biotechnology Center
University of Illinois, Urbana-Champaign

330 ERML
1201 W. Gregory Dr.
Urbana, IL 61801
USA

ph: 217-244-7355
fax: 217-265-5066
e-mail: drnevich at uiuc.edu



More information about the Bioconductor mailing list