Search
Question: Problem with texi2dvi while compiling package on Windows
0
gravatar for Miguel Juliá
2.5 years ago by
United Kingdom
Miguel Juliá0 wrote:

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

ADD COMMENTlink modified 2.4 years ago • written 2.5 years ago by Miguel Juliá0
2
gravatar for James W. MacDonald
2.5 years ago by
United States
James W. MacDonald45k wrote:

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 COMMENTlink written 2.5 years ago by James W. MacDonald45k

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 REPLYlink modified 2.5 years ago • written 2.5 years ago by James W. MacDonald45k
0
gravatar for Miguel Juliá
2.4 years ago by
United Kingdom
Miguel Juliá0 wrote:

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

ADD COMMENTlink written 2.4 years ago by Miguel Juliá0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 298 users visited in the last hour