bacpop / PopPUNK

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

Error generating tuples in distance QC #181

Closed jdaeth274 closed 3 years ago

jdaeth274 commented 3 years ago

Versions PopPUNK v2.4.4 PopPUNK-sketch v1.7.0

Command used and output returned

 python /home/github_packages/PopPUNK/poppunk-runner.py --create-db \
  --r-files acba_poppunk_narrow.txt --output acba_cpu --overwrite --min-k 15 \
  --max-k 30 --k-step 3 --qc-filter prune --threads 32 \
  --type-isolate GCA_009759685 --length-sigma 2 \
  --max-pi-dist 0.03 --max-a-dist 0.8

The error message:

Traceback (most recent call last):
  File "/home/github_packages/PopPUNK/poppunk-runner.py", line 10, in <module>
    main()
  File "/home/github_packages/PopPUNK/PopPUNK/__main__.py", line 333, in main
    seq_names_passing, distMat = qcDistMat(distMat,
  File "/home/github_packages/PopPUNK/PopPUNK/utils.py", line 294, in qcDistMat
    long_edges = poppunk_refine.generateTuples(long_distance_rows,
TypeError: generateTuples(): incompatible function arguments. The following argument types are supported:
    1. (assignments: List[int], within_label: int) -> List[Tuple[int, int]]

Describe the bug When creating the distance sketches, poppunk gets past the initial prop N QC then appears to fail at the distance QC step.

nickjcroucher commented 3 years ago

Thanks - unfortunately, I'm struggling to reproduce this - can you do a local reinstall of popunk_refine by removing the existing compiled code, which can be located through:

import poppunk_refine
poppunk_refine.__file__

Then install through conda, or remake the local install with:

rm -rf build
python setup.py build
python setup.py install

Can you let me know if that changes anything?

jdaeth274 commented 3 years ago

Thanks Nick, that's sorted it out now, previously I was using poppunk_refine v2.2.0, updating appears to have fixed it