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

restfulr::download.file usage results in warning #71

Closed
mjsteinbaugh opened this issue Jun 8, 2022 · 7 comments
Closed

restfulr::download.file usage results in warning #71

mjsteinbaugh opened this issue Jun 8, 2022 · 7 comments

Comments

@mjsteinbaugh
Copy link

Hi @lawremi ,

I noticed with rtracklayer 1.56.0 on R 4.2 / Bioconductor 3.15 that loading rtracklayer now results in this warning:

replacing previous import 'utils::download.file' by 'restfulr::download.file'

Would it be possible to rename this conflict in restfulr?

Best,
Mike

@mjsteinbaugh
Copy link
Author

Issue #69 is also somewhat related

@lawremi
Copy link
Owner

lawremi commented Jun 15, 2022

The download.file() generic was removed from restfulr 5 years ago. I don't think that version made it onto CRAN. However, I must have fixed a CRAN issue using an older checkout, so now there's a really old but new version on CRAN. Oops. The annoying thing is that I failed to upload the fixes to GitHub, and that computer is on the other side of the world from me right now. I probably shouldn't even try developing software anymore.

@mjsteinbaugh
Copy link
Author

PS thanks again for rtracklayer, it's awesome

@almeidasilvaf
Copy link

Hi, @lawremi

I have the same problems reported in this issue and in #69 when trying to pass URLs to import(). I think the problem is indeed because you pushed a broken version of restfulr to CRAN. It was working fine for me yesterday in the morning, but then I had to upgrade GenomicRanges and all its dependencies were upgraded, including rtracklayer and restfulr. After the upgrade, import() does not work with URLs anymore.

I tried to install the previous version of restfulr from GitHub, but I could not find the repo. Is restfulr not in a GitHub repo?

For those who are reading this issue and, like me, need an urgent solution for this bug, here is a workaround:

# Example GFF3 file
url <- "ftp://ftp.psb.ugent.be/pub/plaza/plaza_pico_03/GFF/ppa/annotation.selected_transcript.exon_features.ppa.gff3.gz"

# Download GFF3 file to tempdir
dfile <- file.path(tempdir(), basename(x))
utils::download.file(x, dfile) # download GFF3 file to

# Read GFF3 file as GRanges object
ranges <- rtracklayer::import(dfile)

# Leave no traces
unlink(dfile)

@lawremi
Copy link
Owner

lawremi commented Jun 16, 2022

restfulr 0.15 is on its way to CRAN.

@lawremi
Copy link
Owner

lawremi commented Jun 22, 2022

I think this should be resolved now? Please reopen if not.

@lawremi lawremi closed this as completed Jun 22, 2022
@mjsteinbaugh
Copy link
Author

Looks to be fixed, thanks!

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

3 participants