mandymejia / BayesfMRI

BayesfMRI R package
GNU General Public License v3.0
24 stars 7 forks source link

INLA-PARDISO license #23

Closed mlueckel closed 1 year ago

mlueckel commented 2 years ago

Hi,

there are no free academic licenses provided anymore. Is there an alternative?

Thanks, Max

danieladamspencer commented 2 years ago

Hi Max,

Yes, there is an alternative that I am currently working on that does not depend on INLA at all, and instead calls C++ directly to perform an EM implementation of the Bayesian GLM. While this has not been tested completely yet, I have been using it to perform analyses. The URL for that branch in the repository is https://github.com/mandymejia/BayesfMRI/tree/1.8.EMrcpp.

Please let me know if you have any questions, or if anything does not work the way you would expect it to.

Dan

On Sat, Mar 19, 2022 at 8:37 AM mlueckel @.***> wrote:

Hi,

there are no free academic licenses provided anymore. Is there an alternative?

Thanks, Max

— Reply to this email directly, view it on GitHub https://github.com/mandymejia/BayesfMRI/issues/23, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFBPK5ZVO3NSNRM5OEP5KTVAXDAVANCNFSM5RD7CY3Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

mlueckel commented 2 years ago

Hi Dan,

great, thanks for that workaround!

I tried it but now I always get the following error message when using the BayesGLM_cifti command (even with the GLM_method set to "classical", which worked using the previous version):

Smoothing AR coefficients and residual variance...Error in file.exists(cifti_original_fname) : invalid 'file' argument

Do you have any idea why? or do you need more information?

Best, Max

danieladamspencer commented 2 years ago

Hi Max,

Can you show me your function call? There are a few differences in the ways the functions work. We are hoping to merge the EM implementation with the master branch this week to offer the full functionality, but we’re not there yet.

Thanks for testing! Dan

On Wed, Mar 23, 2022 at 5:47 AM mlueckel @.***> wrote:

Hi Dan,

great, thanks for that workaround!

I tried it but now I always get the following error message when using the BayesGLM_cifti command (even with the GLM_method set to "classical", which worked using the previous version):

Smoothing AR coefficients and residual variance...Error in file.exists(cifti_original_fname) : invalid 'file' argument

Do you have any idea why? or do you need more information?

Best, Max

— Reply to this email directly, view it on GitHub https://github.com/mandymejia/BayesfMRI/issues/23#issuecomment-1076162395, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFBPK2F2EKDOS7JGNC3AMLVBLSEBANCNFSM5RD7CY3Q . You are receiving this because you commented.Message ID: @.***>

mlueckel commented 2 years ago

Hi Dan,

sorry for the late reply...

Here's the function call:

bglm <- BayesGLM_cifti(
  cifti_fname = /path/to/cifti/file,
  surfL_fname = /path/to/left/surface/file,
  surfR_fname = /path/to/right/surface/file,
  brainstructures = c("left", "right"),
  onsets = events,
  TR = TR,
  GLM_method = "all",
  resamp_res = 6000,
  verbose = TRUE)

Best, Max

danieladamspencer commented 2 years ago

Hi Max,

I've tried to reproduce your error, but I haven't managed to. Let's try a couple of things: 1) Try pulling from the GitHub branch 1.8.EM and reinstalling. I have made a few updates there. 2) The error seems to be coming from when the xifti objects are written to a temporary directory so that the Connectome Workbench can perform the smoothing. Have you tried simply running the code again? Sometimes the temp files don't save correctly, especially if you're saving on a cloud platform. 3) If (1) doesn't work, try updating to the 2.0 branch on GitHub. I have updated a lot of the code, and this is the prototype for the next stable version of the package that we will merge with the master branch. 4) Try updating ciftiTools from CRAN. I think Damon has put in a new update (to version 8) that might fix this. 5) Just a heads up: I'm working to solve a segfault error I'm seeing when I try to analyze the left and right hemispheres together. However, as the hemispheres are disjoint on the cortical surface, one could run them separately in two different analyses and get the same results.

Let me know if these changes help you! I'll do what I can to get your code running! Dan

damondpham commented 2 years ago

Yes it could be ciftiTools, since file paths with "~" were problematic in an older version, and maybe such a file was created.

danieladamspencer commented 2 years ago

Hi Max,

I'm just hopping back in here to say that I think I have fixed the segfault error that comes when running the EM implementation of INLA over both hemispheres in the same call. Please reinstall branch 1.8.EM to implement the fix, and let me know if you run into any trouble.

Happy Friday, Dan

danieladamspencer commented 2 years ago

Hi @mlueckel , I'm just checking back in here to see if this issue is ongoing, or if I can mark it as closed.