On 10/20/2017 03:43 AM, Paolo Martini wrote:
Dear all,
I am the clipper package maintainer.
According to the "Build/check report" for BioC 3.6,
the clipper package has an error while compiling the vignette.
I try to reproduce the error in my computer using the devel version but
the
R CMD check and installation goes smoothly.
I verified that I'm using devel and my packages are current
$ R
R.version.string # 3.4.2
BiocInstaller::isDevel() # TRUE
BiocInstaller::biocValid() # TRUE
I checked out a fresh copy of clipper, into a temporary directory
$ git clone
https://urldefense.proofpoint.com/v2/url?u=https-3A__git.bioconductor.org_packages_clipper&d=DwICAg&c=eRAMFD45gAfqt84VtBcfhQ&r=BK7q3XeAvimeWdGbWY_wJYbW0WYiZvSXAJJKaaPhzWA&m=fDgotR2rO-xwDUi1RGfMv9bHkBXP5PMyu5zJNd5SzU8&s=YUUYFTvB1PyiJzzi_eBAUeOeAjO5VX88g1KVOohJoO0&e=
then installed it
$ R CMD INSTALL clipper
I then extracted the R source code of the vignette
$ cd clipper/vignettes
$ R CMD Stangle clipper.Rnw # could have used knitr::purl() for Rmd
and tried to run the vignette code
$ R -f clipper.R
It fails as on the build system
pathwayAnalysis <- pathQ(exp, classes, graph, nperm=100, alphaV=0.05,
b=100)
Error in getExpression(exprs(expr), classes) : Gene names not specified.
Calls: pathQ ... getExpression -> getExpression -> getExpression ->
getExpression
Execution halted
OK, reproducible without any additional stuff like devtools or RStudio
getting in the way. Time to debug. I started R in my favorite IDE, and
tried to source the vignette
$ source("clipper.R", echo=TRUE, max=Inf)
it fails in the same way. I looked for the error, and tried to reproduce
it in a simpler fashion, guessing a bit at what the failing code was trying
to do ('expr' in the traceback() being the function argument 'exp')
pathwayAnalysis <- pathQ(exp, classes, graph, nperm=100, alphaV=0.05,
b=100)
Error in getExpression(exprs(expr), classes) : Gene names not specified.
traceback()
10: stop("Gene names not specified.")
9: getExpression(exprs(expr), classes)
8: getExpression(exprs(expr), classes)
7: getExpression(expr, classes)
6: getExpression(expr, classes)
5: pathQ(exp, classes, graph, nperm = 100, alphaV = 0.05, b = 100) at
clipper.R#95
4: eval(ei, envir)
3: eval(ei, envir)
2: withVisible(eval(ei, envir))
1: source("clipper.R", echo = TRUE, max = Inf)
clipper:::getExpression(exprs(exp), classes)
Error in clipper:::getExpression(exprs(exp), classes) :
Gene names not specified.
I found that clipper:::getExpression is and S4 generic, with a likely
method, so set the debugger and tried again
clipper:::getExpression
standardGeneric for "getExpression" defined from package "clipper"
function (expr, classes)
standardGeneric("getExpression")
<environment: 0x11061920>
Methods may be defined for arguments: expr, classes
Use showMethods("getExpression") for currently available ones.
showMethods(clipper:::getExpression)
Function: getExpression (package clipper)
expr="ExpressionSet", classes="numeric"
expr="matrix", classes="numeric"
debug(clipper:::getExpression, signature=c("matrix", "numeric"))
clipper:::getExpression(exprs(exp), classes)
Tracing clipper:::getExpression(exprs(exp), classes) step 2
Called from: eval(expr, p)
Browse[1]> n
debug: if (is.null(rownames(expr))) stop("Gene names not specified.")
Browse[2]> rownames(expr)
NULL
Browse[2]> Q
and back at the top level
rownames(exprs(exp))
NULL
hmm, this looks weird
dim(exp)
Features Samples
0 79
In code chunk 3 you'd got the genes from graphite, and
head(genes)
[1] "ENTREZID:10000" "ENTREZID:1019" "ENTREZID:1021"
[4] "ENTREZID:1026" "ENTREZID:1029" "ENTREZID:1147"
in code chunk 10 you'd calculated the intersection of these genes with the
row.names of the sample expression set
intersect(genes, row.names(exprs(all)))
character(0)
and this is because the rownames are in a different format
head(row.names(exprs(all)))
[1] "5595" "7075" "1557" "643" "643" "1843"
I guess this is because graphite or one of it's dependencies has changed,
accidentally or otherwise, the format of the identifiers returned in chunk
3. Likely the reason that you were not able to reproduce this is because
you were using an out-of-date version of graphite (isDevel() and
biocValid() would have diagnosed this). I don't know whether the resolution
is a bug fix in graphite, or a fix to your own vignette code; it is always
worth pushing the resolution as close to the source of the problem as
possible, so if it's a change in graphite then engage the
maintainer("graphite") in your investigation.
Martin
Anyone has suggestions on how to debug this?
This email message may contain legally privileged and/or confidential
information. If you are not the intended recipient(s), or the employee or
agent responsible for the delivery of this message to the intended
recipient(s), you are hereby notified that any disclosure, copying,
distribution, or use of this email message is prohibited. If you have
received this message in error, please notify the sender immediately by
e-mail and delete this email message from your computer. Thank you.