BBTools
BBTools copied to clipboard
`RandomReadsMG.sh` generates ONT reads shorter than `minlen`
Hello,
When generating ONT reads with RandomReadsMG.sh, I found that some of the generated reads are shorter than the value specified by the minlen parameter.
I suspect this is due to the exponential component of the distribution used for the long-tail portion of the ONT read length distribution.
In RandomReadsMG.java, the generateONTLength method correctly applies minLength to the log-normal "core" distribution but not to the exponential "heavy tail" distribution.
The fix should be relatively straightforward, just enforcing minLength in the return statement for the exponential tail branch.