ruanjue / wtdbg2

Redbean: A fuzzy Bruijn graph approach to long noisy reads assembly
GNU General Public License v3.0
513 stars 94 forks source link

Illegal Instructions (core dumped) #162

Closed andrewdchen closed 4 years ago

andrewdchen commented 4 years ago

-- total memory 132027240.0 kB -- available 128903808.0 kB -- 24 cores -- Starting program: ./wtdbg2 -x ont -g14k -t4 -i /export/home/users/a.fasta.gz -fo /export/home/users/prefix -- pid 29129 -- date Thu Dec 12 01:22:28 2019

[Thu Dec 12 01:22:28 2019] loading reads 855 reads [Thu Dec 12 01:22:28 2019] filtering from 855 reads (>=5000 bp), 11749323 bp. Try selecting 700000 bpIllegal instruction (core dumped)

Hi! I'm not sure how to parse this error message, is it telling me that I need to find a smaller subset of my data?

ruanjue commented 4 years ago

Try selecting was the normal progress message, not suggestion. I am afraid there is a bug in wtdbg2. Could you send me the a.fasta.gz , I will debug it.

andrewdchen commented 4 years ago

a.fasta.gz

ruanjue commented 4 years ago

On my PC, the same command finished without any segfault. Please check the latest commit of wtdbg2, and try again.

andrewdchen commented 4 years ago

Hm, I tried the latest commit and still couldn't get it to work.

ruanjue commented 4 years ago

Because I cannot find anything abnormal on my PC, I am afraid I need your help on debuging it with gdb.

andrewdchen commented 4 years ago
(gdb) run -x ont -g14k -t4 -i ~/andrew/45S/a.fasta.gz -fo ~/andrew/45S/
Starting program: /export/home/users/sbatra/andrew/wtdbg2/wtdbg2 -x ont -g14k -t4 -i ~/andrew/45S/a.fasta.gz -fo ~/andrew/45S/
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff739f700 (LWP 14746)]
--
-- total memory      132027240.0 kB
-- available         129057328.0 kB
-- 24 cores
-- Starting program: /export/home/users/sbatra/andrew/wtdbg2/wtdbg2 -x ont -g14k -t4 -i /export/home/users/sbatra/andrew/45S/a.fasta.gz -fo /export/home/users/sbatra/andrew/45S
-- pid                     14742
-- date         Thu Jan  9 20:45:07 2020
--
[Thu Jan  9 20:45:07 2020] loading reads
[New Thread 0x7ffff4b9c700 (LWP 14747)]
[New Thread 0x7fffe9ff9700 (LWP 14748)]
[New Thread 0x7fffe97f8700 (LWP 14749)]
[New Thread 0x7fffe8ff7700 (LWP 14750)]
[New Thread 0x7fffe87f6700 (LWP 14751)]
0[Thread 0x7ffff4b9c700 (LWP 14747) exited]
[Thread 0x7fffe9ff9700 (LWP 14748) exited]
[Thread 0x7fffe97f8700 (LWP 14749) exited]
[Thread 0x7fffe8ff7700 (LWP 14750) exited]
[Thread 0x7fffe87f6700 (LWP 14751) exited]
855 reads
[Thu Jan  9 20:45:07 2020] filtering from 855 reads (>=5000 bp), 11749323 bp. Try selecting 700000 bp
Thread 1 "wtdbg2" received signal SIGILL, Illegal instruction.
0x0000555555566d70 in filter_reads_kbm (kbm=0x5555557bb080, retain_size=700000, strategy=0) at kbm.h:444
444                             sort_array(kbm->reads->buffer, kbm->reads->size, kbm_read_t, num_cmpgt(b.bincnt, a.bincnt));
ruanjue commented 4 years ago

I guess it may be caused by wrongly interpretion from compiler, but very not sure. Please have a try with the latest commit https://github.com/ruanjue/wtdbg2/commit/5ef0a667ade1c309e7a18c7499f52c90b24e1ed9 .

andrewdchen commented 4 years ago

Hi ruan, I'm not sure what happened but ./wtdbg2 now works! However, now I'm running into an issue with ./wtpoa-cns.

-- total memory      264137824.0 kB
-- available         253509920.0 kB
-- 32 cores
-- Starting program: ./wtpoa-cns -t 4 -i /export/home/users/sbatra/andrew/all_nanopore_reads/45S/wtdbg2_default/prefix.ctg.lay.gz -fo /export/home/users/sbatra/andrew/all_nanopore_reads/45S/wtdbg2_default/prefix.ctg.fa
-- pid                     21916
-- date         Fri Jan 10 17:28:36 2020
--
 ** WARNNING: input file is not in gzip format **
0 contigs 0 edges 0 bases
** PROC_STAT(TOTAL) **: real 0.102 sec, user 0.000 sec, sys 0.010 sec, maxrss 4200.0 kB, maxvsize 384992.0 kB
---
ruanjue commented 4 years ago

Fixed, please try https://github.com/ruanjue/wtdbg2/commit/f92d9b1193e9166270d782fbd43b47ab07e8ee25 . If you are assembling 14k genome, please set -X to a larger value, like -g14k -X10000 to select more than one read. You know, wtdbg2 cannot assemble one read into a contig.

andrewdchen commented 4 years ago

Hi Ruan, Even with a larger -X value, -X10000 ./wtpoa returns a fasta file with 0 contigs.

-- Starting program: ./wtpoa-cns -t 4 -i /export/home/users/sbatra/andrew/all_nanopore_reads/45S/wtdbg2_default/prefix.ctg.lay.gz -fo /export/home/users/sbatra/andrew/all_nanopore_reads/45S/wtdbg2_default/prefix.ctg.fa
-- pid                     31331
-- date         Sat Jan 11 20:50:10 2020
--
0 contigs 0 edges 0 bases
** PROC_STAT(TOTAL) **: real 0.103 sec, user 0.000 sec, sys 0.020 sec, maxrss 2168.0 kB, maxvsize 382680.0 kB
---
ruanjue commented 4 years ago

-g14k -X1000 -e 2, your sequences might not acutally only 14kb.

andrewdchen commented 4 years ago

Thanks, after using -g14k -X1000 -e 2 I get a contig of length 49kb. If I know the actual contig length should be roughtly 14kb long, what things could I change? Since this is unrelated to the first issue, feel free to close this issue.