tseemann / nullarbor

:floppy_disk: :page_with_curl: "Reads to report" for public health and clinical microbiology
GNU General Public License v2.0
136 stars 37 forks source link

Illegal division by zero at .../miniconda3/bin/fq line 67, <$IN> line 154 #244

Closed sharbie88 closed 4 years ago

sharbie88 commented 4 years ago

update ... nullarbor now installed: /home/sharb/miniconda3/pkgs/nullarbor-2.0.20191013-1

nullarbor.pl --check was good - medal received.

make preview resulted in the error

Illegal division by zero at /home/sharb/miniconda3/bin/fq line 67, <$IN> line 154.
make: *** [Makefile:136: PC0116-S0116/yield.tab] Error 2
make: *** Deleting file 'PC0116-S0116/yield.tab'

I've attached the .log file and output to terminal window that includes the error. Thank you.

nullarbor.log

191111_9_previewoutput.txt

tseemann commented 4 years ago
[20:58:03] Using reference genome: /home/sharb/Documents/GenbankrefgenomesSaureus/NZ_CP012976.1.fasta

....

fq --ref ref.fa PC0116-S0116/R1.fq.gz PC0116-S0116/R2.fq.gz > PC0116-S0116/yield.tab
[fq] running command: cat PC0116-S0116/R1.fq.gz PC0116-S0116/R2.fq.gz | seqtk fqchk -q0 -
[fq] processed 2322128 reads.
[fq] calculating depth, using size  (via --ref ref.fa)
Illegal division by zero at /home/sharb/miniconda3/bin/fq line 67, <$IN> line 154.

For some reason your ref.fa (reference) is empty or 0 bytes long.

What do these commands say?

% ls -lsa  /home/sharb/Documents/Nullarbor/191111_9list/ref.fa
% ls -lsa  /home/sharb/Documents/GenbankrefgenomesSaureus/NZ_CP012976.1.fasta
sharbie88 commented 4 years ago

I checked the reference file, NZ_CP012976.1, and it's 2.8MB. Repeated make preview and same result :

Illegal division by zero at /home/sharb/miniconda3/bin/fq line 67, <$IN> line 154.
make: *** [Makefile:136: PN0123-S0317/yield.tab] Error 2
make: *** Deleting file 'PN0123-S0317/yield.tab'

then, as per your instructions above:

sharb@sharb-Latitude-5490:~$ ls -lsa /home/sharb/Documents/Nullarbor/191111_9list/ref.fa
ls: cannot access '/home/sharb/Documents/Nullarbor/191111_9list/ref.fa': No such file or directory
sharb@sharb-Latitude-5490:~$ ls -lsa /home/sharb/Documents/GenbankrefgenomesSaureus/NZ_CP012976.1.fasta 
2724 -rw-rw-r-- 1 sharb sharb 2789179 Nov 11 17:31 /home/sharb/Documents/GenbankrefgenomesSaureus/NZ_CP012976.1.fasta
tseemann commented 4 years ago

Nullarbor converts/sanitizes your --ref and puts it in --outdir / ref.fa You don't have a ref.fa (assuming 91111_9list was your --outdir ?) Can you go into your nullabor folder and type make ref.fa ?

sharbie88 commented 4 years ago

Perfect. That worked thanks Torsten! Do I have to manually make ref.fa each run?

Maybe if I do an 'actual' rather than 'preview' mode run, the ref.fa will be created automatically?

tseemann commented 4 years ago

It should have been done automatically. I have no idea why it didn't for you. In future you can just type make ref.fa preview and it should ensure both are done.