metasnv-tool / metaSNV

MetaSNV, a metagenomic SNV calling pipeline.
http://metasnv.embl.de/
Other
20 stars 3 forks source link

error when launching metaSNV_subpopr.R #9

Open svandillen opened 2 years ago

svandillen commented 2 years ago

Hello,

I installed metaSNV with conda. I successfully ran metaSNV, metaSNV_Filtering and metaSNV_DistDiv but I got the an error after running the command: "metaSNV_subpopr.R -i metaSNV_output/"

message I have: [1] "Will use python executable: /home/sv/.conda/envs/metaSNV/bin/python3" [1] "Logging to: results/params.hr10.hs80.ps80.gs80//metaSNV_output//log.txt" [1] "Loading R libraries..." [1] "Loading subpopr source files from /home/sv/.conda/envs/metaSNV/share/metasnv-2.0.4/src/subpopr/" [1] "Using files from metaSNV_output//distances and metaSNV_output//filtered/pop/" Error in validObject(x) : invalid class “MulticoreParam” object: 'logdir' must exist with read / write permission Calls: MulticoreParam -> validObject Execution halted

What I have missed ?

Thanks,

nikolasbasler commented 2 years ago

I have the same issue. @svandillen could you figure it out somehow?

phspo commented 2 years ago

Had the same issue, you can just create the log folder yourself e.g. navigate into the results folder that is generated when the error is thrown and then

mkdir threadLogs
guoyuh commented 1 year ago

Had the same issue, you can just create the log folder yourself e.g. navigate into the results folder that is generated when the error is thrown and then

mkdir threadLogs

hi, thanks for metasnv ,I meet the same issue.

$ mkdir results/threadLogs $ metaSNV_subpopr.R --procs 3 -i output -g testdata/abunds/geneAbundances.tsv -a testdata/abunds/speciesAbundances.tsv [1] "Will use python executable: /mnt/home/huanggy/miniconda3/envs/metaSNV/bin/python3" [1] "Logging to: results/params.hr10.hs80.ps80.gs80//output//log.txt" [1] "Loading R libraries..." [1] "Loading subpopr source files from /mnt/home/huanggy/miniconda3/envs/metaSNV/share/metasnv-2.0.4/src/subpopr/" [1] "Using files from output/distances and output/filtered/pop/" Error in validObject(x) : 类别为“MulticoreParam”的对象不对: 'logdir' must exist with read / write permission Calls: MulticoreParam -> validObject 停止执行

ZhuJiaying1998 commented 1 year ago

I have solved this problem. Find the location of the script "metaSNV_subpopr.R" and move the line 365 above the line 358: Before:

bpParam <- MulticoreParam(workers = min(N.CORES,length(species)),
                          jobname = "subpopr",
                          stop.on.error = FALSE,
                          threshold = "DEBUG",
                          log = TRUE,
                          progressbar = printProgressBar,
                          logdir = paste0(OUT.DIR,"/threadLogs"))
dir.create(paste0(OUT.DIR,"/threadLogs"), recursive = T, showWarnings = FALSE)

After:

dir.create(paste0(OUT.DIR,"/threadLogs"), recursive = T, showWarnings = FALSE)
bpParam <- MulticoreParam(workers = min(N.CORES,length(species)),
                          jobname = "subpopr",
                          stop.on.error = FALSE,
                          threshold = "DEBUG",
                          log = TRUE,
                          progressbar = printProgressBar,
                          logdir = paste0(OUT.DIR,"/threadLogs"))

It worked.