Skip to content
Prev 14282 / 21307 Next

[Bioc-devel] Fwd: singscore problems reported in the Multiple platform build/check report for BioC 3.8

Hi Ruqian,

I think this is a consequence of your internal data.frames have column
names that include the minus sign i.e. "-".  The code clearly tries to deal
with this by wrapping them in back-ticks at certain points, but I think it
doesn't do this successfully in projectScoreLandscape()

First, consider this example, which I think is a simplified version of what
happens in plotScoreLandscape()

df <- data.frame(x = 1:10, y = 1:10)
colnames(df) <-  c("tgca-EPI","tgca-MES")
ggplot(df, aes_string("`tgca-EPI`", "`tgca-MES`")) +
  geom_point()

For me this works & produces a plot where the axis labels include the
backticks i.e. `tgca-EPI` and `tgca-EPI`

Now we rename the columns of our data.frame to include the back-ticks,
which is what happens when plabs = c(plotObj$labels$x, plotObj$labels$y) is
called within projectScoreLandscape(). We plot in the same fashion and get
an error similar to what you're seeing.

colnames(df) <-  c("`tgca-EPI`","`tgca-MES`")
ggplot(df, aes_string("`tgca-EPI`", "`tgca-MES`")) +
  geom_point()

Error in FUN(X[[i]], ...) : object 'tgca-EPI' not found

Why this behavior would change I don't know, but presumably something in
one of the tidyverse packages has led to this.  You should probably
investigate more, but if this is the problem then you can modify that plabs
line in projectScoreLandscape() to strip the back-ticks. However, perhaps a
more robust solution is to enforce the use of "_" rather than "-" in column
names, that way you don't have to worry about using back-ticks to quote the
non-syntactic names.

Best regards,

Mike

On Mon, 5 Nov 2018 at 14:21, Ruqian Lyu <ruqianl at student.unimelb.edu.au>
wrote: