Namespaces | |
detail | |
layout | |
plot | |
table | |
Functions | |
template<typename Source , typename Destination > | |
void | copy_from (std::ostream &, const Source &, const Destination &) |
template<typename Source , typename Destination > | |
void | copy_from (std::istream &, Destination &dst, const Source &src) |
template<typename Source , typename Destination > | |
void | copy_from (const char *, Destination &dst, const Source &src) |
template<typename ReadType , typename ValueType > | |
std::streamsize | stream_map (std::istream &in, ValueType &val) |
template<typename ReadType , typename ValueType > | |
std::streamsize | stream_map (char *&in, ValueType &val) |
std::streamsize | stream_map (std::istream &in, std::string &val) |
std::streamsize | stream_map (char *&in, std::string &val) |
template<typename ReadType , typename ValueType > | |
std::streamsize | stream_map (std::istream &in, std::vector< ValueType > &vals, const size_t n) |
template<typename ReadType , typename ValueType > | |
std::streamsize | stream_map (char *&in, std::vector< ValueType > &vals, const size_t n) |
template<typename ReadType , typename ValueType > | |
std::streamsize | padded_stream_map (std::istream &in, std::vector< ValueType > &vals, const size_t n, const ReadType) |
template<typename ReadType , typename ValueType > | |
std::streamsize | padded_stream_map (char *&in, std::vector< ValueType > &vals, const size_t n, const ReadType) |
template<typename ReadType , typename ValueType > | |
std::streamsize | stream_map (std::istream &in, std::vector< ValueType > &vals, const size_t offset, const size_t n) |
template<typename ReadType , typename ValueType > | |
std::streamsize | stream_map (char *&in, std::vector< ValueType > &vals, const size_t offset, const size_t n) |
template<typename ReadType , typename ValueType , size_t N> | |
std::streamsize | stream_map (std::istream &in, ValueType(&vals)[N], const size_t n) |
template<typename ReadType , typename ValueType , size_t N> | |
std::streamsize | stream_map (char *&in, ValueType(&vals)[N], const size_t n) |
template<typename WriteType , typename ValueType > | |
std::streamsize | stream_map (std::ostream &out, const ValueType val) |
std::streamsize | stream_map (std::ostream &out, const std::string &str) |
template<typename WriteType , typename ValueType > | |
std::streamsize | stream_map (std::ostream &out, const ValueType &vals, const size_t n) |
template<typename WriteType , typename ValueType > | |
std::streamsize | padded_stream_map (std::ostream &out, const ValueType &vals, const size_t n, const WriteType pad) |
template<typename WriteType , typename ValueType > | |
std::streamsize | stream_map (std::ostream &out, const ValueType &vals, const size_t offset, const size_t n) |
template<typename Layout > | |
void | map_resize (const Layout &, size_t) |
template<typename Layout > | |
void | map_resize (Layout &layout, const size_t n) |
template<class T > | |
void | read_binary (std::istream &in, T *buffer, const size_t n) |
template<class T > | |
void | read_binary (std::istream &in, T &buffer) |
template<class T > | |
void | read_binary (char *&in, T *buffer, const size_t n) |
template<class T > | |
void | read_binary (char *&in, T &buffer) |
template<class T > | |
std::streamsize | read_binary_with_count (std::istream &in, T &buffer) |
template<class T > | |
std::streamsize | read_binary_with_count (char *&in, T &buffer) |
template<class T > | |
T | read_binary (std::istream &in) |
template<class T > | |
void | read_binary (std::istream &in, std::vector< T > &buffer, const size_t n) |
template<class T > | |
void | read_binary (std::istream &in, std::vector< T > &buffer) |
void | read_binary (std::istream &in, std::string &str, const std::string &default_val) |
template<class T > | |
void | write_binary (std::ostream &out, const T *buffer, const size_t n) |
template<class T > | |
void | write_binary (std::ostream &out, const T &buffer) |
template<class T > | |
void | write_binary (std::ostream &out, const std::vector< T > &buffer, const size_t n) |
template<class T > | |
void | write_binary (std::ostream &out, const std::vector< T > &buffer) |
void | write_binary (std::ostream &out, const std::string &str) |
std::streamsize | scount (std::istream &in) |
std::streamsize | scount (std::ostream &out) |
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 |
template<class Metric > | |
bool | is_deprecated (const int version) |
template<class MetricSet > | |
bool | is_deprecated_set (MetricSet &metrics) |
template<class MetricType > | |
std::string | interop_filename (const std::string &run_directory, bool use_out=true) |
template<class MetricType > | |
std::string | interop_basename (bool use_out=true) |
template<class MetricType , typename OutputIterator > | |
void | copy_versions (OutputIterator oit) |
template<class MetricSet > | |
size_t | read_header (std::istream &in, MetricSet &metrics) |
template<class MetricSet > | |
void | read_metrics (std::istream &in, MetricSet &metrics, const size_t file_size, const bool rebuild=true) |
template<class MetricType > | |
size_t | record_size (const typename MetricType::header_type &header, const ::int16_t version=MetricType::LATEST_VERSION) |
template<class MetricType , class HeaderType > | |
size_t | size_of_record (const HeaderType &header, const ::int16_t version=MetricType::LATEST_VERSION) |
template<class MetricSet > | |
bool | is_multi_record (const MetricSet &header,::int16_t version=-1) |
template<class MetricSet > | |
size_t | size_of_buffer (const MetricSet &metric_set,::int16_t version=-1) |
template<class MetricType , class Header > | |
size_t | size_of_header (const Header &header, const ::int16_t version=MetricType::LATEST_VERSION) |
template<class MetricSet > | |
size_t | header_size (const MetricSet &header,::int16_t version=-1) |
template<class MetricType > | |
void | write_metric (std::ostream &out, const MetricType &metric, const typename MetricType::header_type &header, const ::int16_t version) |
template<class MetricType > | |
void | write_metric_header (std::ostream &out, const ::int16_t version, const typename MetricType::header_type &header=typename MetricType::header_type()) |
template<class MetricType > | |
std::string | interop_filename (const std::string &run_directory, const size_t cycle, bool use_out=true) |
std::string | combine (const std::string &path, const std::string &name) |
std::string | combine (const std::string &path1, const std::string &path2, const std::string &path3) |
std::string | basename (std::string const &source) |
std::string | dirname (std::string source) |
bool | is_file_readable (const std::string &filename) |
bool | mkdir (const std::string &path, const int mode=0733) |
::int64_t | file_size (const std::string &path) |
Function Documentation
std::string basename | ( | std::string const & | source | ) |
Get the file name from a file path
- Parameters
-
source full file path
- Returns
- name of the file
std::string combine | ( | const std::string & | path, |
const std::string & | name | ||
) |
Combine two directories or a directory and a filename into a file path
This function provides a platform independent way to generate a file path. It currently supports most operating systems include Mac OSX, Windows and Linux/Unix.
- Parameters
-
path string representing a file path name string representing a file or directory name to append to the end of the path
- Returns
- proper os-dependent file path
std::string combine | ( | const std::string & | path1, |
const std::string & | path2, | ||
const std::string & | path3 | ||
) |
Combine two directories or a directory and a filename into a file path
This function provides a platform independent way to generate a file path. It currently supports most operating systems include Mac OSX, Windows and Linux/Unix.
- Parameters
-
path1 string representing a file path 1 path2 string representing a file path 2 path3 string representing a file path 3
- Returns
- proper os-dependent file path
void illumina::interop::io::copy_from | ( | std::ostream & | , |
const Source & | , | ||
const Destination & | |||
) |
Place holder that does not perform a copy
void illumina::interop::io::copy_from | ( | std::istream & | , |
Destination & | dst, | ||
const Source & | src | ||
) |
Copy from source to destination
- Parameters
-
dst destination src source
void illumina::interop::io::copy_from | ( | const char * | , |
Destination & | dst, | ||
const Source & | src | ||
) |
Copy from source to destination
- Parameters
-
dst destination src source
void illumina::interop::io::copy_versions | ( | OutputIterator | oit | ) |
Copy list of version numbers to output iterator
- Parameters
-
oit destination iterator for versions
std::string dirname | ( | std::string | source | ) |
Get the directory name from a file path
- Parameters
-
source full file path
- Returns
- name of the directory
int64_t file_size | ( | const std::string & | path | ) |
Get the size of a file
This should be more efficient than opening a file and seeking the end.
- Parameters
-
path path to the target file
- Returns
- size of the file or -1 if the operation failed
size_t illumina::interop::io::header_size | ( | const MetricSet & | header, |
::int16_t | version = -1 |
||
) |
Get the size of a metric file header
- Parameters
-
header header for metric version version of the format
- Returns
- size of metric file header
std::string illumina::interop::io::interop_basename | ( | bool | use_out = true | ) |
Generate a file name from a run directory and the metric type
- Note
- The 'Out' suffix is appended when we read the file. We excluded the Out in certain conditions when writing the file.
- Parameters
-
use_out if true, append "Out" to the end of the filename
- Returns
- file path to the InterOp directory
std::string illumina::interop::io::interop_filename | ( | const std::string & | run_directory, |
bool | use_out = true |
||
) |
Generate a file name from a run directory and the metric type
- Note
- The 'Out' suffix 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 if true, append "Out" to the end of the filename
- Returns
- file path to the InterOp directory
std::string illumina::interop::io::interop_filename | ( | const std::string & | run_directory, |
const size_t | cycle, | ||
bool | use_out = true |
||
) |
Generate a file name from a run directory and the metric type for by cycle InterOps
- Note
- The 'Out' suffix 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 cycle current cycle use_out if true, append "Out" to the end of the filename
- Returns
- file path to the InterOp directory
bool illumina::interop::io::is_deprecated | ( | const int | version | ) |
Test if metric format version is deprecated
- Parameters
-
version version of format to check
- Returns
- true if format version is deprecated
bool illumina::interop::io::is_deprecated_set | ( | MetricSet & | metrics | ) |
Test if metric format version is deprecated
- Parameters
-
metrics metric set version
- Returns
- true if format version is deprecated
bool is_file_readable | ( | const std::string & | filename | ) |
Check if a file exists
- Parameters
-
filename name of the file
- Returns
- true if the file exists and is readable
bool illumina::interop::io::is_multi_record | ( | const MetricSet & | header, |
::int16_t | version = -1 |
||
) |
Test whether the format support multi-records
- Parameters
-
header header for metric version version of the format
- Returns
- true if the format supports multiple records
void illumina::interop::io::map_resize | ( | const Layout & | , |
size_t | |||
) |
Placeholder that does nothing
void illumina::interop::io::map_resize | ( | Layout & | layout, |
const size_t | n | ||
) |
Resize both vectors
- Parameters
-
layout vector of layout values n number of elements
bool mkdir | ( | const std::string & | path, |
const int | mode = 0733 |
||
) |
Create a directory
- Parameters
-
path path to new directory mode permissions on directory
- Returns
- true if directory was created
Create a directory
- Parameters
-
path path to new directory
- Returns
- true if directory was created
std::streamsize illumina::interop::io::padded_stream_map | ( | std::istream & | in, |
std::vector< ValueType > & | vals, | ||
const size_t | n, | ||
const ReadType | |||
) |
Read an array of values of type ReadType from the given input stream
TODO: create more efficient buffered version
- Parameters
-
in input stream vals destination array of values n number of values to read
- Returns
- number of bytes read from the stream
std::streamsize illumina::interop::io::padded_stream_map | ( | char *& | in, |
std::vector< ValueType > & | vals, | ||
const size_t | n, | ||
const ReadType | |||
) |
Read an array of values of type ReadType from the given input stream
TODO: create more efficient buffered version
- Parameters
-
in input stream vals destination array of values n number of values to read
- Returns
- number of bytes read from the stream
std::streamsize illumina::interop::io::padded_stream_map | ( | std::ostream & | out, |
const ValueType & | vals, | ||
const size_t | n, | ||
const WriteType | pad | ||
) |
Write an array of values of type ReadType to the given output stream
TODO: create more efficient buffered version
- Parameters
-
out output stream vals destination array of values n number of values in array pad default number of pad
- Returns
- number of bytes written to the stream
void illumina::interop::io::read_binary | ( | std::istream & | in, |
T * | buffer, | ||
const size_t | n | ||
) |
Read an array of data from an input stream
- Parameters
-
in input stream buffer array of data n number of elements in the array
void illumina::interop::io::read_binary | ( | std::istream & | in, |
T & | buffer | ||
) |
Read an value of binary data from an input stream
- Parameters
-
in input stream buffer value
void illumina::interop::io::read_binary | ( | char *& | in, |
T * | buffer, | ||
const size_t | n | ||
) |
Read an array of data from an input stream
- Parameters
-
in input stream buffer array of data n number of elements in the array
void illumina::interop::io::read_binary | ( | char *& | in, |
T & | buffer | ||
) |
Read an value of binary data from an input stream
- Parameters
-
in input stream buffer destination
T illumina::interop::io::read_binary | ( | std::istream & | in | ) |
Read an value of binary data from an input stream
- Parameters
-
in input stream
- Returns
- buffer value
void illumina::interop::io::read_binary | ( | std::istream & | in, |
std::vector< T > & | buffer, | ||
const size_t | n | ||
) |
Read a vector of data from an input stream
- Parameters
-
in input stream buffer vector of data n number of elements in the vector
void illumina::interop::io::read_binary | ( | std::istream & | in, |
std::vector< T > & | buffer | ||
) |
Read a vector of data from an input stream
- Parameters
-
in input stream buffer vector of data
|
inline |
Read string data from a binary file stream
- Parameters
-
in input stream str string buffer default_val default value for an empty string
std::streamsize illumina::interop::io::read_binary_with_count | ( | std::istream & | in, |
T & | buffer | ||
) |
Read binary and return a count
- Parameters
-
in input stream buffer destination
- Returns
- number of bytes read
std::streamsize illumina::interop::io::read_binary_with_count | ( | char *& | in, |
T & | buffer | ||
) |
Read binary and return
- Parameters
-
in input stream buffer destination
- Returns
- number of bytes read
size_t illumina::interop::io::read_header | ( | std::istream & | in, |
MetricSet & | metrics | ||
) |
Read the header from the stream
- Parameters
-
in input stream metrics metric set
- Returns
- number of bytes read from the stream
void illumina::interop::io::read_metrics | ( | std::istream & | in, |
MetricSet & | metrics, | ||
const size_t | file_size, | ||
const bool | rebuild = true |
||
) |
Read the binary InterOp file into the given metric set
- Parameters
-
in input stream metrics metric set file_size number of bytes in the file rebuild flag indicating whether to rebuild the lookup table
size_t illumina::interop::io::record_size | ( | const typename MetricType::header_type & | header, |
const ::int16_t | version = MetricType::LATEST_VERSION |
||
) |
Get the size of a single metric record
- Parameters
-
header header for metric version version of the format
- Returns
- size of a single metric record
|
inline |
Number of characters extracted on the last unformatted (binary) input operation
- Parameters
-
in input stream
- Returns
- number of characters read
|
inline |
Number of characters written so far to the stream
- Parameters
-
out output stream
- Returns
- number of characters written
size_t illumina::interop::io::size_of_buffer | ( | const MetricSet & | metric_set, |
::int16_t | version = -1 |
||
) |
Get the size of a metric file header
- Parameters
-
metric_set set of metrics version version of the format
- Returns
- size of metric file header
size_t illumina::interop::io::size_of_header | ( | const Header & | header, |
const ::int16_t | version = MetricType::LATEST_VERSION |
||
) |
Get the size of a metric file header
- Parameters
-
header header for metric version version of the format
- Returns
- size of metric file header
size_t illumina::interop::io::size_of_record | ( | const HeaderType & | header, |
const ::int16_t | version = MetricType::LATEST_VERSION |
||
) |
Get the size of a single metric record
- Parameters
-
header header for metric version version of the format
- Returns
- size of a single metric record
std::streamsize illumina::interop::io::stream_map | ( | std::istream & | in, |
ValueType & | val | ||
) |
Read a value of type ReadType from the given input stream
- Parameters
-
in input stream val destination value
- Returns
- number of characters read
std::streamsize illumina::interop::io::stream_map | ( | char *& | in, |
ValueType & | val | ||
) |
Read a value of type ReadType from the given input stream
- Parameters
-
in input stream val destination value
- Returns
- number of characters read
|
inline |
Read a string from the given input stream
- Parameters
-
in input stream val destination string
- Returns
- number of characters read
|
inline |
Read a string from the given input stream
- Parameters
-
in input stream val destination string
- Returns
- number of characters read
std::streamsize illumina::interop::io::stream_map | ( | std::istream & | in, |
std::vector< ValueType > & | vals, | ||
const size_t | n | ||
) |
Read an array of values of type ReadType from the given input stream
TODO: create more efficient buffered version
- Parameters
-
in input stream vals destination array of values n number of values to read
- Returns
- number of bytes read from the stream
std::streamsize illumina::interop::io::stream_map | ( | char *& | in, |
std::vector< ValueType > & | vals, | ||
const size_t | n | ||
) |
Read an array of values of type ReadType from the given input stream
TODO: create more efficient buffered version
- Parameters
-
in input stream vals destination array of values n number of values to read
- Returns
- number of bytes read from the stream
std::streamsize illumina::interop::io::stream_map | ( | std::istream & | in, |
std::vector< ValueType > & | vals, | ||
const size_t | offset, | ||
const size_t | n | ||
) |
Read an array of values of type ReadType from the given input stream
TODO: create more efficient buffered version
- Parameters
-
in input stream vals destination array of values offset starting index of values to copy to in vals n number of values to read
- Returns
- number of bytes read from the stream
std::streamsize illumina::interop::io::stream_map | ( | char *& | in, |
std::vector< ValueType > & | vals, | ||
const size_t | offset, | ||
const size_t | n | ||
) |
Read an array of values of type ReadType from the given input stream
TODO: create more efficient buffered version
- Parameters
-
in input stream vals destination array of values offset starting index of values to copy to in vals n number of values to read
- Returns
- number of bytes read from the stream
std::streamsize illumina::interop::io::stream_map | ( | std::istream & | in, |
ValueType(&) | vals[N], | ||
const size_t | n | ||
) |
Read an array of values of type ReadType from the given input stream
TODO: create more efficient buffered version
- Parameters
-
in input stream vals destination array of values n number of values in array
- Returns
- number of bytes read from the stream
std::streamsize illumina::interop::io::stream_map | ( | char *& | in, |
ValueType(&) | vals[N], | ||
const size_t | n | ||
) |
Read an array of values of type ReadType from the given input stream
TODO: create more efficient buffered version
- Parameters
-
in input stream vals destination array of values n number of values in array
- Returns
- number of bytes read from the stream
std::streamsize illumina::interop::io::stream_map | ( | std::ostream & | out, |
const ValueType | val | ||
) |
Write a value of type ReadType to the given output stream
- Parameters
-
out output stream val source value
- Returns
- number of bytes written to the stream
|
inline |
Write a string to the given output stream
TODO: create more efficient buffered version
- Parameters
-
out output stream str source string
- Returns
- number of bytes written to the stream
std::streamsize illumina::interop::io::stream_map | ( | std::ostream & | out, |
const ValueType & | vals, | ||
const size_t | n | ||
) |
Write an array of values of type ReadType to the given output stream
TODO: create more efficient buffered version
- Parameters
-
out output stream vals destination array of values n number of values in array
- Returns
- number of bytes written to the stream
std::streamsize illumina::interop::io::stream_map | ( | std::ostream & | out, |
const ValueType & | vals, | ||
const size_t | offset, | ||
const size_t | n | ||
) |
Write an array of values of type ReadType to the given output stream
TODO: create more efficient buffered version
- Parameters
-
out output stream vals destination array of values offset starting index of values to write to in vals n number of values in array
- Returns
- number of bytes written to the stream
void illumina::interop::io::write_binary | ( | std::ostream & | out, |
const T * | buffer, | ||
const size_t | n | ||
) |
Write an array of data to an output stream
- Parameters
-
out output stream buffer array of data n number of elements in the array
void illumina::interop::io::write_binary | ( | std::ostream & | out, |
const T & | buffer | ||
) |
Write a value as binary data to an output stream
- Parameters
-
out output stream buffer value
void illumina::interop::io::write_binary | ( | std::ostream & | out, |
const std::vector< T > & | buffer, | ||
const size_t | n | ||
) |
Write an vector of data to an output stream
- Parameters
-
out output stream buffer vector of data n number of elements in the vector
void illumina::interop::io::write_binary | ( | std::ostream & | out, |
const std::vector< T > & | buffer | ||
) |
Write an vector of data to an output stream
- Parameters
-
out output stream buffer vector of data
|
inline |
Write string data to a binary file stream
- Parameters
-
out output stream str string buffer
void illumina::interop::io::write_metric | ( | std::ostream & | out, |
const MetricType & | metric, | ||
const typename MetricType::header_type & | header, | ||
const ::int16_t | version | ||
) |
Write a metric to a binary InterOp file
- Parameters
-
out output stream metric metric header header for metric version version of the format
void illumina::interop::io::write_metric_header | ( | std::ostream & | out, |
const ::int16_t | version, | ||
const typename MetricType::header_type & | header = typename MetricType::header_type() |
||
) |
Write a header describing the metric records
- Parameters
-
out output stream version version of format header metric header