Problem with texi2dvi while compiling package on Windows
2
0
Entering edit mode
@miguel-julia-7842
Last seen 4.6 years ago
United Kingdom

Hello,

I am trying to update my package in Bioconductor, but the vignette is having problems on Windows. The problem seems to be related with the name of the pictures, but I already solved that problem in the first version of the package and it still works fine in the other OS.

You can see the error report here: http://bioconductor.org/checkResults/devel/bioc-LATEST/sincell/moscato1-buildsrc.html

And the code of the vignette: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/sincell/vignettes/sincell-vignette.Rnw

In the first version I could fix it adding this to the source code:

<<renaming_figures, echo=FALSE, results="hide", eval=TRUE>>=
library(stringr)
figs <- list.files("./figure", full.names=TRUE)
figs.new <- str_replace(figs, "-1", "")
file.rename(figs, figs.new )
@ %def

Does anyone know how to solve this now?

Thanks!

Miguel

compilation error • 1.4k views
ADD COMMENT
2
Entering edit mode
@james-w-macdonald-5106
Last seen 11 hours ago
United States

You are for some reason using knitr, but yet not really.

In the following code

<<EigenValues, echo=TRUE, fig.width=4.5, fig.height=4.5>>=
plot(SO[["EigenValuesPCA"]],las=1, 
	main="Proportion of variance explained by\neach PCA principal axis", 
	ylab="Proportion of variance",xlab="Principal axes",
	pch=16,ylim=c(0,0.25))
@ %def

\begin{figure}
\centering
\includegraphics[width=.45\textwidth]{figure/EigenValues}
\caption{
Proportion of variance explained by each principal axis obtained by a Principal Component Analysis (PCA) of the expression matrix.
}
\end{figure}

You are making a plot (and knitr is putting in a figure) and then you are manually inserting the plot again. And then at the end of your vignette you are renaming all the figures so they conform to your manual LaTeX. This is completely unnecessary. You can do the exact same thing with

<<include=FALSE>>=
opts_knit$set(eval.after = "fig.cap")
@

<<EigenValues, echo=TRUE, out.width="0.49\\linewidth", fig.cap = fig.cap>>=
plot(SO[["EigenValuesPCA"]],las=1,
main="Proportion of variance explained by\neach PCA principal axis",
ylab="Proportion of variance",xlab="Principal axes",
pch=16,ylim=c(0,0.25))

fig.cap <- paste("Proportion of variance explained by each principal",
 "axis obtained by a Principal Component Analysis (PCA) of the expression matrix.")

@

 

ADD COMMENT
0
Entering edit mode

And as an aside, you should reformulate this part as well:

<<install_missing_packages, eval=FALSE>>=
packages<-c("entropy", "fastICA", "fields", "ggplot2", "igraph", "MASS", "proxy", 
                   "reshape2", "Rtsne", "scatterplot3d", "TSP", "abc", "abctools",
                   "statmod")

packages2install <- packages [!(packages %in% installed.packages()[, "Package"])]
if(length(packages2install)>0){
  for (i in 1:length(packages2install)){ 
    install.packages(packages2install[i], dependencies = TRUE)
  }  
}
@ %def

Then, install sincell package from Bioconductor:

<<install_sincell, eval=FALSE>>=
source("http://bioconductor.org/biocLite.R") 
biocLite("sincell")
@ %def

You should not need to manually install dependencies. The whole idea behind the BiocInstaller package (and biocLite()) is to allow people to do something like

biocLite("sincell")

And have it Just Work(TM). Having unnecessary workarounds in your vignette works directly against years of effort to get people to use biocLite() rather than doing random things like what you are suggesting. Please change your vignette to use biocLite() directly!

> biocLite("sincell")

package ‘colorspace’ successfully unpacked and MD5 sums checked
package ‘RColorBrewer’ successfully unpacked and MD5 sums checked
package ‘dichromat’ successfully unpacked and MD5 sums checked
package ‘munsell’ successfully unpacked and MD5 sums checked
package ‘labeling’ successfully unpacked and MD5 sums checked
package ‘digest’ successfully unpacked and MD5 sums checked
package ‘gtable’ successfully unpacked and MD5 sums checked
package ‘scales’ successfully unpacked and MD5 sums checked
package ‘proto’ successfully unpacked and MD5 sums checked
package ‘spam’ successfully unpacked and MD5 sums checked
package ‘maps’ successfully unpacked and MD5 sums checked
package ‘igraph’ successfully unpacked and MD5 sums checked
package ‘entropy’ successfully unpacked and MD5 sums checked
package ‘scatterplot3d’ successfully unpacked and MD5 sums checked
package ‘TSP’ successfully unpacked and MD5 sums checked
package ‘ggplot2’ successfully unpacked and MD5 sums checked
package ‘fields’ successfully unpacked and MD5 sums checked
package ‘proxy’ successfully unpacked and MD5 sums checked
package ‘Rtsne’ successfully unpacked and MD5 sums checked
package ‘fastICA’ successfully unpacked and MD5 sums checked
package ‘sincell’ successfully unpacked and MD5 sums checked

 

ADD REPLY
0
Entering edit mode
@miguel-julia-7842
Last seen 4.6 years ago
United Kingdom

Thanks! With your help now it compiles without any warnings.

ADD COMMENT

Login before adding your answer.

Traffic: 476 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6