bluenote-1577 / flopp

flopp is a software package for single individual haplotype phasing of polyploid organisms from long read sequencing.
35 stars 7 forks source link

thread 'main' panicked at 'index out of bounds #15

Closed amvarani closed 1 year ago

amvarani commented 1 year ago

Hi there!

Got this error message below. Any idea ?

Reading inputs (BAM/VCF/frags). Time taken reading inputs 11336.605471399s Median read length is 93 SNPs Binomial adjustment factor is 3.72 Length of genome is 2111 SNPs Length of each block is 78 SNPs Estimated epsilon is 0.01 Generating haplotype blocks Time taken local clustering 323.783779ms Time taken block filling 114ns Final MEC score for the partition is 23276.0. Time taken linking, polishing blocks 26.445106ms Time taken writing blocks for contig ptg001284l_1 to results.txt : 74.48231ms Median read length is 262 SNPs Binomial adjustment factor is 10.48 Length of genome is 1105 SNPs Length of each block is 184 SNPs Estimated epsilon is 0.01 Generating haplotype blocks Time taken local clustering 31.224358ms Time taken block filling 61ns Final MEC score for the partition is 0.0. Time taken linking, polishing blocks 8.088675ms Time taken writing blocks for contig ptg002243l_1 to results.txt : 4.191468ms Median read length is 47 SNPs Binomial adjustment factor is 1.88 Length of genome is 138 SNPs Length of each block is 42 SNPs Estimated epsilon is 0.01 Generating haplotype blocks Time taken local clustering 16.59325ms Time taken block filling 102ns Final MEC score for the partition is 29.0. Time taken linking, polishing blocks 4.809357ms Time taken writing blocks for contig ptg002339l_1 to results.txt : 792.415µs Median read length is 51 SNPs Binomial adjustment factor is 2.04 Length of genome is 54 SNPs Length of each block is 50 SNPs Estimated epsilon is 0.01 Generating haplotype blocks Time taken local clustering 1.711933ms Time taken block filling 67ns Final MEC score for the partition is 0.0. Time taken linking, polishing blocks 3.247005ms Time taken writing blocks for contig ptg002639l_1 to results.txt : 316.321µs Median read length is 129 SNPs Binomial adjustment factor is 5.16 Length of genome is 171 SNPs Length of each block is 66 SNPs Estimated epsilon is 0.01 Generating haplotype blocks Time taken local clustering 22.468479ms Time taken block filling 56ns Final MEC score for the partition is 24.0. Time taken linking, polishing blocks 5.560846ms Time taken writing blocks for contig ptg001965l_1 to results.txt : 1.14221ms Median read length is 361 SNPs Binomial adjustment factor is 14.44 Length of genome is 1484 SNPs Length of each block is 308 SNPs Estimated epsilon is 0.01 Generating haplotype blocks Time taken local clustering 38.064438ms Time taken block filling 42ns Final MEC score for the partition is 0.0. Time taken linking, polishing blocks 7.700184ms Time taken writing blocks for contig ptg000255l_1 to results.txt : 5.167545ms Median read length is 294 SNPs Binomial adjustment factor is 11.76 Length of genome is 688 SNPs Length of each block is 77 SNPs Estimated epsilon is 0.01 Generating haplotype blocks Time taken local clustering 30.937837ms Time taken block filling 64ns Final MEC score for the partition is 42.0. Time taken linking, polishing blocks 6.574711ms Time taken writing blocks for contig ptg003594l_1 to results.txt : 2.670247ms Median read length is 244 SNPs Binomial adjustment factor is 9.76 Length of genome is 1451 SNPs Length of each block is 121 SNPs Estimated epsilon is 0.01 Generating haplotype blocks Time taken local clustering 389.70794ms Time taken block filling 70ns Final MEC score for the partition is 11888.0. Time taken linking, polishing blocks 21.327832ms Time taken writing blocks for contig ptg002859l_1 to results.txt : 8.913962ms Median read length is 90 SNPs Binomial adjustment factor is 3.6 Length of genome is 1836 SNPs Length of each block is 25 SNPs Estimated epsilon is 0.005380200860832138 Generating haplotype blocks Time taken local clustering 776.926806ms Time taken block filling 79ns Final MEC score for the partition is 48821.0. Time taken linking, polishing blocks 61.700423ms Time taken writing blocks for contig ptg000551l_1 to results.txt : 14.835921ms Median read length is 41 SNPs Binomial adjustment factor is 1.64 Length of genome is 115 SNPs Length of each block is 41 SNPs Estimated epsilon is 0.01 Generating haplotype blocks Time taken local clustering 11.421022ms Time taken block filling 56ns Final MEC score for the partition is 0.0. Time taken linking, polishing blocks 1.95695ms Time taken writing blocks for contig ptg001985l_1 to results.txt : 559.471µs Median read length is 89 SNPs Binomial adjustment factor is 3.56 Length of genome is 169 SNPs Length of each block is 57 SNPs Estimated epsilon is 0.01 Generating haplotype blocks Time taken local clustering 15.865358ms Time taken block filling 43ns Final MEC score for the partition is 32.0. Time taken linking, polishing blocks 1.541642ms Time taken writing blocks for contig ptg000275l_1 to results.txt : 505.267µs Median read length is 72 SNPs Binomial adjustment factor is 2.88 Length of genome is 90749 SNPs Length of each block is 35 SNPs Estimated epsilon is 0.0005793742757821553 Generating haplotype blocks Time taken local clustering 10.344008505s Time taken block filling 311ns Final MEC score for the partition is 1614255.0. Time taken linking, polishing blocks 3.237309746s Time taken writing blocks for contig ptg000016l_1 to results.txt : 1.277120052s Median read length is 140 SNPs Binomial adjustment factor is 5.6 Length of genome is 1267 SNPs Length of each block is 32 SNPs Estimated epsilon is 0.01 Generating haplotype blocks Time taken local clustering 91.007569ms Time taken block filling 57ns Final MEC score for the partition is 2625.0. Time taken linking, polishing blocks 15.031532ms Time taken writing blocks for contig ptg000788l_1 to results.txt : 5.267957ms Median read length is 442 SNPs Binomial adjustment factor is 17.68 Length of genome is 1695 SNPs Length of each block is 236 SNPs Estimated epsilon is 0.01 Generating haplotype blocks Time taken local clustering 73.887688ms Time taken block filling 66ns Final MEC score for the partition is 2263.0. Time taken linking, polishing blocks 9.537776ms Time taken writing blocks for contig ptg000332l_1 to results.txt : 5.874907ms Median read length is 105 SNPs Binomial adjustment factor is 4.2 Length of genome is 274 SNPs Length of each block is 92 SNPs Estimated epsilon is 0.01 Generating haplotype blocks Time taken local clustering 5.734878ms Time taken block filling 33ns Final MEC score for the partition is 0.0. Time taken linking, polishing blocks 3.894892ms Time taken writing blocks for contig ptg000542l_1 to results.txt : 1.215636ms thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', src/utils_frags.rs:155:11 note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

bluenote-1577 commented 1 year ago

Hi @amvarani,

Thanks for the bug report.

Sorry about this... I took a look, and I believe I have fixed the bug. I have pushed a new version of flopp that should be okay; let me know if you still get this issue. I believe it is a silly mistake that appears when one contig gets only secondary alignments mapped to it, but no primary alignments.

Thanks,

Jim

amvarani commented 1 year ago

Hi Jim Perfect! It worked perfectly! I'm trying to phase a hexaploid plant genome. Now the next step is evaluate the results and assembly each phase separately Thanks for this great tool!

Best