marbl / verkko

Telomere-to-telomere assembly of accurate long reads (PacBio HiFi, Oxford Nanopore Duplex, HERRO corrected Oxford Nanopore Simplex) and Oxford Nanopore ultra-long reads.
289 stars 29 forks source link

Segmentation fault #264

Closed chunlinxiao closed 3 months ago

chunlinxiao commented 3 months ago

For some reason, my verkko2.1 run got "Segmentation fault" at the step of "7-consensus" (please see the error below).

I checked the input sequences, and found no reads (ONT or HiFi) with special char (non ATGC) or length > 2 Mb.

DO you have any idea?

Thanks

>tail verkko2.1_out/7-consensus/buildPackages.err
-- Loading layouts - tig  33812 of length     40855 bp with      80 reads
-- Loading layouts - tig  33813 of length     41961 bp with      81 reads
-- Loading layouts - tig  33814 of length     44123 bp with      97 reads
ERROR: loading layouts failed, check your input sequences and layout file!
layoutToPackage: utgcns/layoutToPackage.C:167: void loadVerkkoLayouts(sqCache*, std::vector<tgTig*>&, merylutil::files::v1::compressedFileReader*, const char*): Assertion `0' failed.

Failed with 'Aborted'; backtrace (libbacktrace):

Failed with 'Segmentation fault'; backtrace (libbacktrace):
./buildPackages.sh: line 14: 1483220 Segmentation fault      (core dumped) ...miniconda3/envs/myconda_verkko_v2.1/lib/verkko/bin/layoutToPackage -layout ../6-layoutContigs/unitig-popped.layout -output packages/part###.cnspack -idmap packages -partition 0.8 1.5 0.04 -reads ../7-consensus/ont_subset.fasta.gz ../m84039_combined.fastq.gz > ../7-consensus/packages.report
skoren commented 3 months ago

This usually implies you're missing some sequences that the layouts name but then are not in your provided fasta/fastq. Have any files been moved in the filesystem during this run? Can you grep for ERROR in the full buildPackages.err file and post the results here?

skoren commented 3 months ago

Idle, issue looks like some input sequences (../m84039_combined.fastq.gz) is an invalid local path. I can't reproduce this locally as the paths are converted to absolute paths using pwd so, unless pwd is reporting an empty string on you system this shouldn't happen. I also would have expected that to fail earlier. Either way, running with an absolute path to that input file would make this work.

chunlinxiao commented 3 months ago

Update:

I was waiting for the testing results for an update here - my latest run was successful after regenerating/replacing the ONT input fastq file - so this is good.

The early error was caused by ONT input sequence as the log file mentioned 31 ONT reads were not found - this was a bit weird though !

Will report back if encountering similar cases in future.

Thanks @skoren