Question: setup microbiome error
0
gravatar for mafusa20
9 months ago by
mafusa200
mafusa200 wrote:
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**
software error help • 375 views
ADD COMMENTlink written 9 months ago by mafusa200

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 REPLYlink written 7 months ago by damedin0
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 346 users visited in the last hour