You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting an error when I try to run ppanggolin msa with --partition all:
2024-03-20 17:46:53 writeMSA.py:l214 INFO Computing the MSA ...
Traceback (most recent call last):
File "/home/username/.conda/envs/ppanggolin-2.0.4/bin/ppanggolin", line 10, in <module>
sys.exit(main())
File "/home/username/.conda/envs/ppanggolin-2.0.4/lib/python3.10/site-packages/ppanggolin/main.py", line 197, in main
ppanggolin.formats.writeMSA.launch(args)
File "/home/username/.conda/envs/ppanggolin-2.0.4/lib/python3.10/site-packages/ppanggolin/formats/writeMSA.py", line 348, in launch
write_msa_files(pangenome, args.output, cpu=args.cpu, partition=args.partition, tmpdir=args.tmpdir,
File "/home/username/.conda/envs/ppanggolin-2.0.4/lib/python3.10/site-packages/ppanggolin/formats/writeMSA.py", line 325, in write_msa_files
compute_msa(families, outdir, cpu=cpu, tmpdir=tmpdir, source=source, use_gene_id=use_gene_id, code=code,
File "/home/username/.conda/envs/ppanggolin-2.0.4/lib/python3.10/site-packages/ppanggolin/formats/writeMSA.py", line 215, in compute_msa
bar = tqdm(range(len(families)), unit="family", disable=disable_bar)
TypeError: object of type 'generator' has no len()
I think the issue might be that when you use the all partition, the gene families are a generator in get_families_to_write. But for any non-all partition (ex. core), the gene families are a set:
I'm getting an error when I try to run
ppanggolin msa
with--partition all
:I think the issue might be that when you use the
all
partition, the gene families are a generator inget_families_to_write
. But for any non-all partition (ex.core
), the gene families are a set:PPanGGOLiN/ppanggolin/formats/writeMSA.py
Lines 57 to 61 in 9e9acdf
Which then fails when it tries to call the
len
method on a generator incompute_msa
:PPanGGOLiN/ppanggolin/formats/writeMSA.py
Line 213 in 9e9acdf
If I change the return value to a set in
get_families_to_write
, it seems to work!Is this a reproducible error for other users, and does this solution seem feasible? Thanks!
The text was updated successfully, but these errors were encountered: