maickrau / MBG

MIT License
57 stars 2 forks source link

Assertion `lessTrim > 0' failed #13

Closed oushujun closed 2 years ago

oushujun commented 2 years ago

Hello,

I am using the MBG bioconda 1.0.9 in verkko to resolve assembly graphs, and I encountered the following error:

removed trim problem node 12607 MBG: src/UnitigResolver.cpp:2257: void maybeTrim(ResolvableUnitigGraph&, std::vector&, size_t, std::pair<long unsigned int, bool>, size_t): Assertion `lessTrim > 0' failed. ./buildGraph.sh: line 39: 89915 Aborted (core dumped) /home/sou6/bin/miniconda3/envs/asm/bin/MBG $iopt -t 4 -k 1001 -r 15000 -R 4000 -w 100 --kmer-abundance 1 --unitig-abundance 2 --error-masking=collapse-msat --output-sequence-paths ../1-buildGraph/paths.gaf --out ../1-buildGraph/hifi-resolved.gfa

Can you help to see what may cause this error? Thank you

Shujun

oushujun commented 2 years ago

In another run of a different sample, I have a different error:

removed trim problem node 13921 MBG: src/UnitigResolver.cpp:2391: void resolveRound(ResolvableUnitigGraph&, std::vector&, const HashList&, size_t, size_t, size_t, size_t): Assertion `!resolvableGraph.unitigRemoved[pair.first.first]' failed. ./buildGraph.sh: line 39: 67421 Aborted (core dumped) /home/sou6/bin/miniconda3/envs/asm/bin/MBG $iopt -t 8 -k 1001 -r 15000 -R 4000 -w 100 --kmer-abundance 1 --unitig-abundance 2 --error-masking=collapse-msat --output-sequence-paths ../1-buildGraph/paths.gaf --out ../1-buildGraph/hifi-resolved.gfa

Are they due to memory limits? I can't trace how much memory they have used, but the node has 1.5 TB of memory and it's not very busy. Thanks,

Shujun

maickrau commented 2 years ago

This is not due to a memory limit. Looks like a bug in MBG. If the data is public could you please share it with us so we can debug this?

oushujun commented 2 years ago

Hi @maickrau,

Thank you for getting back to me instantly. The above errors were from two other unpublished Arabidopsis datasets. Can you try on this public dataset?

https://ngdc.cncb.ac.cn/bioproject/browse/PRJCA005809

Shujun

maickrau commented 2 years ago

Could you please post the exact command which crashed on the public dataset?

oushujun commented 2 years ago

Hi @maickrau,

I use this command to run on the public dataset:

nohup verkko -d asmXJTU --hifi Col-XJTU.CCS.CRR302668.fastq.gz --nano Col-XJTU.CRR302667.fastq --threads 90 --ali-run 17 192 72 &

It's on the MBG step now and not yet give me an error. I will update you later.

For the first run above, I used the same parameter as of the public dataset. For the second run, I used this command:

nohup verkko -d asm0307 --hifi Tanz-1.q20.fastq.gz --nano Nanopore_Tanz_all_reads_Guppy6_Sup_model.fq --threads 90 --cns-run 90 1300 1000 --sto-run 90 1300 1000 --mer-run 90 1300 1000 --ovb-run 90 1300 1000 --red-run 90 1300 1000 --mbg-run 8 1300 1000 --utg-run 90 1300 1000 --spl-run 90 1300 1000 --ali-run 17 200 1000 --pop-run 90 1300 1000 --utp-run 90 1300 1000 --lay-run 90 1300 1000 --sub-run 90 1300 1000 --par-run 90 1300 1000 &

Shujun

oushujun commented 2 years ago

The public data has another error:

try resolve k=14974, replaced 0 nodes with 0 nodes try resolve k=14990, replaced 1 nodes with 3 nodes, unitigified 4 nodes to 2 nodes try resolve k=14991, replaced 1 nodes with 3 nodes, unitigified 4 nodes to 2 nodes try resolve k=14997, replaced 0 nodes with 0 nodes MBG: src/UnitigResolver.cpp:478: std::pair<UnitigGraph, std::vector > resolvableToUnitigs(const ResolvableUnitigGraph&, const std::vector&): Assertion `result.unitigCoverage[i][j] > 0' failed. ./buildGraph.sh: line 39: 50328 Aborted (core dumped) /home/sou6/bin/miniconda3/envs/asm/bin/MBG $iopt -t 4 -k 1001 -r 15000 -R 4000 -w 100 --kmer-abundance 1 --unitig-abundance 2 --error-masking=collapse-msat --output-sequence-paths ../1-buildGraph/paths.gaf --out ../1-buildGraph/hifi-resolved.gfa

Please let me know if you need any intermediate files to debug MBG. Thank you.

maickrau commented 2 years ago

The public dataset works now with the most recent MBG commit

oushujun commented 2 years ago

That's good news! I see the conda version is not updated yet, will it be available soon? As you may recall in issue #12, I can't compile MBG locally. I tried to compile the latest master branch again and it was again not successful.

Shujun

maickrau commented 2 years ago

Could you please try with the newest conda version and close if it works?

oushujun commented 2 years ago

Sure! Happy to try. Currently our server is down for maintenance so it may take a couple days.

oushujun commented 2 years ago

Issue resolved. Thanks!