Failure of `panaroo-merge` with `-a core`
Closed this issue · 3 comments
I was trying to run panaroo-merge
with -a core
to generate output for Pyseer.
panaroo-merge -d [lots of directories here] -o results -t 32 -a core
However, it failed at the final stage with the following error:
Traceback (most recent call last):
File "/usr/local/bin/panaroo-merge", line 10, in <module>
sys.exit(main())
File "/usr/local/lib/python3.10/site-packages/panaroo/merge_graphs.py", line 566, in main
merge_graphs(directories=args.directories,
File "/usr/local/lib/python3.10/site-packages/panaroo/merge_graphs.py", line 422, in merge_graphs
generate_core_genome_alignment(G, temp_dir, output_dir, n_cpu, alr,
TypeError: generate_core_genome_alignment() missing 1 required positional argument: 'hc_threshold'
If I am not mistaken, it seems to be relevant to the following lines which only passing 9 arguments to the function:
panaroo/panaroo/merge_graphs.py
Lines 422 to 424 in 18d7c9d
While the function is expecting 10:
panaroo/panaroo/generate_output.py
Lines 433 to 435 in 18d7c9d
As the arguments are positional instead of keyword, the actual problematic arguments should be core
in merge_graphs.py
vs threshold
+ codons
in generate_output.py
, instead of hc_threshold
is missing.
Thanks, and I hope there will be a fix for it soon!
Hi Harry,
Thanks for flagging this. It looks like the alignment code from panaroo-merge hasn't been updated to include the production of a filtered core alignment, which is causing this error.
This should be a quick fix, but depending on how you've installed panaroo it might take a while to reach you. Given how long the merge is likely to take, the fastest thing to do is definitely to run the merge without the alignment as a first step, ie: panaroo-merge -d [lots of directories here] -o results -t 32
, and then run the core alignment separately on those results, with panaroo-msa -o results -t 32 -a core
. This has the added advantage of splitting it across two jobs, if you are running panaroo on a cluster with short runtime limits.
Let me know if any of this is unclear, or if there's anything else I can do to help!
Oh cool, did not know I could run the alignment separately.
I have already done the merge only before, was re-doing the whole thing just for the core alignment.
I will give it a try. Thanks!
Fixed with commit 7ef8576