ukaraoz / microtrait

Other
22 stars 4 forks source link

prep.hmmmodels() installation step error #7

Closed wanxn518 closed 1 year ago

wanxn518 commented 1 year ago

Hello great developer, this software is very interesting for our research, but I have a little problem, can you give me some advice, thank you very much! I followed the tutorial instructions step by step, but in the last part there was this problem:

> list_of_packages = c("R.utils", "RColorBrewer", "ape", "assertthat", "checkmate",
 "coRdon", "corrplot", "doParallel", "dplyr", "futile.logger", "grid", "gtools", "kmed", "lazyeval", "magrittr", "parallel", "pheatmap", "readr", "stringr", "tibble",
  "tictoc", "tidyr")
> newpackages <- list_of_packages[!(list_of_packages %in% installed.packages()[,"Package"])]
> if(length(new.packages)) install.packages(newpackages)
> if (!requireNamespace("BiocManager", quietly = TRUE))
        install.packages("BiocManager")
> library("Biostrings")
> library("coRdon")
> library("ComplexHeatmap")
> library("gRodon")
> library("microtrait")
> library(microtrait)
> microtrait::prep.hmmmodels()
INFO [2023-04-14 23:01:30] Downloading dbcan hmm database
trying URL 'http://bcb.unl.edu/dbCAN2/download/Databases/dbCAN-HMMdb-V8.txt'
Content type 'text/plain' length 94320446 bytes (90.0 MB)

downloaded 663 KB

Error in download.file(dbcan_hmmdb_url, downloaded_file) :
  download from 'http://bcb.unl.edu/dbCAN2/download/Databases/dbCAN-HMMdb-V8.txt' failed
In addition: Warning messages:
1: In download.file(dbcan_hmmdb_url, downloaded_file) :
  downloaded length 679892 != reported length 94320446
2: In download.file(dbcan_hmmdb_url, downloaded_file) :
  URL 'https://bcb.unl.edu/dbCAN2/download/Databases/dbCAN-HMMdb-V8.txt': Timeout of 60 seconds was reached

This error occurs in step 5,prep.hmmmodels(),Do you have any good suggestions?

Best wishes!

mherold1 commented 3 days ago

@wanxn518 how did you solve this issue?

edit: utils::download.file() defaults to 60 second timeout, so that option needs to be changed: https://stackoverflow.com/questions/35282928/how-do-i-set-a-timeout-for-utilsdownload-file-in-r