PPanGGOLiN icon indicating copy to clipboard operation
PPanGGOLiN copied to clipboard

TypeError: Population must be a sequence. For dicts or sets, use sorted(d).

Open ericolo opened this issue 1 year ago • 3 comments

Hi !

I get this error and I can't debug why it happens, the input files look good to me

TypeError: Population must be a sequence. For dicts or sets, use sorted(d).

I'm using ppanggolin like this: ppanggolin workflow --anno list_genomes.tsv -c 64 -o output --clusters clusters.tsv --infer_singletons --rarefaction

Thanks in advance ! Eric

ericolo avatar Oct 20 '24 22:10 ericolo

Hi !

Any chance you could provide the complete log? It's nearly impossible to identify the location of the problem without the full trace (which should be in the log file where this error is written) with something as generic as this kind of error.

Adelme

axbazin avatar Oct 21 '24 11:10 axbazin

Hello,

Sorry for the very little info, this is the log file obtained on that run: debug_log.txt

And here is the complete error message: error.txt

Thanks !

ericolo avatar Oct 21 '24 21:10 ericolo

I see, thanks a lot !

This is definitely a bug, and I think it's related to having exactly the number of genomes that you have in your run here (501?). In the meantime, until we resolve this, I believe that increasing the chunk_size in the "partition" step might fix this error.

axbazin avatar Oct 22 '24 07:10 axbazin

Indeed if I remove one genome from the list it works fine, haven't tried the chunk_size yet.

ericolo avatar Oct 31 '24 00:10 ericolo

Hi,

Sorry for the delay.

This bug was resolved in PR #273 and released in version 2.1.2: https://github.com/labgem/PPanGGOLiN/releases/tag/2.1.2.

Updating your PPanGGOLiN version should fix this bug.

Best,
Jean

JeanMainguy avatar Feb 06 '25 18:02 JeanMainguy