NBISweden / pipelines-nextflow

A set of workflows written in Nextflow for Genome Annotation.
GNU General Public License v3.0
42 stars 18 forks source link

update busco for AnnotationPreprocessing pipeline, problems with singularity #68

Closed LucileSol closed 2 years ago

LucileSol commented 2 years ago

I wanted to update the busco version for 5.2.2 in AnnotationPreprocessing.nf, I tried with conda it worked

I tried with singularity doing : nextflow run -c params_v5_2_2singularity.config -profile nbis,singularity ~/git/NBIS/pipelines-nextflow/AnnotationPreprocessing/AnnotationPreprocessing.nf

and it says :

Error executing process > 'annotation_preprocessing:busco (genome_uppercase_purified.fa)'

Caused by:
  Process `annotation_preprocessing:busco (genome_uppercase_purified.fa)` terminated with an error exit status (1)

Command executed:

  if [ ! -w "${AUGUSTUS_CONFIG_PATH}" ]; then
      # Create writable tmp directory for augustus
      AUG_CONF_DIR=$( mktemp -d -p $PWD )
      cp -r $AUGUSTUS_CONFIG_PATH/* $AUG_CONF_DIR
      export AUGUSTUS_CONFIG_PATH=$AUG_CONF_DIR
  fi
  # before with buscov4 it was echo "BUSCO_CONFIG_FILE=$BUSCO_CONFIG_FILE", it stops working for buscov5
  echo "BUSCO_CONFIG_FILE=$AUGUSTUS_CONFIG_PATH/myconfig.ini"
  echo "AUGUSTUS_CONFIG_PATH=$AUGUSTUS_CONFIG_PATH"
  busco -c 8 -i genome_uppercase_purified.fa -l viridiplantae_odb10 -m genome --out busco_genome_uppercase_purified_viridiplantae_odb10

Command exit status:
  1

Command output:
  (empty)

Command error:
  .command.sh: line 2: AUGUSTUS_CONFIG_PATH: unbound variable

Work dir:
  /projects/annotation/Lepidium_7/pacbio/L_campestre_Lc92/genome/work/4c/4eaa28784f54efd353288694d4dfbd

Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run`

I guess it does not find the path of augustus inside the singularity container

aersoares81 commented 2 years ago

This sounds like the same error with Augustus on Rackham:

Error: Cannot write to Augustus directory, please make sure you have write permissions to <directory>
then you need to create a local copy of the config directory from the augustus
module with 'source $AUGUSTUS_CONFIG_COPY'.  See 'module help augustus/3.4.0'

The help says:

If you see this error:

    Error: Cannot write to Augustus directory, please make sure you have write permissions to <directory>

then you likely need to create a local copy of the config directory from
the augustus module.  With this augustus module loaded, you can do this with:

    source $AUGUSTUS_CONFIG_COPY

This will create a directory named augustus_config/ in the current directory
and the AUGUSTUS_CONFIG_PATH environment variable will be updated to reflect
this new location.  If you continue to see the error from BUSCO, the script
was not run correctly.  This local directory will contain additional training
sets created by BUSCO during its run.

If you already have your own directory for augustus config files, then you may
wish to adjust AUGUSTUS_CONFIG_PATH to name this directory.

Does that make any sense?

mahesh-panchal commented 2 years ago

Nah, the problem here is this bit:

Command error:
  .command.sh: line 2: AUGUSTUS_CONFIG_PATH: unbound variable

AUGUSTUS_CONFIG_PATH is undefined and the bash script uses set -u. It needs to be provided with a default value. I need to check which case's it's set again and which cases it isn't.