Closed oschwengers closed 10 months ago
Hi @oschwengers ,
Very interesting - have you tried POLCA (and does it work for that)?
I've tested pypolca on hundreds of samples (well at least via Hybracter) and never come across this.
I'm happy to have a look at this but I will need the reads and assembly - george.bouras@adelaide.edu.au would be best.
George
Hi, no, I haven't tried the original POLCA yet. Weird enough, a 2nd run finished w/o any error at all. As I cannot exclude any unrelated side effects, I'll close this for now. If I face this sort of error in a reproducible way, I'll re-open this issue.
Sorry, for the rash issue. Oliver
Running into an error
**return ctx.invoke(self.callback, **ctx.params)
File "/home/nala0006/miniconda3/envs/hybracter/lib/python3.12/site-packages/hybracter/workflow/conda/ac7d25bd198f954837b82286b3741471_/lib/python3.10/site-packages/click/$ return _callback(*args, **kwargs) File "/home/nala0006/miniconda3/envs/hybracter/lib/python3.12/site-packages/hybracter/workflow/conda/ac7d25bd198f954837b82286b3741471/lib/python3.10/site-packages/click/$ return f(get_currentcontext(), *args, **kwargs) File "/home/nala0006/miniconda3/envs/hybracter/lib/python3.12/site-packages/hybracter/workflow/conda/ac7d25bd198f954837b82286b3741471/lib/python3.10/site-packages/pypolc$ create_report(vcf, assembly_temp, reportfile) File "/home/nala0006/miniconda3/envs/hybracter/lib/python3.12/site-packages/hybracter/workflow/conda/ac7d25bd198f954837b82286b3741471/lib/python3.10/site-packages/pypolc$ if int(parts[3]) == 0 and int(parts[5]) > 1: ValueError: invalid literal for int() with base 10: '80,44' ================================================================================**
Hi @oschwengers @npbhavya ,
This was definitely a bug in Pypolca after all.
What happened is that in writing the final report, if a line in the VCF had multiple alleles, then parts[5]
would be a non-integer like 80,44
and break line 38 in report.py
if int(parts[3]) == 0 and int(parts[5]) > 1:
I've added exception handling and it should be good to go now - please upgrade to v0.2.1.
George
Thanks @gbouras13 for taking care of this and for the quick fix! I'm very much looking forward to further test PyPOLCA.
Hi @gbouras13 , I just stumbled over this error polishing 4 genomes. For 1 genome I get a Python
ValueError
. Here the entire log:Haven't gone into the rabbit hole of VCF, but looks like https://github.com/gbouras13/pypolca/blob/b1d77e8e255e1cc5e2b4945bc57b34f4090a0927/src/pypolca/utils/report.py#L38C17-L38C61 is either catching the wrong ':' -separated field or it's currently unexpected that this field can have a list of values?
Unfortunately, I cannot take a deeper look into this myself right now, but at least, I wanted to let you know... Thanks and best regards