Samtools not recognized by sample2markers.py?

Hi,

I am trying to run StrainPhlan on CHPC but keep getting an error message: [e] Parallel execution fails: [Errno 2] No such file or directory: ‘samtools’: ‘samtools’. I run everything with singularity container but it seems that sample2markers.py does not recognize the samtools (I tried both module load and put samtools in my path with different versions of samtools, but nothing works). I’m using Methphlan 3.0. I’m new to StrainPhlan, and any help would be appreciated! Thanks! What I did is like:$ module load samtools/1.9
$ samtools --version
samtools 1.9
Using htslib 1.9
Copyright (C) 2018 Genome Research Ltd.

$ module load singularity
$hmn3=/uufs/chpc.utah.edu/common/home/hcibcore/u0762203/microbiomeTestPipe/containers/humann_latest.sif
$ singularity exec $hmn3 sample2markers.py -i sams_simplified/*.sam.bz2 -o consensus_markers
WARNING: underlay of /etc/localtime required more than 50 (104) bind mounts
Fri Feb 18 09:42:17 2022: Start samples to markers execution
Fri Feb 18 09:42:17 2022: Decompressing samples…
Fri Feb 18 09:43:14 2022: Done.
Fri Feb 18 09:43:14 2022: Converting samples to BAM format…

[e] Parallel execution fails: [Errno 2] No such file or directory: ‘samtools’: ‘samtools’
Fri Feb 18 09:43:14 2022: Stop StrainPhlAn 3.0 execution.

Hi @qingl0331
Thanks for getting in touch. Indeed, sample2markers.py is unable to find Samtools. Have you checked whether samtools is correctly installed within the singularity container?

singularity exec $hmn3 which samtools

Hi Aitor,
Thank you for your response! I checked that samtools was not correctly installed within the container, and after I install it , it is working now! Thx!