beauchamplab / raveio

File IO for RAVE Project
6 stars 2 forks source link

MRI/CT Preprocessing error #18

Closed teffalump closed 6 months ago

teffalump commented 6 months ago

This error occurs when on the MRI/CT preprocessing module runs on my Arch linux box through the web browser.

Error message:
the condition has length > 1
Traceback:
2: the condition has length > 1
1: if (grepl("freesurfer", res, ignore.case = TRUE)) {
       return(path)
   }

I think I've tracked it to these lines: https://github.com/beauchamplab/raveio/blob/bce55cb6f48a782c190658482fde4436934b06c1/R/cmd.R#L45-L50 https://github.com/beauchamplab/raveio/blob/bce55cb6f48a782c190658482fde4436934b06c1/R/cmd.R#L53

res can hold multiple lines (for example error lines) and so it matches against a vector but if expects a single condition. Above that line dcm2niix uses any: https://github.com/beauchamplab/raveio/blob/bce55cb6f48a782c190658482fde4436934b06c1/R/cmd.R#L37-L39

Which I believe should be added to the freesurfer line as well. Interestingly, it works when I run it try it on a Windows machine.

dipterix commented 6 months ago

Thanks for reporting this issue. I'm working on the fix

teffalump commented 6 months ago

I updated to the raveio v0.9.0.51 with new commit and it loads now. Thanks!