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
22 stars 17 forks source link

Shiny barfs on zyx oriented minc files #220

Open gdevenyi opened 6 years ago

gdevenyi commented 6 years ago

Can't quite follow the logic in server.R, but somewhere an assumption is being made about the orientation of inputs. I can use mincPlotSliceSeries properly, but shiny fails to properly produce figures:

Warning in min(x) : no non-missing arguments to min; returning Inf
Warning in max(x) : no non-missing arguments to max; returning -Inf
Warning: Error in [: subscript out of bounds
  171: getSlice
  170: mincImage
  169: FUN
  168: lapply
  167: <Anonymous>
  165: mincPlotSliceSeries
  164: renderPlot [/opt/quarantine/RMINC/1.5.2.0^minc-toolkit-1.9.16^R-3.5.0/install/RMINC/shinyRMINC/server.R#217]
  162: func
  122: drawPlot
  108: <reactive:plotObj>
   92: drawReactive
   79: origRenderFunc
   78: output$seriesPlot
    2: shiny::runApp
    1: launch_shinyRMINC
gdevenyi commented 6 years ago

Followup, after mincreshaping the files, shiny still fails.

What might be of relevance here is that this is 1x1x1 Human T1s.

cfhammill commented 6 years ago

I'm surprised, could you send me a reproducible example?

gdevenyi commented 6 years ago

Is a anat file + RData of the model environment sufficient?

cfhammill commented 6 years ago

yeah that should be fine

gdevenyi commented 6 years ago

User will provide tomorrow.

cfhammill commented 6 years ago

great, thanks.

gdevenyi commented 6 years ago

Full runtime error: image

gdevenyi commented 6 years ago

https://we.tl/t-VvEv6YnudA

gdevenyi commented 6 years ago

.RData includes the model and the anat object loaded with mincArray(mincGetVolume).

cfhammill commented 6 years ago

I think I also need an empty volume with the right dimensions to use as a likeFile

gdevenyi commented 6 years ago

You'll have it monday!

gdevenyi commented 5 years ago

https://we.tl/t-9KptBZGIyS

cfhammill commented 5 years ago

hmm, this worked fine for me:

launch_shinyRMINC(vs, anat, anatLow = 1, anatHigh = 10
  , plotcolumns = demographics[, c("Group", "Age_MRI1", "M/F", "MR Delay")]
  , fdr = FDR)

what happens if you use:

likeVolume(vs) <- "secondlevel_template0.mnc"

before the run?

Failing that, have you tried with the develop branch? I don't think I've touched any of this code since the last release, but maybe...

EDIT: I have not.

gdevenyi commented 5 years ago

No change trying that.

Perhaps this is a version issue. We're on minc-toolkit 1.9.16 built from source.

cfhammill commented 5 years ago

Hmm, it would surprise me if the toolkit was the issue. Especially since sliceSeries works.

Could you try updating shiny? Also could you send me a screen capture of failed plot, or describe it? Is it all missing or just the anatomy or something like that.

gdevenyi commented 5 years ago

Re shiny:

library(shiny)
> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.5 LTS

Matrix products: default
BLAS: /opt/quarantine/R/3.5.0/install/opt/microsoft/ropen/3.5.0/lib64/R/lib/libRblas.so
LAPACK: /opt/quarantine/R/3.5.0/install/opt/microsoft/ropen/3.5.0/lib64/R/lib/libRlapack.so

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

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

other attached packages:
[1] shiny_1.1.0          RevoUtils_11.0.0     RevoUtilsMath_11.0.0

loaded via a namespace (and not attached):
 [1] compiler_3.5.0  magrittr_1.5    R6_2.2.2        promises_1.0.1 
 [5] later_0.7.3     htmltools_0.3.6 Rcpp_0.12.17    digest_0.6.15  
 [9] xtable_1.8-2    httpuv_1.4.4.2  mime_0.5       

Looks like I have the latest version.

gdevenyi commented 5 years ago

Screenshot: there's an red "error subscript out of bounds" in the plot section before the broken image replaces it

image

cfhammill commented 5 years ago

And in the browser?

gdevenyi commented 5 years ago

Same out of bounds thing and broken display.

gdevenyi commented 5 years ago

Any progress here? Anything you can suggest?

cfhammill commented 5 years ago

Sorry lost track of this. I'm totally stumped, I can't reproduce on my system so it will be tough to debug. Any way I could ssh/vnc into your system and debug there?

gdevenyi commented 5 years ago

We can probably figure that out. Let me try this test data on an install from a different family of systems and see if it goes away for me too.

cfhammill commented 4 years ago

Any progress on this @gdevenyi?

gdevenyi commented 4 years ago

Last I checked it was still broken. We transitioned to mricrotome images so haven't tried shiny again. Will update things and check. I should try the VM