natir / fpa

Filter of Pairwise Alignement
MIT License
44 stars 5 forks source link

thread panic error #16

Closed rwhetten closed 1 year ago

rwhetten commented 2 years ago

I installed fpa in a Rust environment using the cargo install fpa_lr command, but when I try to filter a PAF file (produced by minimap2 using the option -x ava-ont) with the command fpa -i $INPUT_PAF keep -d | bgzip -@6 > $OUTPUT_PAFGZ I get an error message that includes the suggestion to set RUST_BACKTRACE=1 for more information. With that variable set, the error message is:

thread 'main' panicked at 'Trouble during read of input mapping: Error(Deserialize { pos: Some(Position { byte: 0, line: 1, record: 0 }), err: DeserializeError { field: Some(1), kind: ParseInt(ParseIntError { kind: InvalidDigit }) } })', /home/$USER/.cargo/registry/src/github.com-1ecc6299db9ec823/fpa_lr-0.5.1/src/main.rs:106:33
stack backtrace:
   0: rust_begin_unwind
             at /build/rustc-8kCV4J/rustc-1.61.0+dfsg1~llvm/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /build/rustc-8kCV4J/rustc-1.61.0+dfsg1~llvm/library/core/src/panicking.rs:143:14
   2: core::result::unwrap_failed
             at /build/rustc-8kCV4J/rustc-1.61.0+dfsg1~llvm/library/core/src/result.rs:1785:5
   3: fpa::main

Is this a known problem related to the format of the input file? I deleted header lines beginning with @, but that did not affect the error.

natir commented 2 years ago

Hello, first of all thank you for using fpa.

Based on this:

I deleted header lines beginning with @, but that did not affect the error.

I assume you add parameter -a in your minimap2 invocation this parameter change output format from paf to sam, fpa didn't support sam format. If you want perform exact alignment and get paf output you must use -c instead of -a in minimap2 invocation.

If you still have trouble please send complete command invocation (include minimap2).

rwhetten commented 1 year ago

OK, thanks - I will make a new file in PAF format.