[Bioc-devel] unexpected build and check error
Luo Weijun
luo_weijun at yahoo.com
Mon Apr 7 21:55:52 CEST 2014
Hi Dan,
Thanks for the reminder. They are not the same indeed, all my questions got answers now.
Weijun
--------------------------------------------
On Sun, 4/6/14, Dan Tenenbaum <dtenenba at fhcrc.org> wrote:
Subject: Re: [Bioc-devel] unexpected build and check error
Cc: bioc-devel at r-project.org, "Martin Morgan" <mtmorgan at fhcrc.org>
Date: Sunday, April 6, 2014, 10:00 PM
Hi Weijun,
----- Original Message -----
> To: "Dan Tenenbaum" <dtenenba at fhcrc.org>,
"Martin Morgan" <mtmorgan at fhcrc.org>
> Cc: bioc-devel at r-project.org
> Sent: Sunday, April 6, 2014 6:51:17 PM
> Subject: Re: [Bioc-devel] unexpected build and check
error
>
> Martin,
> Your observation on re-uses the same environment to
build all
> vignettes is very helpful. The pre-existence of another
copy of bods
> does explain why I had problem with bods. What I
don’t understand is
> that this pre-existence copy should be identical
because I’ve
> updated both copies in pathview and gage package at the
same time.
> The error does make sense in the first round of
check/build when the
> R server has not updated its pathview package which
I’ve
> communicated with Dan. But now pathview package has
already been
> updated, why I still see the old bods data being loaded
from
[[elided Yahoo spam]]
You might want to double-check that the two datasets are
indeed identical; they don't appear to be to me:
load("gage/data/bods.rda")
ls()
gage.bods <- bods
load("pathview/data/bods.rda")
pathview.bods <- bods
identical(gage.bods, pathview.bods)
# returns FALSE
> all.equal(gage.bods, pathview.bods)
[1] "Attributes: < Component “dimnames”: Component 2:
1 string mismatch >"
> dimnames(gage.bods)
[[1]]
NULL
[[2]]
[1]
"package" "species" "kegg
code" "id.type"
> dimnames(pathview.bods)
[[1]]
NULL
[[2]]
[1]
"package" "species" "kegg
code" "gene.id"
Look like one has id.type and the other has gene.id.
> packageVersion("gage")
[1] ‘2.13.5’
> packageVersion("pathview")
[1] ‘1.3.4’
Dan
> Weijun
>
> --------------------------------------------
> On Sat, 4/5/14, Martin Morgan <mtmorgan at fhcrc.org>
wrote:
>
> Subject: Re: [Bioc-devel] unexpected build and
check error
"Dan Tenenbaum"
> <dtenenba at fhcrc.org>
> Cc: bioc-devel at r-project.org
> Date: Saturday, April 5, 2014, 1:26 PM
>
> On 04/04/2014 10:36 AM, Luo Weijun
> wrote:
> > Dan,
> > Thanks for the followup. That’s wired. I
use R 3.0.0
> here. It is different from R-3.1.0, but I don’t
think it
> would make such a difference in generating the
error below:
> > Error in bods[idx, "id.type"] : subscript
out of
> bounds
> >
> > I run the exact same build command on my
local machine
> (as below), I got the same error indeed:
> > R CMD build --keep-empty-dirs
--no-resave-data gage
> >
> > But if I install gage package first, then
then create
> vignettes manually, everything is fine.
> > sudo R CMD INSTALL gage
> > cd gage/vignettes/
> > R CMD Sweave gage.Rnw
> > R CMD texi2dvi -p gage.tex
> >
> > I am not sure, why there is such a
difference. Do you
> have any idea on this?
>
> I can reproduce this providing the path to the
gage source
> tree
>
> tools::buildVignettes(dir="path/to/gage",
> quiet=FALSE)
>
> you'll see that this builds the dataPrep vignette
first, and
> then the gage
> vignette. It seems like dataPrep loads data bods
from
> pathview into the global
> environment, and when the gage vignette is being
processed
> it attempts to load
> an identically named data set into the (same)
global
> environment.
>
> The (partial) output of buildVignettes is in
> gage/vignettes/gage.tex; editing
> gage.Rnw to include a print(ls()) early in the
vignette
> confirms that an object
> 'bods' already exists.
>
> It's surprising to me that R re-uses the same
environment to
> build each
> vignette, and I'll take this up on the R-devel
mailing
> list.
>
> The data() function can arrange to load data into
an
> arbitrary environment; for
> a function it seems better not to write to the
global
> environment, and something
> like
>
> env = new.env(parent=emptyenv())
> obj = data("bods",envir=env)
> bods = env[[obj]]
>
> is better.
>
> Hopefully this helps to address your problem.
>
> Martin
>
> >
> > I suspected that bods data file (bods.rda in
the data
> directory) was not updated or have some problem
somehow.
> Below is the problematic code chunk in the
go.gset.R file:
> >
> > …
> > idx=which(bods[,"species"]
> == species)
> > if(length(idx)!=1) stop("bad
> species value")
> > pkg.name = bods[idx,
> "package"]
> > id.type=toupper(bods[idx,
> "id.type"])
> > …
> >
> > I tried to insert the following two lines:
> > print(head(bods))
> > print(idx)
> > before the last line above and rerun rerun:
R CMD build
> --keep-empty-dirs --no-resave-data gage
> > The error still exists, but I don’t see
the printed
> out results from the newly added lines, hence not
able to
> figure out what happened there.
> > so far, I can think of anything wrong with
gage
> package. because the manual install and vignette
creating
> worked. The only problem I am sure is that R CMD
build
> --keep-empty-dirs --no-resave-data behave
differently from
> the manual process. Could you help to check into
the problem
> here? Thank you! I am cc’ing the devel list see
if other
> people got the same problem.
> > Weijun
> >
> >
--------------------------------------------
> > On Fri, 4/4/14, Dan Tenenbaum <dtenenba at fhcrc.org>
> wrote:
> >
> > Subject: Re: unexpected build and
> check error
> >
> > Date: Friday, April 4, 2014, 12:24 PM
> >
> > Hi Weijun,
> >
> > gage is still broken today:
> >
> > http://www.bioconductor.org/checkResults/2.14/bioc-LATEST/gage/zin2-buildsrc.html
> >
> > It seems to be using the latest
> versions:
> >
> > > packageVersion("gage")
> > [1] ‘2.13.5’
> > > packageVersion("pathview")
> > [1] ‘1.3.4’
> >
> > So maybe the cause of the problem is
> different? Have you
> > tried using the most recent R?
> (R-3.1.0 RC)?
> >
> > Dan
> >
> >
> >
> > ----- Original Message -----
> > > From: "Dan Tenenbaum" <dtenenba at fhcrc.org>
> >
> > > Sent: Thursday, April 3, 2014
> 10:24:10 AM
> > > Subject: Re: unexpected build and
> check error
> > >
> > > No, I think it will be ok
> tomorrow. If not I'll make
> > sure it gets
> > > fixed.
> > > Thanks,
> > > Dan
> > >
> > >
> > > ----- Original Message -----
> >
> > > > To: "Dan Tenenbaum" <dtenenba at fhcrc.org>
> > > > Sent: Thursday, April 3,
> 2014 10:19:16 AM
> > > > Subject: unexpected build
> and check error
> > > >
> > > > Dear Dan,
> > > > I got the following error in
> the bioc 2.14 build
> > report:
> > > > http://bioconductor.org/checkResults/devel/bioc-LATEST/gage/zin2-buildsrc.html
> > > >
> > > > Error: processing vignette
> 'gage.Rnw' failed with
> > diagnostics:
> > > > chunk 12 (label =
> go.gsets)
> > > > Error in bods[idx,
> "id.type"] : subscript out of
> > bounds
> > > > Execution halted
> > > >
> > > > I believe this is due to the
> loading of the old
> > pathview package at
> > > > that time, which carries a
> copy of obsolete bods
> > hence interfered
> > > > the build/check. But since
> pathview and gage was
> > updated at the
> > > > same
> > > > time. This error will be
> gone in the next
> > building/checking cycle.
> > > > My local copy does get
> through the
> > building/checking free of error.
> > > > Shall we do something given
> that the today is
> > “Deadline for
> > > > packages
> > > > passing R CMD build and
> check without warning”?
[[elided Yahoo spam]]
> > > > Weijun
> > > >
> > > >
> > >
> >
> >
_______________________________________________
> > Bioc-devel at r-project.org
> mailing list
> > https://stat.ethz.ch/mailman/listinfo/bioc-devel
> >
>
>
> --
> Computational Biology / Fred Hutchinson Cancer
Research
> Center
> 1100 Fairview Ave. N.
> PO Box 19024 Seattle, WA 98109
>
> Location: Arnold Building M1 B861
> Phone: (206) 667-2793
>
>
More information about the Bioc-devel
mailing list