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

No fragments found error #18

Closed JbaptisteLam closed 10 months ago

JbaptisteLam commented 10 months ago

Hi,

First of all thank you for providing us this tool, it may help a lot, We are working on amplicon-based long read sequencing ONT and I want to tag reads in BAM file according to their respective haplotype. It will be usefull to identify which allele carry mutation in our repetitive regions. I know HAPcut and whatshap could be usefull too, but I am exploring many possibilities :)

I try to run flopp but it raise an issue after 30s: No fragments found. Either the VCF file has no variants or none of the reads in the BAM file were able to be processed note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Full trace: Reading inputs (BAM/VCF/frags). Time taken reading inputs 30.57777928s thread 'main' panicked at src/bin/flopp.rs:265:9: No fragments found. Either the VCF file has no variants or none of the reads in the BAM file were able to be processed stack backtrace: 0: 0x55e09fd85ab0 - std::backtrace_rs::backtrace::libunwind::trace::he43a6a3949163f8c at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5 1: 0x55e09fd85ab0 - std::backtrace_rs::backtrace::trace_unsynchronized::h50db52ca99f692e7 at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x55e09fd85ab0 - std::sys_common::backtrace::_print_fmt::hd37d595f2ceb2d3c at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:67:5 3: 0x55e09fd85ab0 - ::fmt::h678bbcf9da6d7d75 at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:44:22 4: 0x55e09fc7294c - core::fmt::rt::Argument::fmt::h3a159adc080a6fc9 at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/rt.rs:138:9 5: 0x55e09fc7294c - core::fmt::write::hb8eaf5a8e45a738e at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/core/src/fmt/mod.rs:1094:21 6: 0x55e09fd55ecd - std::io::Write::write_fmt::h9663fe36b2ee08f9 at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/io/mod.rs:1714:15 7: 0x55e09fd86f0e - std::sys_common::backtrace::_print::hcd4834796ee88ad2 at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:47:5 8: 0x55e09fd86f0e - std::sys_common::backtrace::print::h1360e9450e4f922a at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/sys_common/backtrace.rs:34:9 9: 0x55e09fd86af3 - std::panicking::default_hook::{{closure}}::h2609fa95cd5ab1f4 at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:270:22 10: 0x55e09fd87b13 - std::panicking::default_hook::h6d75f5747cab6e8d at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:290:9 11: 0x55e09fd87b13 - std::panicking::rust_panic_with_hook::h57e78470c47c84de at /rustc/cc66ad468955717ab92600c770da8c1601a4ff33/library/std/src/panicking.rs:707:13 12: 0x55e09fca27d9 - std::panicking::begin_panic::{{closure}}::h58a0ba2582fdd2ce 13: 0x55e09fca27a6 - std::sys_common::backtrace::rust_end_short_backtrace::h8df054056037dd76 14: 0x55e09fbec32a - std::panicking::begin_panic::h461dfd029c7d19a2 15: 0x55e09fc9aff4 - flopp::main::h1b261ab0a6dcbf47 16: 0x55e09fca27e3 - std::sys_common::backtrace::__rust_begin_short_backtrace::h76ff25ac38535cc1 17: 0x55e09fc8a675 - main 18: 0x7fb0badf7c87 - libc_start_main at /build/glibc-uZu3wS/glibc-2.27/csu/../csu/libc-start.c:310 19: 0x55e09fbf7b65 -

Best,

JB

bluenote-1577 commented 10 months ago

Hi @JbaptisteLam,

When this error occurs, it usually means something is weird with the VCF or BAM file. Can you confirm that for the bam file you're phasing, the VCF is non-empty at the positions you care about?

Also, can you confirm that the reads are not supplementary or secondary mappings? See https://labs.epi2me.io/notebooks/Introduction_to_SAM_and_BAM_files.html if you're unfamiliar with mapping flags.

Thanks,

Jim

JbaptisteLam commented 10 months ago

I tried with whatshap, it help me to figure out what's going on, I didn't have the same contig name in my vcf and in my BAM file, One wich UCSC and one with RefSeq (NC_*** vs chr),

Thanks

JbaptisteLam commented 10 months ago

Inconsistent contig name VCF between VCF and BAM