I'm trying to generate to simulated PE reads from the wheat reference genome using BBTools randomreads.sh and I keep receiving the following error message within a few seconds:
Exception in thread "main" java.lang.ArithmeticException: / by zero at align2.RandomReads3.fillRandomChrom(RandomReads3.java:1823) at align2.RandomReads3.<init>(RandomReads3.java:606) at align2.RandomReads3.<init>(RandomReads3.java:599) at align2.RandomReads3.main(RandomReads3.java:409)
The commands I am using are:
randomreads.sh ref=refgenome.fa.gz out1=gen_R1.fq out2=gen_R2.fq length=100 reads=2000 paired=t
Interestingly, the error appears to only affect the wheat genome. I've tried with both the full reference and several subgenomic sequences and receive the same error. When I try the same commands with tobacco and coffee genomes the program works beautifully. I've inspected the head of the reference genome files from all genomes and I see no differences in their format.
Can anyone provide any insight into this interesting error?