FAQ - MPI-Dortmund/transphire GitHub Wiki

  • SPHIRE, crYOLO, and EMAN do use python 2, but TranSPHIRE uses python 3. Do I need to combine the environments somehow to use those within TranSPHIRE?

No you do not need to combine the environments if you use anaconda for the installation. Anaconda is dealing with different environments in a smart way, so we do not need to worry about it.

Short explanation: The first line of a program starting with #! is called the shebang line. In case a program is directly executed without further specification of the interpreter, i.e. ./program.py instead of python program.py, the interpreter specified in the shebang line is used.

Conda and pip inside of conda make sure that the shebang line of the installed program is set correctly to the python version of the current environment, including the correct linkage of installed packages and dependencies.

For example: head -n 1 /home/em-transfer-user/applications/miniconda/v3.6.5/envs/transphire/bin/transphire #!/home/em-transfer-user/applications/miniconda/v3.6.5/envs/transphire/bin/python

head -n 1 /home/em-transfer-user/applications/miniconda/v3.6.5/envs/cryolo/bin/cryolo_predict.py #!/home/em-transfer-user/applications/miniconda/v3.6.5/envs/cryolo/bin/python

head -n 1 /home/em-transfer-user/applications/sphire/v1.1/bin/sxcter.py #!/home/em-transfer-user/applications/sphire/v1.1/bin/python

Therefore, just providing the absolute path to the executable in the Path Tab of TranSPHIRE will make the program work.

However, if the shebang line is not present or is pointing to another location, e.g. #!/usr/local/env python, (Might happen during the source code installation of SPHIRE/EMAN2), the line should be adjusted to point to the correct python version.


  • How can I install TranSPHIRE so that the settings are shared among the users?
  1. Shared files on a dedicated TranSPHIRE machine (Usually root privileges).

Our home directory looks like this:

home
|
--- User1
|
---> .transphire_settings -> symlink to /home/shared/transphire_settings
|
---> mounted -> symlink to /home/shared/mounted
|
---> projects -> symlink to /mnt/data/projects
|
---> scratch -> symlink to /mnt/scratch

|
--- UserXXXX

|
--- Shared
|
---> transphire_settings
|
---> mounted

To create this folder structure by default for new users, add this to /etc/skel/.profile
if ! -e ${HOME}/projects
then
ln -s /mnt/data/projects ${HOME}/projects 1>/dev/null 2>&1
fi
if ! -e ${HOME}/scratch
then
ln -s /mnt/scratch ${HOME}/scratch 1>/dev/null 2>&1
fi
if ! -e ${HOME}/.transphire_settings
then
ln -s /home/shared/transphire_settings ${HOME}/.transphire_settings 1>/dev/null 2>&1
fi
if ! -e ${HOME}/mounted
then
ln -s /home/shared/mounted ${HOME}/mounted 1>/dev/null 2>&1
fi

For already existing users, this needs to be added to the .profile by themselves.
Personally, I also change the content_* files to read only for the users, but not for the local admin of the computer.

  1. Create a shared folder dedicated for TranSPHIRE settings and alias the transphire shortcut to use this settings folder as the input directory (Usually no root privileges).

alias transphire='transphire --settings_directory /home/shared/my_transphire_settings'

Send the alias around to the users and they can add it to their .profile and the transphire shortcut will use this shared settings directory.

  1. Combination of both :)

Create a dedicated directory and instead of symlinking, add the alias to the /etc/skel/.profile file