Closed maximilianmordig closed 4 months ago
Had a look, and the readIDs in the .blow5 file are empty.
slow5tools skim reads1.blow5
#read_id read_group digitisation offset range sampling_rate len_raw_signal raw_signal channel_number median_before read_number start_mux start_time
0 8192 13.722261 1443.030273 4000 12923 . 1 0.1 1 1 100
0 8192 13.722261 1443.030273 4000 17304 . 1 0.1 2 1 100
0 8192 13.722261 1443.030273 4000 20421 . 1 0.1 3 1 100
0 8192 13.722261 1443.030273 4000 20422 . 1 0.1 4 1 100
0 8192 13.722261 1443.030273 4000 20422 . 1 0.1 5 1 100
0 8192 13.722261 1443.030273 4000 20422 . 1 0.1 6 1 100
0 8192 13.722261 1443.030273 4000 20423 . 1 0.1 7 1 100
0 8192 13.722261 1443.030273 4000 20423 . 1 0.1 8 1 100
0 8192 13.722261 1443.030273 4000 6700 . 1 0.1 9 1 100
0 8192 13.722261 1443.030273 4000 20424 . 1 0.1 10 1 100
0 8192 13.722261 1443.030273 4000 2320 . 1 0.1 11 1 100
0 8192 13.722261 1443.030273 4000 20424 . 1 0.1 12 1 100
0 8192 13.722261 1443.030273 4000 20424 . 1 0.1 13 1 100
0 8192 13.722261 1443.030273 4000 20424 . 1 0.1 14 1 100
0 8192 13.722261 1443.030273 4000 20425 . 1 0.1 15 1 100
0 8192 13.722261 1443.030273 4000 20425 . 1 0.1 16 1 100
0 8192 13.722261 1443.030273 4000 20425 . 1 0.1 17 1 100
0 8192 13.722261 1443.030273 4000 20425 . 1 0.1 18 1 100
0 8192 13.722261 1443.030273 4000 20426 . 1 0.1 19 1 100
0 8192 13.722261 1443.030273 4000 20426 . 1 0.1 20 1 100
0 8192 13.722261 1443.030273 4000 20426 . 1 0.1 21 1 100
0 8192 13.722261 1443.030273 4000 20426 . 1 0.1 22 1 100
Trying to index, it gives this.
slow5tools index reads1.blow5
[slow5_idx_insert::ERROR] Read ID '' is duplicated At src/slow5_idx.c:495
[slow5_idx_build::ERROR] Inserting '' to index failed At src/slow5_idx.c:335
Error running slow5idx_build on reads1.blow5
Do you know how this file was generated?
I generated the file myself. I have attached a condensed version compiled using C++20. The slow5 file has the read id set, but the blow5 has not.
Oh I see, you should set the read_id_len
like this https://github.com/hasindu2008/slow5lib/blob/e0d0d0f3da18374519b60924850c9e7f900a6bb3/examples/write.c#L163.
Of course, thanks. Somehow it worked with slow5, but not blow5.
It may be worth to check for read_id_len>0
before writing.
That is a bit inconsistent with slow5_rec_set_string
which detects the length automatically with strlen
.
I am writing a blow5 file using the slow5 C API (using
slow5_open
). When I try to convert it withIf I instead write the file using slow5 (simply changing the name of the file), the conversion works:
I have attached both a blow5 file and a slow5 file (with different contents), the former cannot be converted. reads.zip Is there some compression flag I need to set when writing blow5?