Mouse-Imaging-Centre / RMINC

Statistics for MINC volumes: A library to integrate voxel-based statistics for MINC volumes into the R environment. Supports getting and writing of MINC volumes, running voxel-wise linear models, correlations, etc.; correcting for multiple comparisons using the False Discovery Rate, and more. With contributions from Jason Lerch, Chris Hammill, Jim Nikelski and Matthijs van Eede. Some additional information can be found here:
https://mouse-imaging-centre.github.io/RMINC
Other
23 stars 17 forks source link

runRMINCTestbed() failing #321

Open lgazdzin opened 5 months ago

lgazdzin commented 5 months ago

I've just installed RMINC into R version 4.4.0. runRMINCTestbed() fails in several places with what looks to be a python version issue. I've tried installing python2.7 and pointing the volume_from_labels_only python script to it, but then it can't find python-stuffs and fails again. I've also tried pointing it to my Homebrew installation of python2.7, but that fails for other reasons. It also looks like the testbed terminates early, presumably because it hits to many errors.

Is this going to be a problem with regular RMINC use or is this unique to the testing sets? Is there an easy fix for this?

Thanks!

Here is the output to where this first occurs and the last bit of testing before it terminates early:

> RMINC::runRMINCTestbed()

Running tests in:  /Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/RMINC/user_tests/ 

✔ | F W  S  OK | Context
✔ |         23 | anatAnova [5.6s]                                                                                            
✔ |   1      1 | anatApply [5.8s]                                                                                            
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Warning (test_anatApply.R:18:1): (code run outside of `test_that()`)
Coercing gf$Primary.Diagnosis to a factor

Backtrace:
    ▆
 1. └─RMINC::anatApply(gf$lobeThickness, gf$Primary.Diagnosis)
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
✔ |         46 | anatFDR [7.9s]                                                                                              
⠏ |          0 | anatGet                                                                                                     sh: /usr/local/bin/volumes_from_labels_only: /usr/local/opt/python/bin/python2.7: bad interpreter: No such file or directory
✖ | 2 1     21 | anatGet [1.7s]      

...................

Error (test_mincTFCE.R:105:3): Vertex TFCE approximately matches mincTFCE
Error in `mincFileCheck(filename)`: The following file could not be read (full filename is between the dashes): ---/var/folders/1f/r_t77pqx0rq1kdy4719pn45h5v1b8w/T//RtmpHDoyxN/minc_tfce_out44561ecfa36.mnc---
Backtrace:
    ▆
 1. ├─RMINC::mincTFCE(first_vol, d = 0.0027) at test_mincTFCE.R:105:3
 2. └─RMINC:::mincTFCE.mincSingleDim(first_vol, d = 0.0027)
 3.   └─RMINC::mincGetVolume(output_file)
 4.     └─RMINC:::mincFileCheck(filename)

[ FAIL 10 | WARN 12 | SKIP 0 | PASS 247 ]
══ Terminated early ═════════════════════════════════════════════════════════════════════════════════════════════════════════
Error: Test failures
gdevenyi commented 5 months ago

Technically, this is a failure of volumes_from_labels_only, a script from minc-stuffs: https://github.com/Mouse-Imaging-Centre/minc-stuffs/blob/main/python/volumes_from_labels_only

I have confirmed volumes_from_labels_only works in python3.10 with properly installed minc-toolkit-v2 and pyminc