Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BRAKER2 hardcodes AUGUSTUS_CONFIG_PATH value #405

Open
lgorenstein opened this issue Apr 22, 2021 · 1 comment
Open

BRAKER2 hardcodes AUGUSTUS_CONFIG_PATH value #405

lgorenstein opened this issue Apr 22, 2021 · 1 comment

Comments

@lgorenstein
Copy link

lgorenstein commented Apr 22, 2021

Hello Biocontainers team,

While working with BRAKER2 singularity image (singularity pull docker://quay.io/biocontainers/braker2:2.1.6--hdfd78af_3) the program crashes with an error

# Wed Apr 21 21:11:44 2021: ERROR: in file /usr/local/bin/braker.pl at line 1710
AUGUSTUS_CONFIG_PATH/species (in this case /usr/local/config//) is not writeable.
There are 3 alternative ways to set this variable for braker.pl:
   a) provide command-line argument --AUGUSTUS_CONFIG_PATH=/your/path
   b) use an existing environment variable $AUGUSTUS_CONFIG_PATH
      for setting the environment variable, run
           export AUGUSTUS_CONFIG_PATH=/your/path
      in your shell. You may append this to your .bashrc or
      .profile file in order to make the variable available to all
      your bash sessions.
[...]

(Braker needs to be able to train Augustus and write its config files, so location inside the container can not work).
Contrary to the diagnostic suggestion, following the b) advice and exporting AUGUSTUS_CONFIG_PATH=..... does not resolve the problem.

I traced the contradiction to /usr/local/etc/conda/activate.d/augustus.sh (that is sourced from within /usr/local/env-activate.sh):

export AUGUSTUS_CONFIG_PATH=/usr/local/config/             # <--- Hardcoded, can't override
export AUGUSTUS_SCRIPTS_PATH=/usr/local/bin/
export AUGUSTUS_BIN_PATH=/usr/local/bin/

Because of this assignment, setting my own AUGUSTUS_CONFIG_PATH outside of the container has no effect.

I propose an easy fix to this issue by tweaking the assignment a to use external value with a fallback:

export AUGUSTUS_CONFIG_PATH=${AUGUSTUS_CONFIG_PATH:-/usr/local/config/}
export AUGUSTUS_SCRIPTS_PATH=/usr/local/bin/
export AUGUSTUS_BIN_PATH=/usr/local/bin/

Other variables here don't need overrides, only AUGUSTUS_CONFIG_PATH does.

@osallou
Copy link
Contributor

osallou commented Apr 22, 2021

Hi, thanks for deep analysis.

As you can see, container is based on a conda package.

You should create the issue in bioconda repo, fixing conda package will autocreate a new container

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants