illumina::interop::io Namespace Reference

Namespaces

 detail
 
 layout
 
 plot
 
 table
 

Classes

struct  abstract_metric_format
 
struct  abstract_text_format
 
struct  bad_format_exception
 
struct  default_layout
 
struct  file_not_found_exception
 
struct  format_exception
 
struct  generic_layout
 
struct  generic_layout< corrected_intensity_metric, 2 >
 
struct  generic_layout< corrected_intensity_metric, 3 >
 
struct  generic_layout< corrected_intensity_metric, 4 >
 
struct  generic_layout< dynamic_phasing_metric, 1 >
 
struct  generic_layout< error_metric, 3 >
 
struct  generic_layout< error_metric, 4 >
 
struct  generic_layout< error_metric, 5 >
 
struct  generic_layout< error_metric, 6 >
 
struct  generic_layout< extended_tile_metric, 1 >
 
struct  generic_layout< extended_tile_metric, 2 >
 
struct  generic_layout< extended_tile_metric, 3 >
 
struct  generic_layout< extraction_metric, 2 >
 
struct  generic_layout< extraction_metric, 3 >
 
struct  generic_layout< image_metric, 1 >
 
struct  generic_layout< image_metric, 2 >
 
struct  generic_layout< image_metric, 3 >
 
struct  generic_layout< index_flowcell_summary, 1 >
 
struct  generic_layout< index_metric, 1 >
 
struct  generic_layout< index_metric, 2 >
 
struct  generic_layout< phasing_metric, 1 >
 
struct  generic_layout< phasing_metric, 2 >
 
struct  generic_layout< q_by_lane_metric, 4 >
 
struct  generic_layout< q_by_lane_metric, 5 >
 
struct  generic_layout< q_by_lane_metric, 6 >
 
struct  generic_layout< q_collapsed_metric, 2 >
 
struct  generic_layout< q_collapsed_metric, 3 >
 
struct  generic_layout< q_collapsed_metric, 4 >
 
struct  generic_layout< q_collapsed_metric, 5 >
 
struct  generic_layout< q_collapsed_metric, 6 >
 
struct  generic_layout< q_metric, 4 >
 
struct  generic_layout< q_metric, 5 >
 
struct  generic_layout< q_metric, 6 >
 
struct  generic_layout< q_metric, 7 >
 
struct  generic_layout< run_summary, 1 >
 
struct  generic_layout< summary_run_metric, 1 >
 
struct  generic_layout< tile_metric, 2 >
 
struct  generic_layout< tile_metric, 3 >
 
struct  incomplete_file_exception
 
struct  invalid_argument
 
struct  metric_format
 
struct  metric_format_factory
 
class  paths
 
struct  q_score_bin_layout
 
struct  read_array_helper
 
struct  read_array_helper< ReadType, ValueType, true >
 
struct  text_format
 
struct  text_format< Metric, text_layout< Metric, Version > >
 
struct  text_format_factory
 
struct  text_format_factory_proxy
 
struct  text_layout
 
struct  text_layout< corrected_intensity_metric, 1 >
 
struct  text_layout< dynamic_phasing_metric, 1 >
 
struct  text_layout< error_metric, 1 >
 
struct  text_layout< error_metric, 2 >
 
struct  text_layout< error_metric, 3 >
 
struct  text_layout< extended_tile_metric, 1 >
 
struct  text_layout< extended_tile_metric, 2 >
 
struct  text_layout< extraction_metric, 1 >
 
struct  text_layout< image_metric, 1 >
 
struct  text_layout< index_metric, 1 >
 
struct  text_layout< phasing_metric, 1 >
 
struct  text_layout< q_by_lane_metric, 1 >
 
struct  text_layout< q_collapsed_metric, 1 >
 
struct  text_layout< q_metric, 1 >
 
struct  text_layout< summary_run_metric, 1 >
 
struct  text_layout< tile_metric, 1 >
 

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 >
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
sourcefull 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
pathstring representing a file path
namestring 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
path1string representing a file path 1
path2string representing a file path 2
path3string 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
dstdestination
srcsource
void illumina::interop::io::copy_from ( const char *  ,
Destination &  dst,
const Source &  src 
)

Copy from source to destination

Parameters
dstdestination
srcsource
void illumina::interop::io::copy_versions ( OutputIterator  oit)

Copy list of version numbers to output iterator

Parameters
oitdestination iterator for versions
std::string dirname ( std::string  source)

Get the directory name from a file path

