ethanbass / chromConverter

Parsers for chromatography data in R (HPLC-DAD/UV, GC-FID, MS)
https://ethanbass.github.io/chromConverter/
GNU General Public License v3.0
28 stars 3 forks source link

Path interpretation issue in read_chroms #14

Closed ADablanc closed 1 year ago

ADablanc commented 1 year ago

Hi,

There is a problem with the read_chrom function, a "/" is added at the beginning and end of path_out which prevents the function from working properly.

if i try thise code (on Windows):


library(chromConverter)

if (dir.exists("DATAs/OUTPUT/neg")){ print("THE DIRECTORY EXIST") }

dat <- read_chroms(paths = "DATAs/INPUT/neg", format_in = "thermoraw", path_out = "DATAs/OUTPUT/neg")


i have this output:


library(chromConverter)

if (dir.exists("DATAs/OUTPUT/neg")){ print("THE DIRECTORY EXIST") } 1] "THE DIRECTORY EXIST"

dat <- read_chroms(paths = "DATAs/INPUT/neg", format_in = "thermoraw", path_out = "DATAs/OUTPUT/neg") Error in read_chroms(paths = "DATAs/INPUT/neg", format_in = "thermoraw", : The export directory '/DATAs/OUTPUT/neg/' does not exist.


ethanbass commented 1 year ago

Hi, Sorry about this. I'm pretty sure this bug has already been fixed in the latest version of chromConverter available from GitHub, which I can see I really need to get uploaded to CRAN. Can you please try downloading from GitHub (e.g. by running remotes::install_github("ethanbass/chromConverter") and try again (after resetting your R session to clear the cache). Thanks! Ethan

ADablanc commented 1 year ago

Unfortunately i have already install the latest version from github using renv. The problem persists .

ethanbass commented 1 year ago

Ok. Just to make sure, did you restart your R session after installing it? If not, the old version is likely still cached.

On Mon, Mar 27, 2023 at 11:43 AM Axel Dablanc @.***> wrote:

Unfortunately i have already install the latest version from github using renv. The problem persists .

— Reply to this email directly, view it on GitHub https://github.com/ethanbass/chromConverter/issues/14#issuecomment-1485371051, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADZEBO43PGHJA3DY5QOAYL3W6GYSLANCNFSM6AAAAAAWI6HDUY . You are receiving this because you commented.Message ID: @.***>

ADablanc commented 1 year ago

Yes, i even restart my computer because i have the issue friday and today.

ethanbass commented 1 year ago

I just double checked on a computer in the lab running Windows 10 and I was only able to reproduce this issue using the CRAN version of chromConverter (version 0.2.1) but not the version on GitHub (version 0.3.3), so I'm not sure what's going on. Can you please run packageVersion("chromConverter") to confirm that it says v 0.3.3?

ethanbass commented 1 year ago

Maybe you can also confirm that .Platform$OS.type returns "windows" on your computer. If not this could explain the problem (though I can't imagine why this would be the case)

ethanbass commented 1 year ago

Any update on this?

ethanbass commented 1 year ago

I'm going to close this due to lack of activity, but feel free to reopen if you're still having this issue and can provide additional details to help me reproduce this issue. Also feel free to try the version on the v0.3.4 branch, which has completely removed the check_paths function which is likely underlying this issue. Thanks! Ethan