Functions | |
template<class MetricSet > | |
size_t | compute_buffer_size (const MetricSet &metrics) INTEROP_THROW_SPEC((io |
template<class MetricSet > | |
size_t | write_interop_to_buffer (const MetricSet &metrics,::uint8_t *buffer, const size_t buffer_size) |
template<class MetricSet > | |
void | read_interop_from_buffer (::uint8_t *buffer, const size_t buffer_size, MetricSet &metrics) INTEROP_THROW_SPEC((interop |
template<class MetricSet > | |
void | read_interop_from_string (const std::string &buffer, MetricSet &metrics, const bool rebuild=true) INTEROP_THROW_SPEC((interop |
template<class MetricSet > | |
void | write_interop_to_string (std::string &buffer, const MetricSet &metrics, const ::int16_t version=-1) INTEROP_THROW_SPEC((interop |
template<class MetricSet > | |
size_t | read_header_from_string (const std::string &buffer, MetricSet &metrics) INTEROP_THROW_SPEC((interop |
template<class MetricSet > | |
void | write_header_to_string (std::string &buffer, const MetricSet &metrics,::int16_t version=-1) INTEROP_THROW_SPEC((interop |
template<class MetricSet > | |
void | read_interop (const std::string &run_directory, MetricSet &metrics, const bool use_out=true) INTEROP_THROW_SPEC((io |
template<class MetricSet > | |
bool | write_interop (const std::string &run_directory, const MetricSet &metrics, const bool use_out=true, const ::int16_t version=-1) INTEROP_THROW_SPEC((io |
template<class MetricType > | |
void | write_interop_header (const std::string &run_directory, const ::int16_t version=-1, const typename MetricType::header_type &header=typename MetricType::header_type(), const bool use_out=true) INTEROP_THROW_SPEC((io |
template<class MetricSet > | |
bool | interop_exists (const std::string &run_directory, MetricSet &, const bool use_out=true) INTEROP_THROW_SPEC((io |
template<class MetricSet > | |
void | list_interop_filenames (std::vector< std::string > &files, const std::string &run_directory, const size_t last_cycle=0, const bool use_out=true, const bool add=false) |
template<class MetricSet > | |
void | read_interop_by_cycle (const std::string &run_directory, MetricSet &metrics, const size_t last_cycle, const bool use_out=true) INTEROP_THROW_SPEC((interop |
template<class MetricSet > | |
bool | interop_exists (const std::string &run_directory, MetricSet &, const size_t last_cycle, const bool use_out=true) INTEROP_THROW_SPEC((io |
Detailed Description
These functions can be used to read or write a binary InterOp file.
Function Documentation
size_t illumina::interop::io::compute_buffer_size | ( | const MetricSet & | metrics | ) |
Compute the number of bytes to write
- Parameters
-
metrics metric set
- Returns
- number of bytes required
bool illumina::interop::io::interop_exists | ( | const std::string & | run_directory, |
MetricSet & | , | ||
const bool | use_out = true |
||
) |
Check for the existence of the binary InterOp file into the given metric set
- Note
- The 'Out' suffix (parameter: use_out) is appended when we read the file. We excluded the Out in certain conditions when writing the file.
- Parameters
-
run_directory file path to the run directory use_out use the copied version
bool illumina::interop::io::interop_exists | ( | const std::string & | run_directory, |
MetricSet & | , | ||
const size_t | last_cycle, | ||
const bool | use_out = true |
||
) |
Check for the existence of the binary InterOp file into the given metric set
- Note
- The 'Out' suffix (parameter: use_out) is appended when we read the file. We excluded the Out in certain conditions when writing the file.
- Parameters
-
run_directory file path to the run directory last_cycle last cycle to check use_out use the copied version
void illumina::interop::io::list_interop_filenames | ( | std::vector< std::string > & | files, |
const std::string & | run_directory, | ||
const size_t | last_cycle = 0 , |
||
const bool | use_out = true , |
||
const bool | add = false |
||
) |
List all possible InterOp file names
- Note
- The first filename is the legacy name
We could also specialize this for index_metrics.
- Parameters
-
files destination list of files run_directory file path to the run directory last_cycle last cycle to check use_out use the copied version add if true, do not clear, add more
size_t illumina::interop::io::read_header_from_string | ( | const std::string & | buffer, |
MetricSet & | metrics | ||
) |
Read the binary InterOp file into the given metric set
- Parameters
-
buffer string holding a byte buffer metrics metric set
- Exceptions
-
bad_format_exception incomplete_file_exception model::index_out_of_bounds_exception
void illumina::interop::io::read_interop | ( | const std::string & | run_directory, |
MetricSet & | metrics, | ||
const bool | use_out = true |
||
) |
Read the binary InterOp file into the given metric set
- Note
- The 'Out' suffix (parameter: use_out) is appended when we read the file. We excluded the Out in certain conditions when writing the file.
- Parameters
-
run_directory file path to the run directory metrics metric set use_out use the copied version
- Exceptions
-
file_not_found_exception bad_format_exception incomplete_file_exception
void illumina::interop::io::read_interop_by_cycle | ( | const std::string & | run_directory, |
MetricSet & | metrics, | ||
const size_t | last_cycle, | ||
const bool | use_out = true |
||
) |
Read the binary InterOp file into the given metric set
- Note
- The 'Out' suffix (parameter: use_out) is appended when we read the file. We excluded the Out in certain conditions when writing the file.
- Parameters
-
run_directory file path to the run directory metrics metric set last_cycle last cycle to check use_out use the copied version
- Exceptions
-
file_not_found_exception bad_format_exception incomplete_file_exception
void illumina::interop::io::read_interop_from_buffer | ( | ::uint8_t * | buffer, |
const size_t | buffer_size, | ||
MetricSet & | metrics | ||
) |
Read the binary InterOp file into the given metric set
- Parameters
-
buffer byte buffer buffer_size length of the byte buffer metrics metric set
- Exceptions
-
bad_format_exception incomplete_file_exception
void illumina::interop::io::read_interop_from_string | ( | const std::string & | buffer, |
MetricSet & | metrics, | ||
const bool | rebuild = true |
||
) |
Read the binary InterOp file into the given metric set
- Parameters
-
buffer string holding a byte buffer metrics metric set rebuild whether to rebuild the id map
- Exceptions
-
bad_format_exception incomplete_file_exception model::index_out_of_bounds_exception
void illumina::interop::io::write_header_to_string | ( | std::string & | buffer, |
const MetricSet & | metrics, | ||
::int16_t | version = -1 |
||
) |
Write the binary InterOp file header into a string from the given metric set
- Parameters
-
buffer string holding a byte buffer metrics metric set
- Exceptions
-
bad_format_exception incomplete_file_exception model::index_out_of_bounds_exception
bool illumina::interop::io::write_interop | ( | const std::string & | run_directory, |
const MetricSet & | metrics, | ||
const bool | use_out = true , |
||
const ::int16_t | version = -1 |
||
) |
Write the metric set to a binary InterOp file
- Note
- The 'Out' suffix (parameter: use_out) is appended when we read the file. We excluded the Out in certain conditions when writing the file.
- Parameters
-
run_directory file path to the run directory metrics metric set use_out use the copied version version version of format to write
- Returns
- true if write is successful
void illumina::interop::io::write_interop_header | ( | const std::string & | run_directory, |
const ::int16_t | version = -1 , |
||
const typename MetricType::header_type & | header = typename MetricType::header_type() , |
||
const bool | use_out = true |
||
) |
Write only the header to a binary InterOp file
- Note
- The 'Out' suffix (parameter: use_out) is appended when we read the file. We excluded the Out in certain conditions when writing the file.
- Parameters
-
run_directory file path to the run directory version version of format to write header header of the metric set use_out use the copied version
size_t illumina::interop::io::write_interop_to_buffer | ( | const MetricSet & | metrics, |
::uint8_t * | buffer, | ||
const size_t | buffer_size | ||
) |
Write the metric to a binary byte buffer
- Parameters
-
metrics metric set buffer destination binary buffer buffer_size maximum size of binary buffer
- Returns
- number of bytes written
void illumina::interop::io::write_interop_to_string | ( | std::string & | buffer, |
const MetricSet & | metrics, | ||
const ::int16_t | version = -1 |
||
) |
Write the binary InterOp file into the given string using the given metric set
- Parameters
-
buffer string holding a byte buffer metrics metric set version version of the format to write (-1 means use latest)
- Exceptions
-
bad_format_exception incomplete_file_exception model::index_out_of_bounds_exception