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 interproscan.sh #111

Open mahesh-panchal opened 1 month ago

mahesh-panchal commented 1 month ago

Update interproscan

Misc

mahesh-panchal commented 3 weeks ago

Note to self:

Error in running [ps -o pid,vsize,rss,command -p 9897]

was in the interproscan stack trace. The biocontainers container doesn't support these flags.

$ ps -o pid,vsize,rss,command
ps: bad -o argument 'vsize', supported arguments: user,group,comm,args,pid,ppid,pgid,etime,nice,rgroup,ruser,time,tty,vsz,sid,stat,rss

However ps in the Seqera containers wave container does. Need to update the docker image too.

gbdias commented 2 weeks ago

I tried with the latest code and I'm getting an error that suggests the pipeline is looking for conda environments, although I'm not using the conda profile.

run command:

nextflow run /home/guibo205/git/pipelines-nextflow \
  -profile singularity,nbis \
  -params-file params.yml \
  -with-report report.html -with-trace \
  -resume

repo version

(base) guibo205@nac-login:~/git/pipelines-nextflow$ git log -1
commit ab2f579a929717924380755ae173f90ceafac0b9 (HEAD -> update_interproscan.sh, origin/update_interproscan.sh)
Author: Mahesh Binzer-Panchal <mahesh.binzer-panchal@nbis.se>
Date:   Mon Jun 17 07:49:10 2024 +0000

    Use seqera containers to fix ps error

Nextflow log

executor >  slurm (13)
[47/25b1d3] process > FUNCTIONAL_ANNOTATION:UNTAR... [100%] 1 of 1 ✔
[11/83012a] process > FUNCTIONAL_ANNOTATION:BLAST... [100%] 1 of 1 ✔
[69/045f65] process > FUNCTIONAL_ANNOTATION:GFF2P... [100%] 1 of 1 ✔
[84/297b5c] process > FUNCTIONAL_ANNOTATION:BLAST... [100%] 5 of 5 ✔
[eb/b77950] process > FUNCTIONAL_ANNOTATION:INTER... [100%] 1 of 1, failed: 1
[-        ] process > FUNCTIONAL_ANNOTATION:MERGE... -
Error executing process > 'FUNCTIONAL_ANNOTATION:INTERPROSCAN (braker)'

Caused by:
  Process `FUNCTIONAL_ANNOTATION:INTERPROSCAN (braker)` terminated with an error exit status (1)

Command executed:

  if [ -d 'data' ]; then
      # Find interproscan.properties to link data/ from work directory
      INTERPROSCAN_DIR="$( dirname "$( dirname "$( which interproscan.sh )" )" )"
      INTERPROSCAN_PROPERTIES="$( find "$INTERPROSCAN_DIR" -name "interproscan.properties" )"
      cp "$INTERPROSCAN_PROPERTIES" .
      sed -i "/^bin\.directory=/ s|.*|bin.directory=$INTERPROSCAN_DIR/bin|" interproscan.properties
      export INTERPROSCAN_CONF=interproscan.properties
  fi # else use sample DB included with conda ( testing only! )

  if false ; then
      gzip -c -d braker_proteins.2.fasta > braker_proteins.2.fasta
  fi

  interproscan.sh \
      --cpu 8 \
      --input braker_proteins.2.fasta \
      --goterms -pa -t p -dra \
      --output-file-base braker

  cat <<-END_VERSIONS > versions.yml
  "FUNCTIONAL_ANNOTATION:INTERPROSCAN":
      interproscan: $( interproscan.sh --version | sed '1!d; s/.*version //' )
  END_VERSIONS

Command exit status:
  1

Command output:
  (empty)

Command error:
  cp: cannot stat '/opt/conda/pkgs/interproscan-5.59_91.0-hec16e2b_1/info/recipe/interproscan.properties'$'\n''/opt/conda/pkgs/interproscan-5.59_91.0-hec16e2b_1/share/InterProScan/interproscan.properties'$'\n''/opt/conda/share/InterProScan/interproscan.properties': No such file or directory

Work dir:
  /projects/annotation/Babesia_ovis/annotation/func_test/work/87/5d10042f420270a13732d6a7dd4a93

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named `.command.sh`
mahesh-panchal commented 1 week ago

Seqera containers uses micromamba internally to build images. It appears we're getting multiple hits that wasn't the case with biocontainers.

find "$INTERPROSCAN_DIR" -name "interproscan.properties"
/opt/conda/pkgs/interproscan-5.59_91.0-hec16e2b_1/info/recipe/interproscan.properties
/opt/conda/pkgs/interproscan-5.59_91.0-hec16e2b_1/share/InterProScan/interproscan.properties
/opt/conda/share/InterProScan/interproscan.properties

I'll see how best to solve this.

mahesh-panchal commented 1 week ago

See if this solves it.