slow5_get

Function slow5_get 

Source
pub unsafe extern "C" fn slow5_get(
    read_id: *const c_char,
    read: *mut *mut slow5_rec_t,
    s5p: *mut slow5_file_t,
) -> c_int
Expand description

Get a read entry from a slow5 file corresponding to a read_id.

Allocates memory for *read if it is NULL. Otherwise, the data in *read is freed and overwritten. slow5_rec_free() should always be called when finished with the structure.

Require the slow5 index to be loaded using slow5_idx_load

Return:

=0 the read was successfully found and stored <0 error code

Errors: SLOW5_ERR_NOTFOUND read_id was not found in the index SLOW5_ERR_ARG read_id, read or s5p is NULL SLOW5_ERR_IO other error when reading the slow5 file SLOW5_ERR_RECPARSE parsing error SLOW5_ERR_NOIDX the index has not been loaded

@param read_id the read identifier @param read address of a slow5_rec pointer @param s5p slow5 file @return error code described above