Skip to content

BRAKER2 hardcodes AUGUSTUS_CONFIG_PATH value #405

Open
@lgorenstein

Description

@lgorenstein

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions