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

samtools error in tb-profiler v6.3.0 #382

Open moks-micro opened 1 month ago

moks-micro commented 1 month ago

Hi Jody, we just tried to install tb-profiler v6.3.0 and there is an error with samtools when running. Can you take a look at this?

Thanks! Simone

[09:55:28] INFO Mapping to reference genome fastq.py:53 Calling variants: 0%| | 0/73 [00:00<?, ?it/s][09:59:15] ERROR samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libtinfow.so.6: no version information utils.py:497 available (required by samtools)
samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libncursesw.so.6: no version information
available (required by samtools)
samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libncursesw.so.6: no version information
available (required by samtools)
[samclip] samclip 0.4.0 by Torsten Seemann (@torstenseemann)
[samclip] Loading: /opt/miniconda3/envs/tbprofiler6.3.0/share/tbprofiler//tbdb.fasta.fai
[samclip] Found 1 sequences in /opt/miniconda3/envs/tbprofiler6.3.0/share/tbprofiler//tbdb.fasta.fai
[samclip] Total SAM records 129, removed 8, allowed 3, passed 121
[samclip] Header contained 20 lines
[samclip] Done.
samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libtinfow.so.6: no version information
available (required by samtools)
samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libncursesw.so.6: no version information
available (required by samtools)
samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libncursesw.so.6: no version information
available (required by samtools)
samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libtinfow.so.6: no version information
available (required by samtools)
samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libncursesw.so.6: no version information
available (required by samtools)
samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libncursesw.so.6: no version information
available (required by samtools)
bcftools: error while loading shared libraries: libgsl.so.25: cannot open shared object file: No such
file or directory

Calling variants: 0%| | 0/73 [00:00<?, ?it/s] Traceback (most recent call last): File "/opt/miniconda3/envs/tbprofiler6.3.0/bin/tb-profiler", line 636, in args.func(args) File "/opt/miniconda3/envs/tbprofiler6.3.0/bin/tb-profiler", line 117, in main_profile variants_profile = pp.run_profiler(args) File "/opt/miniconda3/envs/tbprofiler6.3.0/lib/python3.10/site-packages/pathogenprofiler/cli.py", line 195, in run_profiler get_vcf_file(args) File "/opt/miniconda3/envs/tbprofiler6.3.0/lib/python3.10/site-packages/pathogenprofiler/cli.py", line 177, in get_vcf_file args.vcf = get_vcf_from_bam(args) File "/opt/miniconda3/envs/tbprofiler6.3.0/lib/python3.10/site-packages/pathogenprofiler/cli.py", line 152, in get_vcf_from_bam vcf_obj = bam.call_variants(conf["ref"], caller=args.caller, filters = conf['variant_filters'], bed_file=conf["bed"], threads=args.threads, calling_params=args.calling_params, samclip = args.samclip, cli_args=vars(args)) File "/opt/miniconda3/envs/tbprofiler6.3.0/lib/python3.10/site-packages/pathogenprofiler/bam.py", line 123, in call_variants return caller.call_variants() File "/opt/miniconda3/envs/tbprofiler6.3.0/lib/python3.10/site-packages/pathogenprofiler/variant_calling.py", line 99, in call_variants return self.run_calling(self.calling_cmd) File "/opt/miniconda3/envs/tbprofiler6.3.0/lib/python3.10/site-packages/pathogenprofiler/variant_calling.py", line 68, in run_calling run_cmd_parallel_on_genome(self.calling_cmd,self.ref_file,bed_file = self.bed_file,threads=self.threads,desc="Calling variants") File "/opt/miniconda3/envs/tbprofiler6.3.0/lib/python3.10/site-packages/pathogenprofiler/utils.py", line 144, in run_cmd_parallel_on_genome results = [r for r in tqdm(parallel(delayed(genome_job)(cmd,r) for r in regions),total=len(regions),desc=desc)] File "/opt/miniconda3/envs/tbprofiler6.3.0/lib/python3.10/site-packages/pathogenprofiler/utils.py", line 144, in results = [r for r in tqdm(parallel(delayed(genome_job)(cmd,r) for r in regions),total=len(regions),desc=desc)] File "/opt/miniconda3/envs/tbprofiler6.3.0/lib/python3.10/site-packages/tqdm/std.py", line 1181, in iter for obj in iterable: File "/opt/miniconda3/envs/tbprofiler6.3.0/lib/python3.10/site-packages/joblib/parallel.py", line 1847, in _get_sequential_output res = func(*args, **kwargs) File "/opt/miniconda3/envs/tbprofiler6.3.0/lib/python3.10/site-packages/pathogenprofiler/utils.py", line 85, in genome_job out = run_cmd(cmd) File "/opt/miniconda3/envs/tbprofiler6.3.0/lib/python3.10/site-packages/pathogenprofiler/utils.py", line 498, in run_cmd raise ValueError("Command Failed:\n%s\nstderr:\n%s" % (cmd,result.stderr.decode())) ValueError: Command Failed: /bin/bash -c set -o pipefail; samtools view -T /opt/miniconda3/envs/tbprofiler6.3.0/share/tbprofiler//tbdb.fasta -h /mnt/imrl/Analysis/Yearly_Runs/2024/Run_23_Test/Scripts/37e48eed-3ed7-4d37-947e-05a9cac1921c.bam Chromosome:1-1524 | samclip --ref /opt/miniconda3/envs/tbprofiler6.3.0/share/tbprofiler//tbdb.fasta | samtools view -b > 906b5e35-e539-4112-a03f-748babbde5d0.Chromosome_1_1524.tmp.bam && samtools index 906b5e35-e539-4112-a03f-748babbde5d0.Chromosome_1_1524.tmp.bam && freebayes -f /opt/miniconda3/envs/tbprofiler6.3.0/share/tbprofiler//tbdb.fasta -r Chromosome:1-1524 --haplotype-length -1 906b5e35-e539-4112-a03f-748babbde5d0.Chromosome_1_1524.tmp.bam | bcftools norm -f /opt/miniconda3/envs/tbprofiler6.3.0/share/tbprofiler//tbdb.fasta -Oz -o 906b5e35-e539-4112-a03f-748babbde5d0.Chromosome_1_1524.vcf.gz stderr: samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libtinfow.so.6: no version information available (required by samtools) samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libncursesw.so.6: no version information available (required by samtools) samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libncursesw.so.6: no version information available (required by samtools) [samclip] samclip 0.4.0 by Torsten Seemann (@torstenseemann) [samclip] Loading: /opt/miniconda3/envs/tbprofiler6.3.0/share/tbprofiler//tbdb.fasta.fai [samclip] Found 1 sequences in /opt/miniconda3/envs/tbprofiler6.3.0/share/tbprofiler//tbdb.fasta.fai [samclip] Total SAM records 129, removed 8, allowed 3, passed 121 [samclip] Header contained 20 lines [samclip] Done. samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libtinfow.so.6: no version information available (required by samtools) samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libncursesw.so.6: no version information available (required by samtools) samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libncursesw.so.6: no version information available (required by samtools) samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libtinfow.so.6: no version information available (required by samtools) samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libncursesw.so.6: no version information available (required by samtools) samtools: /opt/miniconda3/envs/tbprofiler6.3.0/bin/../lib/libncursesw.so.6: no version information available (required by samtools) bcftools: error while loading shared libraries: libgsl.so.25: cannot open shared object file: No such file or directory

Cleaning up after failed run [09:59:16] ERROR tb-profiler:75

jodyphelan commented 1 month ago

hmm can you send the output of conda list?

moks-micro commented 1 month ago

conda_list.txt