PopPUNK icon indicating copy to clipboard operation
PopPUNK copied to clipboard

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

Open DOH-JDJ0303 opened this issue 1 year ago • 1 comments

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.

DOH-JDJ0303 avatar Oct 23 '24 18:10 DOH-JDJ0303

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?

johnlees avatar Oct 25 '24 07:10 johnlees