Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R installation hangs on rdh5f issue #259

Closed
jhdcate opened this issue Oct 31, 2021 · 20 comments
Closed

R installation hangs on rdh5f issue #259

jhdcate opened this issue Oct 31, 2021 · 20 comments

Comments

@jhdcate
Copy link

jhdcate commented Oct 31, 2021

Using R version 4.1.1, I get the following error trying to install:

Error: object ‘h5write.default’ is not exported by 'namespace:rhdf5'

This is after using:

BiocManager::install("rhdf5")

@jmadrover
Copy link

Same here:

  • installing source package 'sleuth' ...
    ** using staged installation
    ** R
    ** inst
    ** byte-compile and prepare package for lazy loading
    Error: object 'h5write.default' is not exported by 'namespace:rhdf5'

Session:

R version 4.1.2 (2021-11-01)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 22000)

Matrix products: default

locale:
[1] LC_COLLATE=Spanish_Spain.1252 LC_CTYPE=Spanish_Spain.1252 LC_MONETARY=Spanish_Spain.1252
[4] LC_NUMERIC=C LC_TIME=Spanish_Spain.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] rhdf5_2.38.0

loaded via a namespace (and not attached):
[1] Rcpp_1.0.7 compiler_4.1.2 BiocManager_1.30.16 rhdf5filters_1.6.0 prettyunits_1.1.1 remotes_2.4.1
[7] tools_4.1.2 testthat_3.1.0 pkgbuild_1.2.0 pkgload_1.2.3 jsonlite_1.7.2 memoise_2.0.0
[13] lifecycle_1.0.1 lattice_0.20-45 png_0.1-7 rlang_0.4.12 Matrix_1.3-4 cli_3.1.0
[19] rstudioapi_0.13 curl_4.3.2 xfun_0.27 fastmap_1.1.0 withr_2.4.2 desc_1.4.0
[25] fs_1.5.0 devtools_2.4.2 rprojroot_2.0.2 grid_4.1.2 reticulate_1.22 glue_1.4.2
[31] R6_2.5.1 processx_3.5.2 sessioninfo_1.2.1 Rhdf5lib_1.16.0 callr_3.7.0 purrr_0.3.4
[37] magrittr_2.0.1 ps_1.6.0 ellipsis_0.3.2 usethis_2.1.3 tinytex_0.34 cachem_1.0.6
[43] crayon_1.4.2

@Cindy0805
Copy link

I had the same problem, but it was solved by using lower version of R.

@passt
Copy link

passt commented Nov 11, 2021

same issue here (using R 4.1.2) - a quick fix with no warranty that all functionality is preserved:

(1) in Terminal:
git clone https://github.com/pachterlab/sleuth
(2) remove the last line in ./sleuth/NAMESPACE - ignore the waring in the first line
(3) in R:
devtools::install('./sleuth/')
library('sleuth')

@SKMunster
Copy link

I am running R 4.1.1 and tried the above solution. I was able to install sleuth this way

@AFrolicOfFerns
Copy link

same issue here (using R 4.1.2) - a quick fix with no warranty that all functionality is preserved:

(1) in Terminal: git clone https://github.com/pachterlab/sleuth (2) remove the last line in ./sleuth/NAMESPACE - ignore the waring in the first line (3) in R: devtools::install('./sleuth/') library('sleuth')

I had the exact same error message originally posted. After trying the above fix I too was able to install and load sleuth. Thanks @passt and @jhdcate ! I will be running through the tutorial this week and will post a new issue if things are running weird.

@pdtrang
Copy link

pdtrang commented Dec 8, 2021

I had the same error and was able to fix it by removing the last line in NAMESPACE. I wonder if you guys have any functionality working weird?

@mschilli87
Copy link
Contributor

@rekado: It appears to me that this broke r-sleuth in Guix.

@mschilli87
Copy link
Contributor

mschilli87 commented Dec 10, 2021

I did a bit of digging:

All this seems to go back to grimbough/rhdf5@7a96f27 which was merged as part of grimbough/rhdf5#87. Apparantly this was intentional and requires downstream changes (see grimbough/rhdf5#98 for details).

On the other hand a quick git grep h5write shows that while sleuth (still?) explicitly imports h5write.default, it actually relies on the S3 function (and explicitly refers to the rhdf5 namespace) for every call:

