chhylp123 / hifiasm

Hifiasm: a haplotype-resolved assembler for accurate Hifi reads
MIT License
531 stars 87 forks source link

recalcate_window_advance(...) : Assertion `error != (unsigned int)-1' failed. #374

Open yukiteruono opened 1 year ago

yukiteruono commented 1 year ago

Hi, thanks for the great tool. I have assembled various genomes with hifiasm (ver.0.16.0-r369) and never had any errors. However, hifiasm (ver.0.18.2-r467) caused errors in some assemblies. I generated simulated HiFi reads from D. melanogaster genome (coverage=50) and tried to assemble it. hifiasm -l0 --n-hap 2 -o test00 -t 4 test00.fastq

This data was assembled by hifiasm (ver.0.16.0-r369) without error. Could you give me some advice? I'll attach the complete log below here.

Thank you.

Best regards, Ono

[M::ha_analyze_count] lowest: count[18] = 47117 [M::ha_analyze_count] highest: count[43] = 15102685 [M::ha_hist_line] 2: ****> 43261715 [M::ha_hist_line] 3: ***** 10404480 [M::ha_hist_line] 4: * 3734730 [M::ha_hist_line] 5: ***** 1654284 [M::ha_hist_line] 6: ** 854641 [M::ha_hist_line] 7: * 501710 [M::ha_hist_line] 8: 326763 [M::ha_hist_line] 9: 224235 [M::ha_hist_line] 10: 163030 [M::ha_hist_line] 11: 125847 [M::ha_hist_line] 12: 100624 [M::ha_hist_line] 13: 86214 [M::ha_hist_line] 14: 72169 [M::ha_hist_line] 15: 60639 [M::ha_hist_line] 16: 55334 [M::ha_hist_line] 17: 50521 [M::ha_hist_line] 18: 47117 [M::ha_hist_line] 19: 47533 [M::ha_hist_line] 20: 49237 [M::ha_hist_line] 21: 57979 [M::ha_hist_line] 22: 74584 [M::ha_hist_line] 23: 106758 [M::ha_hist_line] 24: * 166422 [M::ha_hist_line] 25: * 268403 [M::ha_hist_line] 26: 425954 [M::ha_hist_line] 27: 662581 [M::ha_hist_line] 28: ** 989774 [M::ha_hist_line] 29: 1433890 [M::ha_hist_line] 30: * 2023356 [M::ha_hist_line] 31: ** 2776102 [M::ha_hist_line] 32: ***** 3701786 [M::ha_hist_line] 33: **** 4791599 [M::ha_hist_line] 34: **** 6039386 [M::ha_hist_line] 35: * 7405366 [M::ha_hist_line] 36: ** 8833435 [M::ha_hist_line] 37: **** 10277358 [M::ha_hist_line] 38: ***** 11631396 [M::ha_hist_line] 39: * 12875078 [M::ha_hist_line] 40: **** 13881485 [M::ha_hist_line] 41: ***** 14600658 [M::ha_hist_line] 42: * 15008302 [M::ha_hist_line] 43: **** 15102685 [M::ha_hist_line] 44: * 14890821 [M::ha_hist_line] 45: ***** 14360967 [M::ha_hist_line] 46: ** 13572830 [M::ha_hist_line] 47: * 12565930 [M::ha_hist_line] 48: ***** 11339163 [M::ha_hist_line] 49: * 10079460 [M::ha_hist_line] 50: ** 8772540 [M::ha_hist_line] 51: ** 7476031 [M::ha_hist_line] 52: ** 6279095 [M::ha_hist_line] 53: ** 5136515 [M::ha_hist_line] 54: *** 4128433 [M::ha_hist_line] 55: ** 3264373 [M::ha_hist_line] 56: * 2537992 [M::ha_hist_line] 57: *** 1932865 [M::ha_hist_line] 58: ** 1444979 [M::ha_hist_line] 59: * 1060681 [M::ha_hist_line] 60: * 769314 [M::ha_hist_line] 61: ** 548990 [M::ha_hist_line] 62: * 384935 [M::ha_hist_line] 63: 269742 [M::ha_hist_line] 64: 187903 [M::ha_hist_line] 65: 132375 [M::ha_hist_line] 66: * 94862 [M::ha_hist_line] rest: *** 7996717 [M::ha_analyze_count] left: none [M::ha_analyze_count] right: none [M::ha_ft_gen] peak_hom: 43; peak_het: -1 [M::ha_ct_shrink::699.1793.39] ==> counted 2042524 distinct minimizer k-mers [M::ha_ft_gen::701.5443.38@20.628GB] ==> filtered out 2042524 k-mers occurring 215 or more times [M::ha_opt_update_cov] updated max_n_chain to 215 [M::yak_count] collected 572772101 minimizers [M::ha_pt_gen::1196.454*3.32] ==> counted 42818249 distinct minimizer k-mers [M::ha_pt_gen] count[4095] = 0 (for sanity check) [M::ha_analyze_count] lowest: count[19] = 7149 [M::ha_analyze_count] highest: count[42] = 650963 [M::ha_hist_line] 1: ****> 27040415 [M::ha_hist_line] 2: ****> 2685229 [M::ha_hist_line] 3: ****> 761470 [M::ha_hist_line] 4: ** 298867 [M::ha_hist_line] 5: ** 142885 [M::ha_hist_line] 6: **** 79061 [M::ha_hist_line] 7: **** 49110 [M::ha_hist_line] 8: * 34011 [M::ha_hist_line] 9: ** 24591 [M::ha_hist_line] 10: * 18964 [M::ha_hist_line] 11: 14832 [M::ha_hist_line] 12: 12782 [M::ha_hist_line] 13: 11108 [M::ha_hist_line] 14: 9440 [M::ha_hist_line] 15: 8496 [M::ha_hist_line] 16: 7769 [M::ha_hist_line] 17: 7402 [M::ha_hist_line] 18: 7212 [M::ha_hist_line] 19: 7149 [M::ha_hist_line] 20: 7174 [M::ha_hist_line] 21: 7553 [M::ha_hist_line] 22: 8448 [M::ha_hist_line] 23: 10090 [M::ha_hist_line] 24: 13621 [M::ha_hist_line] 25: 18717 [M::ha_hist_line] 26: 27304 [M::ha_hist_line] 27: ** 39798 [M::ha_hist_line] 28: * 56017 [M::ha_hist_line] 29: **** 78618 [M::ha_hist_line] 30: ***** 107902 [M::ha_hist_line] 31: ** 144151 [M::ha_hist_line] 32: * 188152 [M::ha_hist_line] 33: ***** 238776 [M::ha_hist_line] 34: * 295689 [M::ha_hist_line] 35: *** 357483 [M::ha_hist_line] 36: **** 417785 [M::ha_hist_line] 37: ** 478480 [M::ha_hist_line] 38: ** 534226 [M::ha_hist_line] 39: * 581632 [M::ha_hist_line] 40: *** 617345 [M::ha_hist_line] 41: ** 641028 [M::ha_hist_line] 42: **** 650963 [M::ha_hist_line] 43: ** 644976 [M::ha_hist_line] 44: 631112 [M::ha_hist_line] 45: **** 599503 [M::ha_hist_line] 46: ** 558799 [M::ha_hist_line] 47: ** 509426 [M::ha_hist_line] 48: ** 456375 [M::ha_hist_line] 49: ** 400726 [M::ha_hist_line] 50: ***** 345578 [M::ha_hist_line] 51: * 291207 [M::ha_hist_line] 52: *** 241974 [M::ha_hist_line] 53: ** 195690 [M::ha_hist_line] 54: **** 157238 [M::ha_hist_line] 55: * 122820 [M::ha_hist_line] 56: **** 95405 [M::ha_hist_line] 57: 72662 [M::ha_hist_line] 58: **** 54022 [M::ha_hist_line] 59: ** 40185 [M::ha_hist_line] 60: ** 29565 [M::ha_hist_line] 61: 21815 [M::ha_hist_line] 62: 15877 [M::ha_hist_line] 63: 11997 [M::ha_hist_line] 64: 9184 [M::ha_hist_line] 65: 7410 [M::ha_hist_line] 66: 6427 [M::ha_hist_line] 67: 5776 [M::ha_hist_line] 68: 5357 [M::ha_hist_line] 69: 5406 [M::ha_hist_line] 70: 5564 [M::ha_hist_line] 71: 5865 [M::ha_hist_line] 72: 6391 [M::ha_hist_line] 73: 6875 [M::ha_hist_line] 74: 7578 [M::ha_hist_line] 75: 8400 [M::ha_hist_line] 76: 8886 [M::ha_hist_line] 77: 9619 [M::ha_hist_line] 78: 10266 [M::ha_hist_line] 79: 10748 [M::ha_hist_line] 80: 11337 [M::ha_hist_line] 81: 11576 [M::ha_hist_line] 82: 12175 [M::ha_hist_line] 83: 12514 [M::ha_hist_line] 84: 12746 [M::ha_hist_line] 85: 12795 [M::ha_hist_line] 86: 12619 [M::ha_hist_line] 87: 12651 [M::ha_hist_line] 88: 12318 [M::ha_hist_line] 89: 11961 [M::ha_hist_line] 90: 11434 [M::ha_hist_line] 91: 10847 [M::ha_hist_line] 92: 10190 [M::ha_hist_line] 93: 9692 [M::ha_hist_line] 94: 9064 [M::ha_hist_line] 95: 8335 [M::ha_hist_line] 96: 7655 [M::ha_hist_line] 97: 6996 [M::ha_hist_line] 98: 6372 [M::ha_hist_line] 99: 5809 [M::ha_hist_line] 100: 5389 [M::ha_hist_line] 101: 4820 [M::ha_hist_line] 102: 4421 [M::ha_hist_line] 103: 4018 [M::ha_hist_line] 104: 3720 [M::ha_hist_line] 105: * 3434 [M::ha_hist_line] rest: ***** 224912 [M::ha_analyze_count] left: none [M::ha_analyze_count] right: none [M::ha_pt_gen] peak_hom: 42; peak_het: -1 [M::ha_ct_shrink::1197.2313.32] ==> counted 15777834 distinct minimizer k-mers [M::ha_pt_gen::] counting in normal mode [M::yak_count] collected 572772101 minimizers [M::ha_pt_gen::1721.9133.28] ==> indexed 545731686 positions, counted 15777834 distinct minimizer k-mers hifiasm: Correct.cpp:3488: void recalcate_window_advance(overlap_region_alloc, All_reads, const ul_idx_t, UC_Read, Correct_dumy, UC_Read, kvec_t_u64_warp*, int64_t, double, double): Assertion `error != (unsigned int)-1' failed. /home/geadmin/UGER/uger/spool/it032/job_scripts/16858335: line 5: 31876 Aborted (core dumped) hifiasm -l0 --n-hap 2 -o test00 -t 4 test00.fastq

chhylp123 commented 1 year ago

Simulated data may have some artifacts. Could you please share the data with us?

yukiteruono commented 1 year ago

I would like to share the data on Google drive, so please let me know your email address.

chhylp123 commented 1 year ago

Here is my email: hcheng@ds.dfci.harvard.edu. Thanks a lot.

KoByungJune commented 1 year ago

Same problem with pbsim3 reads of highly heterozygous bird. Is it solved?

yukiteruono commented 1 year ago

If the reference genome contains N, PBSIM3 will generate N-containing reads. Having an N in the read caused this problem. If your genome contains N, remove N and then run PBSIM3.

KoByungJune commented 1 year ago

It is working now! Many thanks to both!