I am trying to plot a gene of interest using cummeRbund package. Using this script:
biomTrack<-BiomartGeneRegionTrack(genome=genome, chromosome=as.character(myChr), start=myStart, end=myEnd, name="ENSEMBL", showId=T)
I encountered this error:
Error in .getBiomart(genome) :
Gviz thinks that the UCSC genome identifier 'hg38' should map to the current Biomart head as 'GRCh38', but its current version is 'GRCh38.p5'.
Please manually provide biomaRt object.
using useMart("ensembl",dataset="hsapiens_gene_ensembl") also couldn't help. Would you please tell me how can I fix this?
Here is the sessionInfo()
> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] grid stats4 parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] biomaRt_2.28.0 cummeRbund_2.14.0 Gviz_1.16.1 rtracklayer_1.32.1 GenomicRanges_1.24.2
[6] GenomeInfoDb_1.8.1 IRanges_2.6.0 S4Vectors_0.10.1 fastcluster_1.1.20 reshape2_1.4.1
[11] ggplot2_2.1.0 RSQLite_1.0.0 DBI_0.4-1 BiocGenerics_0.18.0
loaded via a namespace (and not attached):
[1] SummarizedExperiment_1.2.3 VariantAnnotation_1.18.1 splines_3.3.0
[4] lattice_0.20-33 colorspace_1.2-6 htmltools_0.3.5
[7] GenomicFeatures_1.24.2 chron_2.3-47 interactiveDisplayBase_1.10.3
[10] XML_3.98-1.4 survival_2.39-4 foreign_0.8-66
[13] ensembldb_1.4.2 BiocParallel_1.6.2 RColorBrewer_1.1-2
[16] matrixStats_0.50.2 plyr_1.8.4 stringr_1.0.0
[19] zlibbioc_1.18.0 Biostrings_2.40.2 munsell_0.4.3
[22] gtable_0.2.0 latticeExtra_0.6-28 Biobase_2.32.0
[25] BiocInstaller_1.22.2 httpuv_1.3.3 AnnotationDbi_1.34.3
[28] Rcpp_0.12.5 xtable_1.8-2 acepack_1.3-3.3
[31] BSgenome_1.40.1 scales_0.4.0 Hmisc_3.17-4
[34] XVector_0.12.0 mime_0.4 Rsamtools_1.24.0
[37] gridExtra_2.2.1 AnnotationHub_2.4.2 digest_0.6.9
[40] stringi_1.1.1 biovizBase_1.20.0 shiny_0.13.2
[43] tools_3.3.0 bitops_1.0-6 magrittr_1.5
[46] RCurl_1.95-4.8 dichromat_2.0-0 Formula_1.2-1
[49] cluster_2.0.4 Matrix_1.2-6 data.table_1.9.6
[52] httr_1.2.0 R6_2.1.2 rpart_4.1-10
[55] GenomicAlignments_1.8.3 nnet_7.3-12
Related
I'm using the following code to generate website for the R package:
pkgdown::build_site(
pkg = "."
, examples = TRUE
, document = TRUE
, run_dont_run = FALSE
, seed = 12345
, lazy = FALSE
, override = list()
, preview = NA
, new_process = TRUE
)
However, my R package contains a static (prebuilt) PDF vignette (Using a static (prebuilt) PDF vignette in R package) and I want to include this static (prebuilt) PDF vignette.
sessionInfo
sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/atlas/libblas.so.3.10.3
LAPACK: /usr/lib/x86_64-linux-gnu/atlas/liblapack.so.3.10.3
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] pkgdown_1.3.0 PakPMICS2018hh_0.1.0 usethis_1.5.0
[4] devtools_2.0.2.9000
loaded via a namespace (and not attached):
[1] clisymbols_1.2.0 xfun_0.7 remotes_2.0.4 purrr_0.3.2
[5] rematch2_2.0.1 rcmdcheck_1.3.3 testthat_2.1.1 htmltools_0.3.6
[9] rlang_0.3.4.9003 pkgbuild_1.0.3 R.oo_1.22.0 pillar_1.4.1
[13] glue_1.3.1 withr_2.1.2 R.utils_2.8.0 xopen_1.0.0
[17] sessioninfo_1.1.1 R.cache_0.13.0 stringr_1.4.0 commonmark_1.7
[21] R.methodsS3_1.7.1 memoise_1.1.0 evaluate_0.14 knitr_1.23.2
[25] callr_3.2.0 ps_1.3.0 curl_3.3 Rcpp_1.0.1
[29] backports_1.1.4 desc_1.2.0 rversions_2.0.0 pkgload_1.0.2
[33] fs_1.3.1 R.rsp_0.43.1 digest_0.6.19 stringi_1.4.3
[37] processx_3.3.1 rprojroot_1.3-2 cli_1.1.0 tools_3.6.0
[41] magrittr_1.5 tibble_2.1.2 crayon_1.3.4 whisker_0.3-2
[45] pkgconfig_2.0.2 MASS_7.3-51.4 xml2_1.2.0.9000 prettyunits_1.0.2
[49] assertthat_0.2.1 rmarkdown_1.13 roxygen2_6.1.1 httr_1.4.0
[53] rstudioapi_0.10 R6_2.4.0 compiler_3.6.0 git2r_0.25.2
I am trying to use foreach and doParallel to optimize the computation of some image processing. I have ParamIter which is the parameter to iterate over. ImageProcessing is my custom function to process the images and save the data that has been processed.
library(methods)
library(fftwtools)
library(EBImage)
library(tidyverse)
library(foreach)
library(doParallel)
registerDoParallel(20)
foreach(ParamIter = unique(AllImages$ParamIter)) %dopar% {
AllImagesTemp = AllImages[AllImages$ParamIter == ParamIter,]
ImageProcessing(Image = AllImagesTemp,
Plate = unique(AllImagesTemp$Plate),
TimePoint = unique(AllImagesTemp$TimePoint),
Marker = unique(AllImagesTemp$Marker),
Replicate = unique(AllImagesTemp$Replicate),
Well = unique(AllImagesTemp$ID),
Position = unique(AllImagesTemp$Position),
SaveDir = WellDir,
SaveParam = ParamIter,
ThrEmptyImage = .04)
}
Everything works perfectly locally on a machine with Ubuntu 18.04 and a session as per below:
> sessionInfo()
R version 3.5.3 (2019-03-11)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.2 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=de_DE.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=de_DE.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=de_DE.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=de_DE.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] bindrcpp_0.2.2 fftwtools_0.9-8 doParallel_1.0.14 iterators_1.0.10 foreach_1.4.4 forcats_0.3.0 stringr_1.4.0 dplyr_0.7.7
[9] purrr_0.3.1 readr_1.1.1 tidyr_0.8.2 tibble_2.0.1 ggplot2_3.1.0 tidyverse_1.2.1 EBImage_4.24.0
loaded via a namespace (and not attached):
[1] tidyselect_0.2.5 locfit_1.5-9.1 haven_1.1.2 lattice_0.20-38 colorspace_1.4-0 htmltools_0.3.6 yaml_2.2.0
[8] rlang_0.3.1 pillar_1.3.1 withr_2.1.2 glue_1.3.0 BiocGenerics_0.28.0 modelr_0.1.2 readxl_1.1.0
[15] jpeg_0.1-8 bindr_0.1.1 plyr_1.8.4 munsell_0.5.0 gtable_0.2.0 cellranger_1.1.0 rvest_0.3.2
[22] htmlwidgets_1.3 codetools_0.2-16 broom_0.5.0 Rcpp_1.0.0 backports_1.1.3 scales_1.0.0 jsonlite_1.6
[29] abind_1.4-5 hms_0.4.2 png_0.1-7 digest_0.6.18 stringi_1.3.1 tiff_0.1-5 grid_3.5.3
[36] cli_1.0.1 tools_3.5.3 bitops_1.0-6 magrittr_1.5 RCurl_1.95-4.11 lazyeval_0.2.1 crayon_1.3.4
[43] pkgconfig_2.0.2 xml2_1.2.0 lubridate_1.7.4 assertthat_0.2.0 httr_1.4.0 rstudioapi_0.9.0 R6_2.3.0
[50] nlme_3.1-137 compiler_3.5.3
However if I am trying to do this on my local cluster it doesn't work and provides me with this error:
Error in { :
task 1 failed - "a call to callNextMethod() appears in a call to ‘.Method’, but the call does not seem to come from either a generic function or another 'callNextMethod'"
Calls: %dopar% -> <Anonymous>
Execution halted
My session on the centos cluster looks like:
R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
Matrix products: default
BLAS: /cm/shared/apps/R/64/3.4.1/lib64/R/lib/libRblas.so
LAPACK: /cm/shared/apps/R/64/3.4.1/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods
[8] base
other attached packages:
[1] doParallel_1.0.14 iterators_1.0.10 foreach_1.4.4 forcats_0.3.0
[5] stringr_1.3.1 dplyr_0.7.8 purrr_0.3.0 readr_1.3.1
[9] tidyr_0.8.2 tibble_2.0.1 ggplot2_3.1.0 tidyverse_1.2.1
[13] EBImage_4.20.1 fftwtools_0.9-8
loaded via a namespace (and not attached):
[1] tidyselect_0.2.5 locfit_1.5-9.1 haven_2.0.0
[4] lattice_0.20-35 colorspace_1.4-0 generics_0.0.2
[7] htmltools_0.3.6 rlang_0.3.1 pillar_1.3.1
[10] withr_2.1.2 glue_1.3.0 BiocGenerics_0.24.0
[13] modelr_0.1.2 readxl_1.2.0 bindrcpp_0.2.2
[16] jpeg_0.1-8 bindr_0.1.1 plyr_1.8.4
[19] munsell_0.5.0 gtable_0.2.0 cellranger_1.1.0
[22] rvest_0.3.2 htmlwidgets_1.3 codetools_0.2-15
[25] broom_0.5.1 Rcpp_1.0.0 scales_1.0.0
[28] backports_1.1.3 jsonlite_1.6 abind_1.4-5
[31] hms_0.4.2 png_0.1-7 digest_0.6.18
[34] stringi_1.2.4 tiff_0.1-5 grid_3.4.1
[37] cli_1.0.1 bitops_1.0-6 tools_3.4.1
[40] magrittr_1.5 RCurl_1.95-4.10 lazyeval_0.2.1
[43] crayon_1.3.4 pkgconfig_2.0.2 xml2_1.2.0
[46] lubridate_1.7.4 assertthat_0.2.0 httr_1.4.0
[49] rstudioapi_0.9.0 R6_2.3.0 nlme_3.1-131
[52] compiler_3.4.1
I do not understand the error and what it is pointing me towards. Does someone have an idea of how I could solve this problem?
Upgrading to a newer version of R is not a possibility on my local cluster.
Cheers,
Mathieu
My Rmarkdown source looks like (screenshot from RStudio):
(notice the empty lines)
When I press CTRL+Shift+k I got view as expected (with empty lines). However, if I run the chunk (evaluate) and then compile (CTRL+Shift+k), I get:
(no empty lines)
Is there any way how to preserve the empty lines in the source code? (I checked knitr options: strip.white=FALSE, tidy=TRUE, tidy.opts=list(blank=TRUE) but no joy.)
I'm using RStudio 1.0.153
Other info:
sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 9 (stretch)
Matrix products: default
BLAS: /usr/lib/openblas-base/libblas.so.3
LAPACK: /usr/lib/libopenblasp-r0.2.19.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rvest_0.3.2 xml2_1.1.1 dplyr_0.7.1 purrr_0.2.2.2
[5] readr_1.1.1 tidyr_0.6.3 tibble_1.3.3 ggplot2_2.2.1
[9] tidyverse_1.1.1
loaded via a namespace (and not attached):
[1] pbdZMQ_0.2-6 reshape2_1.4.2 haven_1.1.0 lattice_0.20-35
[5] colorspace_1.3-2 htmltools_0.3.6 yaml_2.1.14 base64enc_0.1-3
[9] XML_3.98-1.9 rlang_0.1.1 foreign_0.8-69 glue_1.1.1
[13] selectr_0.3-1 readxl_1.0.0 modelr_0.1.0 semver_0.2.0
[17] bindrcpp_0.2 bindr_0.1 plyr_1.8.4 stringr_1.2.0
[21] cellranger_1.1.0 munsell_0.4.3 binman_0.1.0 gtable_0.2.0
[25] caTools_1.17.1 psych_1.7.5 evaluate_0.10.1 knitr_1.16
[29] forcats_0.2.0 wdman_0.2.2 curl_2.7 parallel_3.4.1
[33] broom_0.4.2 Rcpp_0.12.11 openssl_0.9.6 backports_1.1.0
[37] scales_0.4.1 formatR_1.5 RSelenium_1.7.1 jsonlite_1.5
[41] mnormt_1.5-5 hms_0.3 digest_0.6.12 stringi_1.1.5
[45] grid_3.4.1 rprojroot_1.2 tools_3.4.1 bitops_1.0-6
[49] magrittr_1.5 lazyeval_0.2.0 pkgconfig_2.0.1 lubridate_1.6.0
[53] httr_1.2.1 assertthat_0.2.0 rmarkdown_1.6 R6_2.2.2
[57] nlme_3.1-131 compiler_3.4.1
As far as I can see, you can't do that with an HTML notebook. If you don't need all the special notebook features, you can ask for an html_document instead of an html_notebook and formatting will be preserved. If you do need the notebook features, you probably need to make a feature request on the rmarkdown development page https://github.com/rstudio/rmarkdown to add this.
im tryring to run dcc.est from the ccgarch-package.
Even though I installed the package and attached it with library(ccgarch), I get the following error:
library(ccgarch)
dcc <- dcc.est(dvar, param)
Error: could not find function "dcc.est"
I also tried the following:
dcc <- ccgarch::dcc.est(dvar, param)
Error: object 'dcc.est' is not exported by 'namespace:ccgarch'
Accordingly to the vignette of ccgarch version 0.2.3 (https://cran.r-project.org/web/packages/ccgarch/ccgarch.pdf) , dcc.est is part of the package. What am I doing wrong?
See my sessionInfobelow:
> sessionInfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C LC_TIME=German_Germany.1252
attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base
other attached packages:
[1] pracma_1.9.5 kerdiest_1.2 evir_1.7-3 chron_2.3-48 date_1.2-35
[6] fGarch_3010.82.1 fBasics_3011.87 timeSeries_3022.101.2 timeDate_3012.100 rugarch_1.3-6
[11] tsDyn_0.9-44 ccgarch_0.2.3 gdata_2.17.0 gtools_3.5.0 tidyr_0.6.0
[16] dplyr_0.5.0
loaded via a namespace (and not attached):
[1] rgl_0.96.0 Rcpp_0.12.8 mvtnorm_1.0-5 lattice_0.20-34
[5] zoo_1.7-14 assertthat_0.1 digest_0.6.10 lmtest_0.9-34
[9] foreach_1.4.3 mime_0.5 truncnorm_1.0-7 R6_2.2.0
[13] plyr_1.8.4 tseriesChaos_0.1-13 ggplot2_2.2.0 lazyeval_0.2.0
[17] misc3d_0.8-4 fracdiff_1.4-2 nloptr_1.0.4 SkewHyperbolic_0.3-2
[21] Matrix_1.2-7.1 htmlwidgets_0.8 munsell_0.4.3 shiny_0.14.2
[25] numDeriv_2016.8-1 httpuv_1.3.3 DistributionUtils_0.5-1 mnormt_1.5-5
[29] forecast_7.3 urca_1.3-0 mgcv_1.8-15 htmltools_0.3.5
[33] vars_1.5-2 nnet_7.3-12 Rsolnp_1.16 multicool_0.1-10
[37] expm_0.999-0 tibble_1.2 quadprog_1.5-5 codetools_0.2-15
[41] MASS_7.3-45 GeneralizedHyperbolic_0.8-1 grid_3.3.2 nlme_3.1-128
[45] jsonlite_1.1 xtable_1.8-2 gtable_0.2.0 DBI_0.5-1
[49] magrittr_1.5 scales_0.4.1 KernSmooth_2.23-15 tseries_0.10-36
[53] xts_0.9-7 sandwich_2.3-4 spd_2.0-1 iterators_1.0.8
[57] tools_3.3.2 ks_1.10.4 colorspace_1.3-2 knitr_1.15.1
If you look at the NAMESPACE you see that dcc.est is commented out (it may have be replaced by dcc.estimation - just a guess, I've never used the package?).
This means it is not exported by the package, but it's still there, only as an internal function. You can access internal functions by using 3 colons
ccgarch:::dcc.est
As it's in the documentation I think somewhere along the line of updates and releases someone forgot to remove it properly, or un-comment it again in the export list.
This question already has answers here:
In R and knitr, can I suppress the message of readOGR?
(3 answers)
Closed 7 years ago.
I wonder how to suppress readOGR error messages in knitr. My MWE is below:
\documentclass{article}
\begin{document}
<< Test >>=
library(rgdal)
dsn <- system.file("vectors", package = "rgdal")[1]
setwd(dsn)
cities <- readOGR(dsn=dsn, layer="cities")
#
\end{document}
The function readOGR gives the message like this:
OGR data source with driver: ESRI Shapefile
Source: "/home/asd/R/i686-pc-linux-gnu-library/3.2/rgdal/vectors", layer: "cities"
with 606 features
It has 4 fields
But I want to suppress this message. I tried message=FALSE, but it did not work for me.
Edited
sessionInfo()
R version 3.2.1 (2015-06-18)
Platform: i686-pc-linux-gnu (32-bit)
Running under: Ubuntu 14.04.2 LTS
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] grid tools stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggmap_2.4 mapproj_1.2-2 maps_2.3-9 leaflet_1.0.0 rgeos_0.3-11 rgdal_1.0-4
[7] maptools_0.8-36 sp_1.1-1 Hmisc_3.16-0 Formula_1.2-1 survival_2.38-2 lattice_0.20-31
[13] psych_1.5.4 ggbiplot_0.55 plyr_1.8.3 gplots_2.17.0 rsm_2.7-2 scales_0.2.5
[19] ggplot2_1.0.1 xtable_1.7-4 highr_0.5 knitr_1.10.12 brew_1.0-6 stringr_1.0.0
loaded via a namespace (and not attached):
[1] RColorBrewer_1.1-2 jsonlite_0.9.16 reshape2_1.4.1 cluster_2.0.2 rstudioapi_0.3.1
[6] magrittr_1.5 acepack_1.3-3.3 gtable_0.1.2 htmltools_0.2.6 splines_3.2.1
[11] dplyr_0.4.2 KernSmooth_2.23-14 htmlwidgets_0.5 gridExtra_0.9.1 R6_2.0.1
[16] digest_0.6.8 colorspace_1.2-6 proto_0.3-10 stringi_0.5-2 yaml_2.1.13
[21] lazyeval_0.1.10.9000 evaluate_0.7 labeling_0.3 RJSONIO_1.3-0 gdata_2.16.1
[26] rpart_4.1-9 munsell_0.4.2 DBI_0.3.1 Rcpp_0.11.6 RgoogleMaps_1.2.0.7
[31] png_0.1-7 MASS_7.3-41 parallel_3.2.1 assertthat_0.1 rjson_0.2.15
[36] caTools_1.17.1 gtools_3.5.0 jpeg_0.1-8 latticeExtra_0.6-26 foreign_0.8-63
[41] bitops_1.0-6 nnet_7.3-9 geosphere_1.3-13 formatR_1.2 mnormt_1.5-3
Just add verbose=FALSE to the readOGR call to suppress the messages (which are helpful during an interactive session but are cruft when in scripts or notebooks).
Try this:
<<Test, message=FALSE, results='hide', echo=FALSE>>=