CRI-iAtlas / iatlas-notebooks

Collection of R notebooks to enable local iAtlas plotting and functionality.
2 stars 0 forks source link

Possible iatlas.api.client library loading error in ici_models_logistic_regression.ipynb #3

Closed vthorsson closed 1 year ago

vthorsson commented 2 years ago

iatlas.api.client included in CRAN library loading but not found there . Error message

Loading required package: iatlas.api.client

Warning message in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
“there is no package called ‘iatlas.api.client’”
Warning message:
“package ‘iatlas.api.client’ is not available for this version of R

Replacing current block

# We have a few libraries to install.
try({
    packages = c("magrittr", "wrapr", "dplyr", "tidyr", "plotly", "caret", "glmnet", "survminer", 
                 "dplyr", "arrow", "tidyr", "ggplot2", "pROC", "pheatmap", "knitr", "ggfortify", "iatlas.api.client")

    sapply(packages, function(x) {
      if (!require(x,character.only = TRUE))
        install.packages(x)
        suppressPackageStartupMessages(library(x,character.only = TRUE))
    })

    # and our iatlas package from github
    if (!require(iatlas.modules)) {
      devtools::install_github("CRI-iAtlas/iatlas.modules")
      suppressPackageStartupMessages(library(iatlas.modules))
    }},
    silent=TRUE 
)

with

# We have a few libraries to install.
try({
    # CRAN packages
    packages = c("magrittr", "wrapr", "dplyr", "tidyr", "plotly", "caret", "glmnet", "survminer", 
                 "dplyr", "arrow", "tidyr", "ggplot2", "pROC", "pheatmap", "knitr", "ggfortify")

    sapply(packages, function(x) {
      if (!require(x,character.only = TRUE))
        install.packages(x)
        suppressPackageStartupMessages(library(x,character.only = TRUE))
    })

    # and our iatlas.modules package from github
    if (!require(iatlas.modules)) {
      devtools::install_github("CRI-iAtlas/iatlas.modules")
      suppressPackageStartupMessages(library(iatlas.modules))
    }

    # and our iatlas.api.client package from github
    if (!require(iatlas.api.client)) {
      devtools::install_github("CRI-iAtlas/iatlas.api.client")
      suppressPackageStartupMessages(library(iatlas.modules))
    }},
    silent=TRUE 
)

The same seems to be true of other icimodels*.ipynb

vthorsson commented 2 years ago

@Gibbsdavidl would you have time to take a quick look to see if I am missing anything in this diagnosis. Would like to generate a PR if it makes sense.

vthorsson commented 2 years ago

Opened PR https://github.com/CRI-iAtlas/iatlas-notebooks/pull/5

heimannch commented 1 year ago

Hi @vthorsson, I just saw this issue. This error happened because iatlas.api.client is not being sued anymore, Andrew had to create a new package iAtlasGraphQLClient. I already updated the affected notebooks, let me know if you run into any issues with them.

vthorsson commented 1 year ago

Thanks @heimannch, for the note on this and the fix .