NAMESPACE:importFrom(rhdf5,h5write)
NAMESPACE:importFrom(rhdf5,h5write.default)
R/read_write.R:#' @importFrom rhdf5 h5write.default
R/read_write.R:#' @importFrom rhdf5 h5write
R/read_write.R:    rhdf5::h5write(length(kal$bootstrap), fname, "aux/num_bootstrap")
R/read_write.R:    rhdf5::h5write(0L, fname, "aux/num_bootstrap")
R/read_write.R:  rhdf5::h5write(kal$abundance$target_id, fname, "aux/ids")
R/read_write.R:  rhdf5::h5write(kal$abundance$eff_len, fname, "aux/eff_lengths")
R/read_write.R:  rhdf5::h5write(kal$abundance$len, fname, "aux/lengths")
R/read_write.R:  rhdf5::h5write(kal$fld, fname, "aux/fld")
R/read_write.R:  rhdf5::h5write(kal$bias_normalized, fname, "aux/bias_normalized")
R/read_write.R:  rhdf5::h5write(kal$bias_observed, fname, "aux/bias_observed")
R/read_write.R:  rhdf5::h5write(attributes(kal)$num_processed, fname, "aux/num_processed")
R/read_write.R:  rhdf5::h5write(attributes(kal)$index_version, fname, "aux/index_version")
R/read_write.R:  rhdf5::h5write(attributes(kal)$kallisto_version, fname, "aux/kallisto_version")
R/read_write.R:  rhdf5::h5write(attributes(kal)$start_time, fname, "aux/start_time")
R/read_write.R:  rhdf5::h5write(kal$abundance$est_counts, fname, "est_counts")
R/read_write.R:      rhdf5::h5write(bs, fname, bs_name)

I also checked the devel branch to make sure this did bot change since master.
So AFAICT, the workaround suggested by @passt is the actual fix to make sleuth compatible with recent rhdf5.
Even removing the NAMESPACE:importFrom(rhdf5,h5write) line as well should not have any effect (not tested).

@warrenmcg, @pimentel: I'd prepare a PR For your convenience I prepared PR #260 but given the long silence on this issue tracker I am not sure if that would have any what is the chance of it actually getting merged. 😉

@rekado: Would patching NAMESPACE in the Guix package definition of r-sleuth be an option or would you prefer adding an alternative for r-rhdf5 to pin it to an older version for sleuth? As it stands now, I cannot update R (and thus neither install recently added R packages) in any profile that requires sleuth.

@PulverCyril
Copy link

Hi all, I suffered the same issue trying to install sleuth, any idea when this will officially be patched ? Thanks !

@mschilli87
Copy link
Contributor

@bopekno: AFAICT the maintainers of sleuth are either busy right now or have given up on the tool completely. That is also why I am hesitant to help adressing some of the open issues by PRs since I don't know if they'll ever get merged. 😞

@outpaddling
Copy link

same issue here (using R 4.1.2) - a quick fix with no warranty that all functionality is preserved:

(1) in Terminal: git clone https://github.com/pachterlab/sleuth (2) remove the last line in ./sleuth/NAMESPACE - ignore the waring in the first line (3) in R: devtools::install('./sleuth/') library('sleuth')

Worked for me with R 4.1.2 on FreeBSD 13.0 (clang 11). Thanks!

@mschilli87
Copy link
Contributor

mschilli87 commented Dec 25, 2021

@outpaddling: Note that installing sleuth via remotes::install_github("pachterlab/sleuth#260") should give you the identical result without the need for any further manual interference.

@fabifuu
Copy link

fabifuu commented Dec 26, 2021

I have the same problem.

Error: object ‘h5write.default’ is not exported by 'namespace:rhdf5'
Execution halted

@mschilli87
Copy link
Contributor

@fabifuu: Have you tried the workaround suggested above?

@outpaddling
Copy link

@outpaddling: Note that installing sleuth via remotes::install_github("pachterlab/sleuth#260") should give you the identical result without the need for any further manual interference.

Thanks for the tip. Honestly, though, I'll leery about relying on software that hasn't been maintained for 2 years and for which published install instructions don't work. If support resumes at some point, I'll reexamine Sleuth, but for now I'm going to use DESeq2 for my DE needs.

@fabifuu
Copy link

fabifuu commented Dec 26, 2021

@fabifuu: Have you tried the workaround suggested above?

Oh God, it works smoothly. Thanks for the help!

Edit: I'm use R 4.1.2 in Ubuntu 20.04

@passt
Copy link

passt commented Dec 26, 2021

@mschilli87 Thanks for providing a more robust fix!
@outpaddling Fully agree. It‘s a pity that sleuth is so poorly maintained. I wouldn‘t use sleuth if I hadn’t had some legacy analysis pipeline to run. DESeq2 is what I would recommend to all starting anew.

@mschilli87
Copy link
Contributor

@passt: Thanks for sharing the original fix to begin with. 😉
Let's hope somebody will pick up sleuth in 2022. I won't have the bandwidth to maintain a fork myself, so I don't really feel like I can criticise anyone else for not getting to it either. I think sleuth has some neat features on top of what DESeq2 offers and I'd like to see it live.

@DreamAtDawn
Copy link

@outpaddling: Note that installing sleuth via remotes::install_github("pachterlab/sleuth#260") should give you the identical result without the need for any further manual interference.

It works! Dude u are just my Superhero : )
Btw Im using R 4.1.0 in macOS Big Sur 11.6

@Yenaled
Copy link
Collaborator

Yenaled commented Mar 30, 2022

Hi all, thanks for the discussion -- I've primarily been busy with kallisto and other projects but I'll try to get to working on sleuth sometime later this year (including fixing these issues and adding new features). I apologize for the delay.

Thanks for the pull request @mschilli87 -- from now on, please tag me in any issues related to sleuth (I promise sleuth is on my radar and we have no plans to retire this package anytime soon :) ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests