Xinglab / rmats-turbo

Other
219 stars 53 forks source link

rMATS install error #423

Open AmyGrimwood opened 1 month ago

AmyGrimwood commented 1 month ago

Hi team, I tried to build rMATS with ./build_rmats --conda in a linux server, but failed. Similar to issue 148: https://github.com/Xinglab/rmats-turbo/issues/248

The error is:

image

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

 To activate this environment, use
$ conda activate /home/ag1/git/Current_RNAseq/rMATS/rmats-turbo/conda_envs/rmats
#
# To deactivate an active environment, use
#
#     $ conda deactivate

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run

    $ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell

See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.

However, the solution in issue 248 doesn't seem to apply. I've checked the .bashrc and there is a section written by conda init:

# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/anaconda/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/opt/anaconda/etc/profile.d/conda.sh" ]; then
        . "/opt/anaconda/etc/profile.d/conda.sh"
    else
        export PATH="/opt/anaconda/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<
EricKutschera commented 1 month ago

It could be that there is something about your .bashrc which prevents the conda code from running correctly from the build script. In https://github.com/Xinglab/rmats-turbo/issues/420 the solution was to copy the __conda_setup section from the .bashrc into build_rmats and setup_environment.sh