pnlbwh / pnlNipype

PNL pipeline for NIFTI images
Other
10 stars 15 forks source link

Need access to nhdr program #45

Closed njhunsak closed 4 years ago

njhunsak commented 4 years ago

Found out I needed access to nhdr_write.py found in the conversion repository. You may want to add these programs to this repository. I've already downloaded and installed the programs from the other repository.

tashrifbillah commented 4 years ago

It was already here.

Did you not do pip install -r requirements.txt ?

njhunsak commented 4 years ago

Did you not do pip install -r requirements.txt ?

I did. I wonder why I couldn't find it or run the program?

tashrifbillah commented 4 years ago

I may know why.

With pip install, package goes to your ~/miniconda3/lib/python3.6/site-packages/conversion/ directory. Then, modules from conversion can be imported with python import statement. But, the modules don't appear on your path to run as standalone executables.

To be able to run one of them i.e. nhdr_write.py --help as a standalone executable, you need to download conversion separately or run as:

python ~/miniconda3/lib/python3.6/site-packages/conversion/nhdr_write.py --help

Hope this helps.

By the way, do you have a suggestion about where I should put the above explanation in my README/TUTORIAL?

njhunsak commented 4 years ago

I might stick it after line 168 in the README.txt file.

sbouix commented 4 years ago

I think these are important utility scripts, and we should consider soft links in the exec folder or some other way to make them readily available to the user without having to go into the conda site package folders.

tashrifbillah commented 4 years ago

Fixed by https://github.com/pnlbwh/conversion/commit/deb01793a27b7e4b467c0d8ca81de005541ff122

Upon installation of conversion repository, the useful scripts nhdr_write.py and nifti_write.py are copied to python bin directory. The python bin directory i.e. the scripts are available on user PATH upon either of:

source miniconda3/bin/activate
or 
conda activate pnlpipe3

Thus, the user is no longer required to look into many directories deep to find the scripts or clone conversion separately.