Math error in Snakefile
cbirbes opened this issue · 2 comments
Hi,
I'm trying to use Dentist to gapclose some test data using randomly generated fasta sequence and low error long reads.
The provided dataset is working well on our SLURM cluster, but i can't work with my own data, having trouble with a math error :
`Updating job make_merge_config.
InputFunctionException in line 1279 of /work2/project/seqoccin/assemblies/gap_closing/tests/manual_tests/dentist/Snakefile:
Error:
ValueError: math domain error
Wildcards:
Traceback:
File "/work2/project/seqoccin/assemblies/gap_closing/tests/manual_tests/dentist/Snakefile", line 1282, in
File "/work2/project/seqoccin/assemblies/gap_closing/tests/manual_tests/dentist/Snakefile", line 614, in insertions_batches
~ `
I realised that line 614 in Snake file :
num_digits = int(ceil(log10(num_batches)))
num_batches = 0. And log10(0) stop the execution of the pipeline. Some solution to solves this ? (and why is num_batches 0 ?)
Thanks !!
Hi,
the reason for the error certainly is that DENTIST did not find any candidates for gap closing. This will lead to num_batches == 0
. Thanks for pointing out this cryptic error message. I will improve the error message accordingly.
Concerning your test, DENTIST currently uses daligner for the read mapping which is strangely insensitive when the error rate is low. This may explain that you ran into this situation. I am thinking about DENTIST v2 that allows for switching the aligner and uses minimap2 by default. This should solve the issue then.
Oh ! You're obviously right as my random sequence have a low number of gap. I will work on this !
Thanks