LooseLab / Icarust

A fully featured MinKNOW simulator for testing read until experiments.
Mozilla Public License 2.0
16 stars 5 forks source link

Thread '<unamed>' panicked even when running from Icarust working directory #10

Closed mccarthyma17 closed 7 months ago

mccarthyma17 commented 7 months ago

Hi again!

I'm getting the thread panicked error, even when running from the Icarust source directory, though it takes longer to produce an error:

thread '<unnamed>' panicked at src/impl_services/data.rs:543:34:
called `Result::unwrap()` on an `Err` value: Filter not available: User(32020, [0, 2, 1, 1])
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
[2024-02-08T18:47:18Z INFO icarust::impl_services::data: 1542 ] New reads: 0, Occupied: 1512, Empty pores: 4, Dead pores: 1484, Sequenced reads: 4233, Awaiting: 4
thread '<unnamed>' panicked at src/impl_services/data.rs:1488:66:
called `Result::unwrap()` on an `Err` value: SendError { .. }

Any help is much appreciated! Thanks so much.

philipschoettler commented 7 months ago

Hi,

to fix the problem you can try to set the HDF_PLUGIN_PATH environment variable like this before running Icarust:

export HDF5_PLUGIN_PATH="./vbz_plugin"
Adoni5 commented 7 months ago

Hey @mccarthyma17 - super sorry about this, fell off my radar! I think giving @philipschoettler's solution a go is definitely worthwhile, please let me know if that doesn't fix it

mccarthyma17 commented 7 months ago

Hello!

No problem, thanks for the suggestion! I'm afraid I'm still getting the same error, even after exporting the HDF5 path.

Adoni5 commented 7 months ago

Hey @mccarthyma17 - could you provide me with the results of ls in the Icarust source directory? You could also try setting an an absolute path to the vbz_plugin as the env variable - you can get this by running

realpath ./vbz_plugin
mccarthyma17 commented 7 months ago

Sure! Here's what's in my Icarust source directory:

(base) usern@users-MacBook-Air Icarust % ls
CITATION.cff        README.md       img         target
Cargo.lock      build.rs        proto           tmp
Cargo.toml      config.ini      python          vbz_plugin
Icarust.code-workspace  distributions.json  squiggle_arrs
LICENSE.md      docker          src
Profile_tomls       examples        static

I tried the absolute path - still no change. I also tried running it from the executable binary (/target/release/Icarust) with the vbz_plugin folder copied there, but run into the same error message when it goes to write the fast5 file.

philipschoettler commented 7 months ago

You might be able to make it work by doing the following:

  1. Uncomment line 352 in src/impl_services/data.rs (https://github.com/LooseLab/Icarust/blob/main/src/impl_services/data.rs#L352)
  2. Install cmake if you don't have it already. On macOS: brew install cmake
  3. Rebuild vbz. I found the following line in the Dockerfile: git clone https://github.com/nanoporetech/vbz_compression.git && cd vbz_compression && mkdir build && git submodule update --init && cd build && cmake -D CMAKE_BUILD_TYPE=Release -D ENABLE_CONAN=OFF -D ENABLE_PERF_TESTING=OFF -D ENABLE_PYTHON=OFF .. && make -j (https://github.com/LooseLab/Icarust_docker/blob/main/Dockerfile#L7)

After executing that (doesn't have to be in the Icarust directory), go to the new directory vbz_compression/build/bin/, copy libvbz_hdf_plugin.dylib and overwrite ./vbz_plugin/libvbz_hdf_plugin.dylib in your Icarust directory.

mccarthyma17 commented 7 months ago

@philipschoettler @Adoni5 that worked - it's running! Thank you both for all your help!

Adoni5 commented 7 months ago

Thank you very much @philipschoettler! I'll close this for now and muse upon how to avoid this in the future

SimiliSerpent commented 5 months ago

Hello, thank you @developers for this tool that looks amazing, and for the ongoing support with it!

I also have the issue described at the top of this thread - when trying to output Fast5 files. I tried the followings:

Nothing worked for me.

More details: Also note that, for the uncommenting line 352 solution to work, I had to add resolve-path = "0.1.0" to the Cargo.toml file and use resolve_path::PathResolveExt; at the beginning of the src/impl_services/data.rs file. FYI, on CentOS 7.9.2009 (Core), the compilation of vbz from the nanopore git repo leads to the creation of one libvbz_hdf_plugin.so file - no libvbz_hdf_plugin.dylib. Thus, I used this .so file and removed all other files from the vbz_plugin directory to make sure that my newly created file would be used. I still have the issue despite this fix attempt.

[Note that everything works fine as long as I use the --pod5 option.]

AGloaguen commented 4 months ago

Dear @Adoni5 , thank you very much for this wonderful tool!

I also have the same error as @SimiliSerpent, is there any chance that you found a solution for this issue?

Thank you very much in advance for you help and for your time.

Adoni5 commented 4 months ago

Hi @AGloaguen,

Can I ask what Operating system you are running on? MacOS or Linux?

If it's linux, what distribution are you using? For example I'm using Ubuntu 22.04.

The problem seems to be that different systems compile the VBZ plugin in different ways. I'm not much of an expert on this topic, but I reckon we can get you up and running!

My original intention was to port the VBZ plugin into Rust, but I unfortunately I'm now writing up so I don't have the time :(

Rory

P.S @SimiliSerpent - unless I misread your comment, you managed to get it to work using libvbz_hdf_plugin.so?

SimiliSerpent commented 4 months ago

Hello @Adoni5,

No I could not get it to work with Fast5 output format. I only detailed what came up different compared with the @philipschoettler fixing advice. I will edit it to make it clearer ASAP.