czarrar / connectir

Fast and memory efficient approach for connectome-wide association studies in R and C++. Uses custom implementation of multivariate distance matrix regression to associate brain and behavior.
15 stars 9 forks source link

I couldn't install the "niftir" package. #10

Open ericchenjiu opened 5 years ago

ericchenjiu commented 5 years ago

Dear, Do you can tell me the version of R software. It took me about a week to install it, but I still couldn't install the "niftir" package in Win and Ubuntu. Thank you.

devtools::install_github("czarrar/niftir") # https://github.com/czarrar/niftir Downloading GitHub repo czarrar/niftir@master √ checking for file 'C:\Users\SJYX-CJ\AppData\Local\Temp\RtmpEF1YAP\remotes23e42706519b\czarrar-niftir-afd7905/DESCRIPTION' (759ms)

Installing package into ‘C:/Users/SJYX-CJ/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified)

** libs C:/RBuildTools/3.5/mingw_64/bin/gcc -m64 -I"C:/PROGRA~1/MICROS~2/ROPEN~1/R-35~1.3/include" -DNDEBUG -I"C:/Users/SJYX-CJ/Documents/R/win-library/3.5/Rcpp/include" -I"C:/Users/SJYX-CJ/Documents/R/win-library/3.5/BH/include" -I"C:/Users/SJYX-CJ/Documents/R/win-library/3.5/bigmemory/include" -I"C:/a/w/1/s/vendor/extsoft/include" -O2 -Wall -std=gnu99 -mtune=core2 -c nifti1_io.c -o nifti1_io.o nifti1_io.c:3:73: fatal error: niftir/nifti1_io.h: No such file or directory

include "niftir/nifti1_io.h" / typedefs, prototypes, macros, etc. /

                                                                     ^

compilation terminated. make: *** [C:/PROGRA~1/MICROS~2/ROPEN~1/R-35~1.3/etc/x64/Makeconf:208: nifti1_io.o] Error 1 ERROR: compilation failed for package 'niftir'

Copying scripts for connectir

bindir <- dirname(system("which R", intern=TRUE)) Error in system("which R", intern = TRUE) : 'which' not found system(sprintf("cp connectir/inst/scripts/.R %s/", bindir)) Error in sprintf("cp connectir/inst/scripts/.R %s/", bindir) : object 'bindir' not found system(sprintf("rm -f %s/_worker.R", bindir)) Error in sprintf("rm -f %s/_worker.R", bindir) : object 'bindir' not found system(sprintf("chmod +x %s/.R", bindir)) Error in sprintf("chmod +x %s/.R", bindir) : object 'bindir' not found setwd(basedir) Error in setwd(basedir) : object 'basedir' not found run("rm -rf connectir") Error in run("rm -rf connectir") : could not find function "run"

TODO: add copying of scripts to some bin location

install.packages("niftir", repos="http://R-Forge.R-project.org") Installing package into ‘C:/Users/SJYX-CJ/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘niftir’ is not available (for R version 3.5.3) devtools::install_github("E:\mysoftware\myCWAS_paper_Code\niftir_0.2.tar.gz") Error in parse_repo_spec(repo) : Invalid git repo specification: 'E:\mysoftware\myCWAS_paper_Code\niftir_0.2.tar.gz' install.packages("E:\mysoftware\myCWAS_paper_Code\niftir_0.2.tar.gz") Installing package into ‘C:/Users/SJYX-CJ/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) Warning in install.packages : package ‘E:\mysoftware\myCWAS_paper_Code\niftir_0.2.tar.gz’ is not available (for R version 3.5.3)

czarrar commented 5 years ago

Sorry I am no longer actively maintaining this package hence the issues. People have been able to get it working with older versions of R and some other packages. (I don't think this will work on Windows but should work on Ubuntu). You can try with Rcpp version 0.12.8 and bigmemory 4.4.6. After that you might need to set dep=F so that newer versions of those tools don't install.

You can also find a python version of the package in CPAC: https://fcp-indi.github.io/docs/user/install.html and that is actively maintained.

If you are not doing any intense computation (e.g., using parcellations instead of voxels), then I've attached a pure R version of MDMR. See Rmdmr/242_parcellate_sm/20_mdmr.R for sample usage. Let me know if you have any questions on that. Rmdmr.zip

ericchenjiu commented 5 years ago

Thank you, Prof. Shehzad. You mean I can run the connectir in a python version of the package in CPAC? In the website, https://fcp-indi.github.io/docs/user/install.html, I didn't find how runs the connectir package. I want to analyze the CWAS.
Do the CPAC run the CWAS?

Thank you very much. Bests, Jiu

If you have any questions, please don't hesitate to contact me.

Best!

Yours,

Jiu Chen

E-mail: ericcst@aliyun.com Tel: 86-187-5199-7338


From:Zarrar Shehzad notifications@github.com Sent At:2019 Jun. 25 (Tue.) 22:32 To:czarrar/connectir connectir@noreply.github.com Cc:ericchenjiu ericcst@aliyun.com; Author author@noreply.github.com Subject:Re: [czarrar/connectir] I couldn't install the "niftir" package. (#10)

Sorry I am no longer actively maintaining this package hence the issues. People have been able to get it working with older versions of R and some other packages. (I don't think this will work on Windows but should work on Ubuntu). You can try with Rcpp version 0.12.8 and bigmemory 4.4.6. After that you might need to set dep=F so that newer versions of those tools don't install. You can also find a python version of the package in CPAC: https://fcp-indi.github.io/docs/user/install.html and that is actively maintained. If you are not doing any intense computation (e.g., using parcellations instead of voxels), then I've attached a pure R version of MDMR. See Rmdmr/242_parcellate_sm/20_mdmr.R for sample usage. Let me know if you have any questions on that. Rmdmr.zip — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.