Skip to the content.

slow5lib easy multi-thread API

NOTE: This API documentation is sparse. If something is not clear do not hesitate to open an issue.

The easy multi-thread (called mt API) API allows the user to access SLOW5 files using multiple threads, simply by specifying the number of threads, rather than needing to write their own multi-threading code. This API is for programmer’s convenience, rather than for efficiency. This API is not meant to be used by a programmer who has the expertise to write multi-threaded code and use the slow5 low-level API directly. While fetching using this API would be faster than using a single thread, it would not be as efficient as using low-level API functions directly from the programmer’s own multi-threaded code.

To use this API, include <slow5/slow5_mt.h> in your programme. Make sure to explicitly enable easy multi-thread API as make slow5_mt=1, during compile time of slow5lib.

Data structures

The slow5_mt_t structure stores internal multi-threading related data. This structure has the following form:

typedef struct {
    // private members that are not to be directly accessed*/
} slow5_mt_t;

The slow5_batch_t structure stores a batch of SLOW5 records. This structure has the following form:

typedef struct {
    // private members that are not to be directly accessed*/
    slow5_rec_t **slow5_rec;
} slow5_batch_t;

API functions

Common

Reading and access

Writing and editing

You may also refer to the examples here on how these functions can be used.