msaPrettyPrint
I use msa package by Rstudio in widowns,but the msaPrettyPrint keep reporting errors. This is my code.
mySequenceFile <- system.file("examples", "exampleAA.fasta", package="msa")
mySequences <- readAAStringSet(mySequenceFile)
mySequences
myFirstAlignment <- msa(mySequences)
msaPrettyPrint(myFirstAlignment, output="pdf", showNames="none",
showLogo="none", askForOverwrite=FALSE, verbose=FALSE)
And it Error in file(con, "r") : Unable to open link
so I use output = "tex"
,It can work well.but when I open the tex ,found the
\begin{texshade}{C:/Users/ADMINI~1/AppData/Local/Temp/Rtmpo7310M/seq114c7f3453.fasta}
I can't open this fasta file.so I have to change it look this
\begin{texshade}{C:/Users/Administrator/AppData/Local/Temp/Rtmpo7310M/seq114c7f3453.fasta}
I guess it maybe by chinese. But when I change it,I use Rstduio compile pdf.It have an error. Is there any good solution? This is my sessionInfo
> sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
Matrix products: default
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.936
[2] LC_CTYPE=Chinese (Simplified)_China.936
[3] LC_MONETARY=Chinese (Simplified)_China.936
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.936
attached base packages:
[1] stats4 parallel stats graphics grDevices utils datasets
[8] methods base
other attached packages:
[1] dplyr_1.0.1 msa_1.20.0 Biostrings_2.56.0
[4] XVector_0.28.0 IRanges_2.22.2 S4Vectors_0.26.1
[7] BiocGenerics_0.34.0
loaded via a namespace (and not attached):
[1] Rcpp_1.0.4.6 rstudioapi_0.11 magrittr_1.5
[4] knitr_1.29 zlibbioc_1.34.0 tidyselect_1.1.0
[7] RcppTOML_0.1.6 R6_2.4.1 rlang_0.4.7
[10] tools_4.0.0 xfun_0.16 ellipsis_0.3.1
[13] htmltools_0.5.0 yaml_2.2.1 digest_0.6.25
[16] tibble_3.0.3 lifecycle_0.2.0 crayon_1.3.4
[19] bookdown_0.20 purrr_0.3.4 BiocManager_1.30.10.5
[22] vctrs_0.3.2 rsconnect_0.8.16 glue_1.4.1
[25] evaluate_0.14 rmarkdown_2.3 blogdown_0.20
[28] pillar_1.4.6 compiler_4.0.0 generics_0.0.2
[31] pkgconfig_2.0.3
I have the same problem, that is not suppresed with
verbose=TRUE
It seems to be when you have a long username in Windows then tempfile() makes a short version containing ~
TeXShade then has a issue that it converts the ~ to \nobreakspace {} before trying to load the FASTA file which fails.
I worked around this by getting
msaPrettyPrint()
to output a tex file, then substituting ~ in that file with \string~ which stops TeXShade converting ~ in the path e.g. withthen converting the corrected tex file to pdf