metaGmetapop / metapop

A pipeline for the macro- and micro-diversity analyses and visualization of metagenomic-derived populations
MIT License
37 stars 10 forks source link

FileNotFoundError ... _initial.bam.bai #32

Closed funnell closed 8 months ago

funnell commented 8 months ago

Hello, I'm running metapop like this:

metapop --input_samples samples/1546A/ --reference reference/ --genes genome_catalogs/votus_hq_plus.faa.gz --no_macro --threads 4 --min_len 75

and getting the below error:

multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/lila/home/funnellt/mambaforge/envs/metapop/lib/python3.7/multiprocessing/pool.py", line 121, in worker
    result = (True, func(*args, **kwds))
  File "/lila/home/funnellt/mambaforge/envs/metapop/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/lila/home/funnellt/mambaforge/envs/metapop/lib/python3.7/site-packages/metapop/metapop_filter.py", line 544, in fill_mdz
    os.remove(file+".bai")
FileNotFoundError: [Errno 2] No such file or directory: './MetaPop/02.Filtered_Samples/1546A_initial.bam.bai'
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/lila/home/funnellt/mambaforge/envs/metapop/bin/metapop", line 8, in <module>
    sys.exit(main())
  File "/lila/home/funnellt/mambaforge/envs/metapop/lib/python3.7/site-packages/metapop/metapop_main.py", line 297, in main
    metapop.metapop_filter.filt(original_bams, filter_command_base, bdb, threads, mag_contig_dict, mag_length_dict, joined_fastas)
  File "/lila/home/funnellt/mambaforge/envs/metapop/lib/python3.7/site-packages/metapop/metapop_filter.py", line 102, in filt
    md_filled = pool.map(fill_mdz, md_files)
  File "/lila/home/funnellt/mambaforge/envs/metapop/lib/python3.7/multiprocessing/pool.py", line 268, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/lila/home/funnellt/mambaforge/envs/metapop/lib/python3.7/multiprocessing/pool.py", line 657, in get
    raise self._value
funnell commented 8 months ago

I think this was caused by using the wrong version of samtools.