dorianps / LINDA

Lesion Identification with Neighborhood Data Analysis
Apache License 2.0
20 stars 4 forks source link

Error in atropos: object kmimg not found #19

Closed raftlab29 closed 5 years ago

raftlab29 commented 5 years ago

Thank you guys for making this available! I've been getting a recurring error when attempting to run LINDA v0.2.6 and v0.2.7:

13:41 Feature calculation... Error in atropos(a = kmimg, m = mrf, c = "[5,0]", i = paste("kmeans[", : object 'kmimg' not found

I downloaded the 500+mb LINDA .zip files from https://github.com/dorianps/LINDA/releases/download/ and am using R v3.5.1, on OSX El Capitan. The error looks like it's related to a function in ANTsR (atropos function), so I tried re-installing ANTsR and ANTsRCore, as well as cmaker and ITKR a few times (via devtools), but still receive the same error. I've also tried LINDA v0.2.6.

I do have cmake, git, ninja, installed also, and they all return paths when queried from the Terminal. Not sure if I'm doing something else wrong.

source("/.......LesionMapping/LINDA_v0.2.7/linda_predict.R") 13:25 Starting LINDA v0.2.7 ... 13:30 Loading file: t1mprage_sag.nii 13:30 Creating folder: /.....data/linda 13:30 Loading template... 13:30 Skull stripping... (long process) 13:39 Saving skull stripped files 13:39 Loading LINDA model 13:39 Computing asymmetry mask... 13:40 Saving asymmetry mask... 13:40 Running 1st registration... 13:41 Feature calculation... Error in atropos(a = kmimg, m = mrf, c = "[5,0]", i = paste("kmeans[", : object 'kmimg' not found

dorianps commented 5 years ago

This is very strange, version 0.2.7 has not changed, there must be some recent changes in ANTsR causing this. Try to install an older commit of ANTsRCore+ANTsR of at least 1 month ago. Something like this might work:

remove.packages('ANTsRCore')
remove.packages('ANTsR')
devtools::install_github('ANTsX/ANTsRCore', ref='02812d20ca9bb8dbbe5e7e2778f2ee3d154084ae',  upgrade_dependencies=FALSE)
devtools::install_github('ANTsX/ANTsR', ref='fb80802e5851fb9da2196cfc2016a0d1407c36e2',  upgrade_dependencies=FALSE)

You can also try installing LINDA v0.5.0 after that, although v0.2.7 should work as well:

devtools::install_github('dorianps/LINDA', upgrade_dependencies=FALSE)

@muschellij2 , I see you applied some changes in atropos and kmeansSegmentation on Nov 5-8, could this error come from those changes.

muschellij2 commented 5 years ago

Yes - this is a bug, just fixed with https://github.com/ANTsX/ANTsRCore/commit/811354209d079d146cbb30c55821817f5d421cf5. If this is for testing, thanks. If you are using this for research, again, you should not be using the development versions on GitHub but be using releases.

dorianps commented 5 years ago

I had the impression that development branches should be separate from master.

@muschellij2 , what is the best strategy to install a package dependent on ANTsR using devtools without it getting automatically the lastest master but the latest stable tag?

muschellij2 commented 5 years ago

You should use a commit tag in the remote section or have it in the read me that people need to install from the releases

On Sat, Nov 24, 2018 at 5:47 PM dorianps notifications@github.com wrote:

I had the impression that development branches should be separate from master.

@muschellij2 https://github.com/muschellij2 , what is the best strategy to install a package dependent on ANTsR using devtools without it getting automatically the lastest master but the latest stable tag?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dorianps/LINDA/issues/19#issuecomment-441401533, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBnrr6Uk0le3EY4yGXxO8C6aLHhPPIpks5uycydgaJpZM4YuMtT .

-- John

dorianps commented 5 years ago

Resolved by https://github.com/ANTsX/ANTsRCore/commit/811354209d079d146cbb30c55821817f5d421cf5

Update ANTsR to make LINDA work.

raftlab29 commented 5 years ago

Thanks so much for the assistance -- back in the lab today and it's working well now. Using LINDA v0.5.0. Much appreciated.