Parameters
sourcefull 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
pathpath 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
headerheader for metric
versionversion 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_outif 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_directoryfile path to the run directory
use_outif 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_directoryfile path to the run directory
cyclecurrent cycle
use_outif 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
versionversion 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
metricsmetric set
version
Returns
true if format version is deprecated
bool is_file_readable ( const std::string &  filename)

Check if a file exists

Parameters
filenamename 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
headerheader for metric
versionversion 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
layoutvector of layout values
nnumber of elements
bool mkdir ( const std::string &  path,
const int  mode = 0733 
)

Create a directory

Parameters
pathpath to new directory
modepermissions on directory
Returns
true if directory was created

Create a directory

Parameters
pathpath 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
ininput stream
valsdestination array of values
nnumber 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
ininput stream
valsdestination array of values
nnumber 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
outoutput stream
valsdestination array of values
nnumber of values in array
paddefault 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
ininput stream
bufferarray of data
nnumber 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
ininput stream
buffervalue
void illumina::interop::io::read_binary ( char *&  in,
T *  buffer,
const size_t  n 
)

Read an array of data from an input stream

Parameters
ininput stream
bufferarray of data
nnumber 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
ininput stream
bufferdestination
T illumina::interop::io::read_binary ( std::istream &  in)

Read an value of binary data from an input stream

Parameters
ininput 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
ininput stream
buffervector of data
nnumber 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
ininput stream
buffervector of data
void illumina::interop::io::read_binary ( std::istream &  in,
std::string &  str,
const std::string &  default_val 
)
inline

Read string data from a binary file stream

Parameters
ininput stream
strstring buffer
default_valdefault 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
ininput stream
bufferdestination
Returns
number of bytes read
std::streamsize illumina::interop::io::read_binary_with_count ( char *&  in,
T &  buffer 
)

Read binary and return

Parameters
ininput stream
bufferdestination
Returns
number of bytes read
size_t illumina::interop::io::read_header ( std::istream &  in,
MetricSet &  metrics 
)

Read the header from the stream

Parameters
ininput stream
metricsmetric 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
ininput stream
metricsmetric set
file_sizenumber of bytes in the file
rebuildflag 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
headerheader for metric
versionversion of the format
Returns
size of a single metric record
std::streamsize illumina::interop::io::scount ( std::istream &  in)
inline

Number of characters extracted on the last unformatted (binary) input operation

Parameters
ininput stream
Returns
number of characters read
std::streamsize illumina::interop::io::scount ( std::ostream &  out)
inline

Number of characters written so far to the stream

Parameters
outoutput 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_setset of metrics
versionversion 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
headerheader for metric
versionversion 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
headerheader for metric
versionversion 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
ininput stream
valdestination 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
ininput stream
valdestination value
Returns
number of characters read
std::streamsize illumina::interop::io::stream_map ( std::istream &  in,
std::string &  val 
)
inline

Read a string from the given input stream

Parameters
ininput stream
valdestination string
Returns
number of characters read
std::streamsize illumina::interop::io::stream_map ( char *&  in,
std::string &  val 
)
inline

Read a string from the given input stream

Parameters
ininput stream
valdestination 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
ininput stream
valsdestination array of values
nnumber 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
ininput stream
valsdestination array of values
nnumber 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
ininput stream
valsdestination array of values
offsetstarting index of values to copy to in vals
nnumber 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
ininput stream
valsdestination array of values
offsetstarting index of values to copy to in vals
nnumber 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
ininput stream
valsdestination array of values
nnumber 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
ininput stream
valsdestination array of values
nnumber 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
outoutput stream
valsource value
Returns
number of bytes written to the stream
std::streamsize illumina::interop::io::stream_map ( std::ostream &  out,
const std::string &  str 
)
inline

Write a string to the given output stream

TODO: create more efficient buffered version

Parameters
outoutput stream
strsource 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
outoutput stream
valsdestination array of values
nnumber 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
outoutput stream
valsdestination array of values
offsetstarting index of values to write to in vals
nnumber 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
outoutput stream
bufferarray of data
nnumber 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
outoutput stream
buffervalue
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
outoutput stream
buffervector of data
nnumber 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
outoutput stream
buffervector of data
void illumina::interop::io::write_binary ( std::ostream &  out,
const std::string &  str 
)
inline

Write string data to a binary file stream

Parameters
outoutput stream
strstring 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
outoutput stream
metricmetric
headerheader for metric
versionversion 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
outoutput stream
versionversion of format
headermetric header