Malfoy / BWISE

de Bruijn Workflow using Integral information of Short pair End reads
13 stars 2 forks source link

ZeroDivisionError: division by zero #2

Open KamilSJaron opened 7 years ago

KamilSJaron commented 7 years ago

Hi, I run BWISE (commit cac2d0) with minimal command bwise -x Sm2.trim.norm.180.all.fastq -t 32 and it crushed.

Std out:

2
Reads Correction
Graph construction 0
Read mapping on the graph 0
Graph construction 1
Read mapping on the graph 1
Graph construction 2
Read mapping on the graph 2
Graph construction 3
Read mapping on the graph 3
Graph construction 4
Read mapping on the graph 4
SuperReads Compactions
The end

Error log:

mkdir: cannot create directory `.': File exists
sh: line 1: 74736 Segmentation fault      (core dumped) /scratch/beegfs/monthly/kjaron/src/BWISE/bin/numbersFilter paths 2 2 > cleanedPaths 2>> logs/logBgreat
SR load super reads 
SR add reverse complements 0
sorting 0
remove inclusions 0
Traceback (most recent call last):
  File "/scratch/beegfs/monthly/kjaron/src/BWISE/bin/K2000.py", line 232, in <module>
    main()  
  File "/scratch/beegfs/monthly/kjaron/src/BWISE/bin/K2000.py", line 204, in main
    SR=remove_strict_inclusions(SR)
  File "/scratch/beegfs/monthly/kjaron/src/BWISE/bin/K2000.py", line 72, in remove_strict_inclusions
    sys.stderr.write("Removing inclusions, "+str(checked)+" checked. Size SR "+str(len(SR))+" %.2f"%(100*checked/len(SR))+"%\n")
ZeroDivisionError: division by zero
Print GFA Nodes
        100.00% -- 0 error(s)
Print GFA Edges
        100.00%
Malfoy commented 7 years ago

Hi, Your paths file seemed to be empty which is strange. The error should not happen again, but your assembly may be empty. What kind of data are you using ?

KamilSJaron commented 7 years ago

The path to file definitely exist.

However, I found probably the problem. I specified interleaved pe reads, but I used merged single end reads.

KamilSJaron commented 7 years ago

I reinstalled bwise and rerun the assembly using -u instead of -x for read file specification. It ended up with completely same error. When I looked in logs, I think that bgreat is the step when stuff breaks up:

(some more stuff)
...
Reads : 63152470
Not anchored : 12365055 Percent : 19.5797
Anchored and aligned : 47493527 Percent : 93.5144
Anchored but not aligned : 3293888 Percent : 6.48564
Reads/seconds : 513434
Mapping in seconds : 122
Super reads : 0
Indexing in seconds : 1409
reads_corrected.fa
The End
Reads : 63152470
Not anchored : 45696954 Percent : 72.3597
Anchored and aligned : 16983569 Percent : 97.2963
Anchored but not aligned : 471947 Percent : 2.70371
Reads/seconds : 521921
Mapping in seconds : 120
Super reads : 0
Indexing in seconds : 1410
reads_corrected.fa
The End
Reads : 63152470
Not anchored : 63152470 Percent : 100
Anchored and aligned : 0 Percent : -nan
Anchored but not aligned : 0 Percent : -nan
Reads/seconds : 493378
Mapping in seconds : 127
Super reads : 0
Malfoy commented 7 years ago

What is the length of your reads ?

KamilSJaron commented 7 years ago

That is bit more complicated. It is 180bp insert size library pair end sequenced. Then the pair end reads were merged therefore read length is up to 180, but smaller in many cases.

Malfoy commented 7 years ago

Ok the third phase use a k of 150 this should explain why the mapping could not work. You should try to put the kmax argument to 100 for example and BWISE should work normally.

KamilSJaron commented 7 years ago

I tried to set k to 120 (almost all reads are longer that 120) and I got completely same error...

jflot commented 6 years ago

I believe that this problem should now be solved given the improvements in the BWISE code in the latest months. Do you still encounter this problem?