| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
#ifndef NANOPOLISH_FAST5_IO_H |
| 11 |
#define NANOPOLISH_FAST5_IO_H |
| 12 |
|
| 13 |
#include <string> |
| 14 |
#include <vector> |
| 15 |
#include <hdf5.h> |
| 16 |
|
| 17 |
extern "C" { |
| 18 |
#include "event_detection.h" |
| 19 |
#include "scrappie_common.h" |
| 20 |
} |
| 21 |
|
| 22 |
|
| 23 |
typedef struct { |
| 24 |
|
| 25 |
int channel_id; |
| 26 |
|
| 27 |
float digitisation; |
| 28 |
float offset; |
| 29 |
float range; |
| 30 |
float sample_rate; |
| 31 |
} fast5_raw_scaling; |
| 32 |
|
| 33 |
|
| 34 |
struct fast5_file |
| 35 |
{ |
| 36 |
hid_t hdf5_file; |
| 37 |
bool is_multi_fast5; |
| 38 |
}; |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
fast5_file fast5_open(const std::string& filename); |
| 50 |
|
| 51 |
|
| 52 |
bool fast5_is_open(fast5_file& fh); |
| 53 |
|
| 54 |
|
| 55 |
void fast5_close(fast5_file& fh); |
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
std::string fast5_get_read_id_single_fast5(fast5_file& fh); |
| 63 |
|
| 64 |
|
| 65 |
std::vector<std::string> fast5_get_multi_read_groups(fast5_file& fh); |
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
raw_table fast5_get_raw_samples(fast5_file& fh, const std::string& read_id, fast5_raw_scaling scaling); |
| 73 |
|
| 74 |
|
| 75 |
std::string fast5_get_sequencing_kit(fast5_file& fh, const std::string& read_id); |
| 76 |
|
| 77 |
|
| 78 |
std::string fast5_get_experiment_type(fast5_file& fh, const std::string& read_id); |
| 79 |
|
| 80 |
|
| 81 |
fast5_raw_scaling fast5_get_channel_params(fast5_file& fh, const std::string& read_id); |
| 82 |
|
| 83 |
|
| 84 |
uint64_t fast5_get_start_time(fast5_file& fh, const std::string& read_id); |
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
std::string fast5_get_raw_read_internal_name(fast5_file& fh); |
| 92 |
|
| 93 |
|
| 94 |
std::string fast5_get_raw_read_group(fast5_file& fh, const std::string& read_id); |
| 95 |
|
| 96 |
|
| 97 |
std::string fast5_get_string_attribute(fast5_file& fh, const std::string& group_name, const std::string& attribute_name); |
| 98 |
|
| 99 |
uint8_t fast5_is_vbz_compressed(fast5_file& fh, const std::string& read_id); |
| 100 |
|
| 101 |
#endif |