rietho / IPO

A Tool for automated Optimization of XCMS Parameters
http://bioconductor.org/packages/IPO/
Other
34 stars 20 forks source link

error during oprimisation #73

Open samuelbertrand44 opened 1 year ago

samuelbertrand44 commented 1 year ago

Hello,

since a few weeks, I have an error that appear during xcms optimisation of peak picking parameters. the following error is appearing at some point "seems random" but it is not. allways at the same occurance for a specific file, but different for each file.

Error in units != "px" && is.na(res) : 'length = 2' in coercion to 'logical(1)'

do you have any solution to this ?

here are my session informations : R version 4.3.0 (2023-04-21) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.6 LTS

Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0 LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale: [1] LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=C [3] LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8 [5] LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8 [7] LC_PAPER=fr_FR.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C

time zone: Etc/UTC tzcode source: system (glibc)

attached base packages: [1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached): [1] compiler_4.3.0

packageVersion("IPO") [1] ‘1.26.0’ packageVersion("xcms") [1] ‘3.22.0’ packageVersion("CAMERA") [1] ‘1.56.0’

rietho commented 1 year ago

Hi @samuelbertrand44 !

Thanks for reporting. I am currently not actively maintaining IPO, which is why it is in unsupported state.

I still looked briefly into your issue. It seems to come from a call to jpeg here. Here's reprex of the error:

jpeg(file = "myplot.jpeg", units="in", res=c(200, 200))
#> Error in units != "px" && is.na(res): 'length = 2' in coercion to 'logical(1)'

Created on 2023-06-16 with reprex v2.0.2

Maybe there was a change to the jpeg function, which makes the code error in newer R versions.

You should be able to avoid that function call via setting subdir = NULL. That way, plots are plotted are not saved to disc.

samuelbertrand44 commented 1 year ago

Thanks a lot for the reply and support. the "subdir = NULL" gerenated another problem. however this pointed me other options. It seems that "plot = FALSE" option corrected the problem.

It seems to work.

ckeeling commented 9 months ago

I find that subdir = NULL, plot = TRUE doesn't cause a problem. I capture the plots into a pdf device.