Closed carsonhh closed 1 year ago
I have this issue as well when building 'rodents' using nhmmr with dfam
"Illegal division by zero at /home/###/###/###/###/RepeatMasker/RepeatMasker line 8162,
Using the suggested code fix at line 8141 suggested by carsonhh also fixed the issue at line 8141
Indeed this is a bug and the fix suggested by carsonhh is correct. I will be releasing a patch to this shortly.
This has been fixed in RepeatMasker 4.1.5, released today.
RepeatMasker version 4.1.4 Dfam version 3.7 Error occurs whenever -species is set to a node near the base of the tree, i.e. 'cellular organism'
Example command -->
RepeatMasker contig.fa -species 'cellular organism' -dir output
Error -->
Illegal division by zero at RepeatMasker line 8162
When generating thresholds from the 'preThresh' files, the regular expression used to parse the file on line 8141 fails to account for negative numbers
So a line like this in the preThresh file under the cache directory generates a failure -->
STATS LOCAL FORWARD -4.5297 0.70202
Changing the regular expression used on RepeatMasker line 8141 fixes the issue
Also when using Dfam together with option -species of 'root' or 'all' cause the program to fail with -->
Species "root" is not known to RepeatMasker
Example command -->
RepeatMasker contig.fa -species 'root' -dir output
This is inconsistent with the alternate behavior when using RepeatMasker with RepBase where 'root' and 'all' both function just fine. Note that 'root' is valid for NCBI taxonomy.
Fix the issue by changing RepeatMasker line 7718 from this -->
if ( $lineage eq "") {
To this -->
if ( $lineage eq "" && $species ne 'root' && $species ne 'all') {