jodyphelan / TBProfiler

Profiling tool for Mycobacterium tuberculosis to detect ressistance and strain type from WGS data
GNU General Public License v3.0
104 stars 43 forks source link

Error when running TB-profiler (all input files exist) #279

Closed mdhfz89 closed 1 year ago

mdhfz89 commented 1 year ago

Hi, I'm trying to run TBprofiler and facing some error, but I can't figure out whats the problem to fix it. I have confirmed (I hope) that I have all the input files and as I am facing this error, I will upload the errlog.txt file here.

It seems like it managed to create a bam file and then errors from the next step onwards.

Some details is that I installed tb-profiler using conda in an environment, and the list of programs is also attached here as meta1_condalist.txt.

The errlog file is here D_host_removed.errlog.txt.

jodyphelan commented 1 year ago

Hi @mdhfz89

Thanks for reporting the error. It looks like an issue with samtools (similar to https://github.com/bcbio/bcbio-nextgen/issues/3632).

Could you try run samtools --version and see if you get an error?

If so maybe try updating samtools to a later version? or try recreate the env with this file: https://github.com/jodyphelan/TBProfiler/blob/master/conda/linux-latest.txt

conda create --name tb-profiler --file linux-latest.txt
mdhfz89 commented 1 year ago

Hi, thank you for the response.

When i tried running samtools --version there was no error.

samtools 1.17
Using htslib 1.17
Copyright (C) 2023 Genome Research Ltd.

Samtools compilation details:
    Features:       build=configure curses=yes 
    CC:             gcc
    CPPFLAGS:       
    CFLAGS:         -Wall -g -O2
    LDFLAGS:        
    HTSDIR:         htslib-1.17
    LIBS:           
    CURSES_LIB:     -lncursesw

HTSlib compilation details:
    Features:       build=configure libcurl=no S3=no GCS=no libdeflate=no lzma=yes bzip2=yes plugins=no htscodecs=1.4.0
    CC:             gcc
    CPPFLAGS:       
    CFLAGS:         -Wall -g -O2 -fvisibility=hidden
    LDFLAGS:        -fvisibility=hidden 

HTSlib URL scheme handlers present:
    built-in:    preload, data, file
    crypt4gh-needed:     crypt4gh
    mem:     mem

So i tried to install with the file you linked but face this error at the end of the installation:

SafetyError: The package for tb-profiler located at /home/neaehi/miniconda3/pkgs/tb-profiler-4.4.2-pyh7cba7a3_0
appears to be corrupted. The path 'share/tbprofiler/tbdb.dr.json'
has an incorrect size.
  reported size: 5880496 bytes
  actual size: 3715551 bytes

SafetyError: The package for tb-profiler located at /home/neaehi/miniconda3/pkgs/tb-profiler-4.4.2-pyh7cba7a3_0
appears to be corrupted. The path 'share/tbprofiler/tbdb.mask.bed'
has an incorrect size.
  reported size: 19970 bytes
  actual size: 63153 bytes

SafetyError: The package for tb-profiler located at /home/neaehi/miniconda3/pkgs/tb-profiler-4.4.2-pyh7cba7a3_0
appears to be corrupted. The path 'share/tbprofiler/tbdb.variables.json'
has an incorrect size.
  reported size: 885 bytes
  actual size: 778 bytes

SafetyError: The package for tb-profiler located at /home/neaehi/miniconda3/pkgs/tb-profiler-4.4.2-pyh7cba7a3_0
appears to be corrupted. The path 'share/tbprofiler/tbdb.version.json'
has an incorrect size.
  reported size: 128 bytes
  actual size: 130 bytes
mdhfz89 commented 1 year ago

Oh! I tried running conda clean -a and removing the folder /home/neaehi/miniconda3/pkgs/tb-profiler-4.4.2-pyh7cba7a3_0.

After that i reinstalled the tb-profiler environment and it now works.

Thanks for the help!