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

repos argument not kept #51

Closed
LiNk-NY opened this issue Jan 9, 2023 · 7 comments · Fixed by #52
Closed

repos argument not kept #51

LiNk-NY opened this issue Jan 9, 2023 · 7 comments · Fixed by #52
Labels
bug Something isn't working

Comments

@LiNk-NY
Copy link

LiNk-NY commented Jan 9, 2023

I am using BiocManager for managing the installation of packages.
I would like to make use of both bspm for CRAN packages and BiocManager for Bioconductor packages.

It seems that bspm::enable() shim does not keep the input's repos argument, seen at
https://github.com/Enchufa2/bspm/blob/5d9f5f1b786807efa7c249dd81ddedd18579b33d/R/integration.R#L53
leading to the error below.

> BiocManager::repositories()
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: https://packagemanager.rstudio.com/cran/__linux__/jammy/latest

                                                        BioCsoft 
                   "https://bioconductor.org/packages/3.16/bioc" 
                                                         BioCann 
        "https://bioconductor.org/packages/3.16/data/annotation" 
                                                         BioCexp 
        "https://bioconductor.org/packages/3.16/data/experiment" 
                                                   BioCworkflows 
              "https://bioconductor.org/packages/3.16/workflows" 
                                                       BioCbooks 
                  "https://bioconductor.org/packages/3.16/books" 
                                                            CRAN 
"https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" 
> install.packages("BSgenome", repos = BiocManager::repositories())
[truncated]
Available system packages...

Error in dbs[bins, "Version"] : subscript out of bounds
@Enchufa2 Enchufa2 added the bug Something isn't working label Jan 9, 2023
@Enchufa2
Copy link
Member

Enchufa2 commented Jan 9, 2023

Thanks for the report. Could you please try the fix in the fix/51 branch?

@Enchufa2
Copy link
Member

Enchufa2 commented Jan 9, 2023

This is with @eddelbuettel's r2u docker image:

> install.packages("BSgenome", repos = BiocManager::repositories())
'getOption("repos")' replaces Bioconductor standard repositories, see
'?repositories' for details

replacement repositories:
    CRAN: https://cloud.r-project.org

Available system packages as root...

  There are binary versions available but the source versions are later:
                 binary source
BSgenome         1.66.1 1.66.2
GenomeInfoDb     1.34.4 1.34.6
GenomicRanges    1.50.1 1.50.2
GenomeInfoDbData  1.2.8  1.2.9
BiocParallel     1.32.4 1.32.5

Do you want to install later versions from sources? (Yes/no/cancel)

@Enchufa2
Copy link
Member

Enchufa2 commented Jan 9, 2023

If no further issues, I'll merge #52 and roll a patch release to CRAN.

@LiNk-NY
Copy link
Author

LiNk-NY commented Jan 9, 2023

Thanks for the quick fix @Enchufa2
It looks good!

I'm not sure why I get a different version of BSgenome under the binary column. Is this due to the version of R that I am using (R 4.2.1)?

 There are binary versions available but the source versions are later:
                        binary    source
BSgenome                1.62.0    1.66.2

With the container (using R 4.2.2) I can see the versions that you have above.

Note. For binary generation, it would be best to use the packages that are restricted and defined by BiocManager so to avoid 'old' binaries in the binary column shown here (which is incompatible with R 4.2.1; it's an R 4.1.0 package).

@Enchufa2
Copy link
Member

Enchufa2 commented Jan 9, 2023

What's your OS version and what repo are you using for the binaries? That's probably the difference.

@LiNk-NY
Copy link
Author

LiNk-NY commented Jan 9, 2023

I am using:

$ lsb_release -a
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.1 LTS
Release:	22.04
Codename:	jammy
> dbb <- bspm::available_sys()
> dbb[rownames(dbb) == "bsgenome", ]
   Package    Version Repository 
"bsgenome"   "1.62.0"   "Ubuntu" 
> packageVersion("bspm")
[1] '0.4.0.1'

I guess I'm using these repos in:

sources.list.d/

deb https://ppa.launchpadcontent.net/c2d4u.team/c2d4u4.0+/ubuntu/ jammy main

sources.list

deb https://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/

@Enchufa2
Copy link
Member

Enchufa2 commented Jan 9, 2023

The repo is the difference then. The docker image above uses r2u instead.

@LiNk-NY LiNk-NY closed this as completed Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants