NBISweden / AGAT

Another Gtf/Gff Analysis Toolkit
GNU General Public License v3.0
467 stars 56 forks source link

agat_convert_minimap2_bam2gff.pl doesn't find samtools in the singularity image #433

Closed qhelleu closed 9 months ago

qhelleu commented 9 months ago

Hello, I ran into a bug running agat_convert_minimap2_bam2gff.pl from the singularity container agat_1.0.0--pl5321hdfd78af_0.sif.

When I run the command : singularity exec --bind $DIR $DIR/bin/agat_1.0.0--pl5321hdfd78af_0.sif agat_convert_minimap2_bam2gff.pl -i minimap_Aant-TSA_aln.bam -o minimap_Aant-TSA_aln.gff

I get the following error :

Using standard /usr/local/lib/perl5/site_perl/auto/share/dist/AGAT/config.yaml file Missing executable samtools in PATH at /usr/local/bin/agat_convert_minimap2_bam2gff.pl line 79.

Should be easy to correct in the container. Thanks for the great work.

Juke34 commented 9 months ago

Right, agat is not shipped with samtools. You better create your own.

Here a definition for a docker file (dockerfile):

# Image containing miniconda
FROM continuumio/miniconda3:4.12.0

LABEL description="Image of AGAT with samtools" \
      author="Jacques Dainat" 

# update package regisry
RUN apt-get update --fix-missing --allow-unauthenticated --allow-insecure-repositories --allow-releaseinfo-change 

# install procps 
RUN apt-get install -y procps

# add cpan in case we need to install extra module for test
RUN conda install -c bioconda samtools && \
                              agat=1.3.0

# Clean useless data
RUN conda clean --all -f -y

Here for a singularity definition file (singularity.def ):

Bootstrap: docker
From: continuumio/miniconda3:4.12.0
Stage: spython-base

%labels
description="Image of AGAT with samtools" 
author="Jacques Dainat"
%post
# Image with all dependencies for AGAT

# update package regisry
apt-get update --fix-missing --allow-unauthenticated --allow-insecure-repositories --allow-releaseinfo-change

# install procps 
apt-get install -y procps

# add cpan in case we need to install extra module for test
conda install -c bioconda samtools && \
agat=1.3.0

# Clean useless data
conda clean --all -f -y
%runscript
exec /bin/bash "$@"
%startscript
exec /bin/bash "$@"
qhelleu commented 9 months ago

Thanks for the definition files!