bacpop / PopPUNK

PopPUNK 👨‍🎤 (POPulation Partitioning Using Nucleotide Kmers)
https://www.bacpop.org/poppunk
Apache License 2.0
92 stars 19 forks source link

.dist.npy needed by `poppunk --qc-db` #334

Open DOH-JDJ0303 opened 1 day ago

DOH-JDJ0303 commented 1 day ago

Versions poppunk v2.7.0

Command used and output returned Command: poppunk --qc-db --ref-db test6 Output:

PopPUNK (POPulation Partitioning Using Nucleotide Kmers)
        (with backend: sketchlib v2.1.1
         sketchlib: /root/micromamba/envs/poppunk/lib/python3.10/site-packages/pp_sketchlib.cpython-310-x86_64-linux-gnu.so)

Graph-tools OpenMP parallelisation enabled: with 1 threads
Traceback (most recent call last):
  File "/root/micromamba/envs/poppunk/bin/poppunk", line 11, in <module>
    sys.exit(main())
  File "/root/micromamba/envs/poppunk/lib/python3.10/site-packages/PopPUNK/__main__.py", line 420, in main
    refList, queryList, self, distMat = readPickle(distances, enforce_self=True)
  File "/root/micromamba/envs/poppunk/lib/python3.10/site-packages/PopPUNK/utils.py", line 193, in readPickle
    X = np.load(pklName + ".npy")
  File "/root/micromamba/envs/poppunk/lib/python3.10/site-packages/numpy/lib/npyio.py", line 405, in load
    fid = stack.enter_context(open(os_fspath(file), "rb"))
FileNotFoundError: [Errno 2] No such file or directory: 'test6/test6.dists.npy'

Describe the bug poppunk --db-qc requires the .dist.npy file. PopPUNK v2.7.0 no longer outputs this file when updating a database using poppunk_assign.

johnlees commented 1 hour ago

The intended use of db-qc is after a new database has been created, we would expect QC to be run as part of poppunk_assign not separately. Is this not possible due to #335?