kastman / busco-docker

Docker Containger for BUSCO Annotation QC
MIT License
0 stars 0 forks source link

The environment variable AUGUSTUS_CONFIG_PATH is not set #1

Open CristianRiccio opened 5 years ago

CristianRiccio commented 5 years ago

Hi,

Thanks for making this busco container. I have tried it with the C. elegans genome but got an error:

docker run -v "$PWD":/input kastman/busco-docker:3.0.0 --in /input/output/genome/celegans/ref/ensembl/release95/seq/Caenorhabditis_elegans.WBcel235.dna.toplevel.fa --lineage_path /input/nematoda_odb9 -m genome -o out_label
INFO    ****************** Start a BUSCO 3.0.0 analysis, current time: 04/08/2019 13:14:39 ******************
INFO    Init tools...
INFO    Check dependencies...
ERROR   The environment variable AUGUSTUS_CONFIG_PATH is not set
ERROR   BUSCO analysis failed !
ERROR   Check the logs, read the user guide, if you still need technical support, then please contact mailto:support@orthodb.org

Do you know how to fix it? I've tried this on macOS X. I am new to Docker but I understand that changing my local AUGUSTUS_CONFIG_PATH is not going to solve this problem since busco is run within an isolated container.

kastman commented 5 years ago

Hi @CristianRiccio ,

Looks like you're running into a problem that I hadn't set up correctly; I was only using this for protein analysis (-m proteins but you were using -m genome). If you look at the busco source code, you can see that AUGUSTUS_CONFIG_PATH is used only in GenomeAnalysis.py, which means that I hadn't set up the docker image to use Augustus correctly, or I guess fully.

Your understanding is right that changing environment variables on the outer host won't affect things inside the container, but you can set them inside the container with the -e or --env flags (see docker run documentation for more info). You can also figure out where the correct path should be by looking at the image this image is based on (in the Dockerfile, the first line is from comics/augustus:3.2.2. By reading that Dockerfile, you see that Augustus gets installed into /software/applications/augustus/3.2.2, so your command will be:

docker run -v "$PWD":/input --env AUGUSTUS_CONFIG_PATH=/software/augustus/3.2.2/config kastman/busco-docker:3.0.0 --in /input/output/genome/celegans/ref/ensembl/release95/seq/Caenorhabditis_elegans.WBcel235.dna.toplevel.fa --lineage_path /input/nematoda_odb9 -m genome -o out_label

Give that a shot, and if it works I'll push a new build of the dockerfile explicitly setting it so that others won't run into that. I also checked the rest of busco, and that appears to be the only environment variable it expects (with os.environ.get) so hopefully there aren't any other hidden gotchas.

Good luck!