setup microbiome error
0
0
Entering edit mode
mafusa20 • 0
@mafusa20-19278
Last seen 5.2 years ago
setup_microbioma <- function(){

  .packages = c("ape", 
                "gridExtra", 
                "picante", 
                "data.table", 
                "RColorBrewer", 
                "DT", 
                "reshape", 
                "reshape2", 
                "magrittr", 
                "markdown",
                "ggpubr", 
                "tibble", 
                "pheatmap", 
                "dplyr", 
                "viridis", 
                "devtools", 
                "rmdformats",
                "intergraph",
                "network",
                "igraph",
                "ggplot2", 
                "gridExtra", 
                "knitr", 
                "vegan", 
                "plyr", 
                "dplyr",
                "ggrepel", 
                "ggnetwork", 
                "ade4", 
                "rmarkdown",
                "formatR",
                "caTools",
                "GGally",
                "clusterSim",
                "cluster")

  .bioc_packages <- c("phyloseq",
                      "microbiome", 
                      "phangorn", 
                      "genefilter",
                      "dada2",
                      "ggtree")

  # Instalar paquetes del CRAN (si no est?n instalados)
  .inst <- .packages %in% installed.packages()
  if(length(.packages[!.inst]) > 0) install.packages(.packages[!.inst])

  .inst <- .bioc_packages %in% installed.packages()
  if(any(!.inst)) {
    source("http://bioconductor.org/biocLite.R")
    biocLite(.bioc_packages[!.inst], ask = F, suppressUpdates=T)
  }

  # Instalar paquetes de github (si no est?n instalados)
  if (!("microbiomeutilities"  %in% installed.packages())) {
    library(devtools)
    devtools::install_github("microsud/microbiomeutilities")
  }

  if(!("microbiomeViz"  %in% installed.packages())){
    devtools::install_github("lch14forever/microbiomeViz")

  }

  if (!("SpiecEasi"  %in% installed.packages())) {
    devtools::install_github("zdk123/SpiecEasi")
  }

  if (!("microbiomeSeq"  %in% installed.packages())){
    install_github("umerijaz/microbiomeSeq")
  }
  if (!("ggnet"  %in% installed.packages())) {
    devtools::install_github("briatte/ggnet")
  }

  message("Ahora prueben cargar los paquetes del script con library(nombre_del_paquete)")

}

setup_microbioma()

  library(devtools) # Load the devtools package
  install_github("microbiome/microbiome", force = TRUE) # Install the package

**> setup_microbioma()
Error in install.packages : Updating loaded packages**

 **Error in read.dcf(path) :                                                                                                        Show Traceback
  Found continuation line starting '    person("Sudarsha ...' at begin of record.                     Rerun with Debug******


**> install.packages(.packages[!.inst])
Error in install.packages : object '.inst' not found**
help software error • 2.0k views
ADD COMMENT
0
Entering edit mode

The error comes from microbiomeutilities to install microbiomeutilites type this:

library(remotes)
install_url(url="https://github.com/microsud/microbiomeutilities/archive/master.zip", INSTALL_opt= "--no-multiarch")

lastarria taller?? Greetings!!!

a fixed seetup_microbioma.R may be this:

setup_microbioma <- function(){

  .packages = c("ape", 
                "gridExtra", 
                "picante", 
                "data.table", 
                "RColorBrewer", 
                "DT", 
                "reshape", 
                "reshape2", 
                "magrittr", 
                "markdown",
                "ggpubr", 
                "tibble", 
                "pheatmap", 
                "dplyr", 
                "viridis", 
                "devtools", 
                "rmdformats",
                "intergraph",
                "network",
                "igraph",
                "ggplot2", 
                "gridExtra", 
                "knitr", 
                "vegan", 
                "plyr", 
                "dplyr",
                "ggrepel", 
                "ggnetwork", 
                "ade4", 
                "rmarkdown",
                "formatR",
                "caTools",
                "GGally",
                "clusterSim",
                "cluster",
                "tidyverse")

  .bioc_packages <- c("phyloseq",
                      "microbiome",
                      "DECIPHER",
                      "phangorn", 
                      "genefilter",
                      "dada2",
                      "ggtree",
                      "microbiomeutilities")

  # Instalar paquetes del CRAN (si no están instalados)
  .inst <- .packages %in% installed.packages()
  if(length(.packages[!.inst]) > 0) install.packages(.packages[!.inst])

  .inst <- .bioc_packages %in% installed.packages()
  if(any(!.inst)) {
    source("http://bioconductor.org/biocLite.R")
    biocLite(.bioc_packages[!.inst], ask = F, suppressUpdates=T)
  }

  # Instalar paquetes de github (si no están instalados)
 # if (!("microbiomeutilities"  %in% installed.packages())) {
 #   library(devtools)
 #   devtools::install_github("microsud/microbiomeutilities")
 # }

  if(!("microbiomeViz"  %in% installed.packages())){
    devtools::install_github("lch14forever/microbiomeViz")

  }

  if (!("SpiecEasi"  %in% installed.packages())) {
    devtools::install_github("zdk123/SpiecEasi")
  }

  if (!("microbiomeSeq"  %in% installed.packages())){
    devtools::install_github("umerijaz/microbiomeSeq")
  }
  if (!("ggnet"  %in% installed.packages())) {
    devtools::install_github("briatte/ggnet")
  }

  message("Ahora prueben cargar los paquetes del script con library(nombre_del_paquete)")

}

setup_microbioma()

####para el microbiomeutilities
library(remotes)
install_url(url="https://github.com/microsud/microbiomeutilities/archive/master.zip", INSTALL_opt= "--no-multiarch")
ADD REPLY

Login before adding your answer.

Traffic: 765 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6