filter_options Class Reference

#include <filter_options.h>

Public Types

enum  UseAll { ALL_IDS = 0, ALL_CHANNELS = -1, ALL_BASES = -1 }
 
typedef constants::dna_bases dna_base_t
 
typedef ::int16_t channel_t
 
typedef model::metric_base::base_metric::uint_t id_t
 

Public Member Functions

 filter_options (const constants::tile_naming_method naming_method, const id_t lane=ALL_IDS, const channel_t channel=ALL_CHANNELS, const dna_base_t base=static_cast< dna_base_t >(ALL_BASES), const id_t surface=ALL_IDS, const id_t read=ALL_IDS, const id_t cycle=ALL_IDS, const id_t tile_number=ALL_IDS, const id_t swath=ALL_IDS, const id_t section=ALL_IDS, const size_t subsample=0)
 
void reset ()
 
void validate (const constants::metric_type type, const run::info &run_info, const bool check_ignored=false) const INTEROP_THROW_SPEC((model
 
template<class Metric >
bool valid_tile (const Metric &metric) const
 
template<class Metric >
bool valid_tile_cycle (const Metric &metric) const
 
template<class Metric >
bool valid_read (const Metric &metric) const
 
bool all_channels (const constants::metric_type type) const
 
bool all_channels () const
 
bool all_bases (const constants::metric_type type) const
 
bool all_bases () const
 
bool all_reads () const
 
bool all_cycles () const
 
bool all_lanes () const
 
bool all_tile_numbers () const
 
bool all_swaths () const
 
bool all_sections () const
 
bool is_specific_read (const constants::metric_type type) const
 
bool is_specific_read () const
 
bool is_specific_surface () const
 
bool valid_lane (const id_t lane) const
 
bool valid_surface (const id_t surface) const
 
bool valid_read (const id_t read) const
 
bool valid_cycle (const id_t cycle) const
 
bool valid_tile_number (const id_t tile_number) const
 
bool valid_swath (const id_t swath) const
 
bool valid_section (const id_t section) const
 
bool valid_channel (const channel_t channel) const
 
bool valid_base (const dna_base_t base) const
 
void subsample (const size_t count)
 
void tile_naming_method (const constants::tile_naming_method naming_method)
 
void channel (const channel_t channel)
 
void dna_base (const dna_base_t base)
 
void read (const id_t r)
 
void cycle (const id_t c)
 
void surface (const id_t s)
 
void swath (const id_t s)
 
void section (const id_t s)
 
void tile_number (const id_t s)
 
void lane (const id_t l)
 
id_t lane () const
 
channel_t channel () const
 
dna_base_t dna_base () const
 
id_t read () const
 
id_t cycle () const
 
id_t surface () const
 
std::string cycle_description () const
 
std::string lane_description () const
 
std::string channel_description (const std::vector< std::string > &channels) const
 
std::string base_description () const
 
std::string surface_description () const
 
std::string read_description () const
 
constants::tile_naming_method naming_method () const
 
util::chain_range_iterator option_iterator (const model::run::info &info, const constants::metric_type metric_type, const constants::plot_types plot_type, const bool keep_state=false)
 
bool supports_section (const constants::plot_types, const model::run::info &info) const
 
bool supports_swath (const constants::plot_types) const
 
bool supports_tile (const constants::plot_types) const
 
bool supports_all_lanes (const constants::plot_types plot_type) const
 
bool supports_lane (const constants::plot_types plot_type) const
 
bool supports_all_bases (const constants::plot_types plot_type) const
 
bool supports_base (const constants::metric_type metric_type) const
 
bool supports_all_channels (const constants::plot_types plot_type) const
 
bool supports_channel (const constants::metric_type metric_type) const
 
bool supports_all_cycles (const constants::plot_types plot_type) const
 
bool supports_cycle (const constants::metric_type metric_type, const constants::plot_types plot_type) const
 
bool supports_all_reads (const constants::plot_types plot_type) const
 
bool supports_read (const constants::metric_type metric_type, const constants::plot_types plot_type) const
 
bool supports_surface (const constants::metric_type metric_type, const model::run::info &info) const
 
size_t subsample () const
 

Friends

std::ostream & operator<< (std::ostream &out, const filter_options &options)
 

Detailed Description

Options to filter metrics

Member Typedef Documentation

typedef ::int16_t channel_t

Channel type - Range: 0-N - All: -1

DNA base enumerated type - Range: A,C,G,T - All: NC

ID type - Range: 1-N - All: 0

Member Enumeration Documentation

enum UseAll

Sentinels for use all of a specific type

Enumerator
ALL_IDS 

All sentinel for id types

ALL_CHANNELS 

All sentinel for channel types

ALL_BASES 

All sentinel for base types

Constructor & Destructor Documentation

filter_options ( const constants::tile_naming_method  naming_method,
const id_t  lane = ALL_IDS,
const channel_t  channel = ALL_CHANNELS,
const dna_base_t  base = static_cast<dna_base_t>(ALL_BASES),
const id_t  surface = ALL_IDS,
const id_t  read = ALL_IDS,
const id_t  cycle = ALL_IDS,
const id_t  tile_number = ALL_IDS,
const id_t  swath = ALL_IDS,
const id_t  section = ALL_IDS,
const size_t  subsample = 0 
)
inline

Constructor

Parameters
naming_methodtile naming method
lanelane number
channelchannel number (order based on RunInfo.xml)
baseenumerate type
surfacesurface number
readread number
cyclecycle number
tile_numbertile number
swathswath number
sectionsection number
subsampleamount to subsample points

Member Function Documentation

bool all_bases ( const constants::metric_type  type) const
inline

Test if all bases were requested

Parameters
typemetric type
Returns
true if metric type supports bases and all bases requested
bool all_bases ( ) const
inline

Test if all bases were requested

Returns
true if all bases requested
bool all_channels ( const constants::metric_type  type) const
inline

Test if all channels were requested

Parameters
typemetric type
Returns
true if metric supports channels and all channels requested
bool all_channels ( ) const
inline

Test if all channels were requested

Returns
true if metric supports channels and all channels requested
bool all_cycles ( ) const
inline

Test if all cycles were requested

Returns
true if all cycles were requested
bool all_lanes ( ) const
inline

Test if all lanes were requested

Returns
true if all lanes were requested
bool all_reads ( ) const
inline

Test if all reads were requested

Returns
true if all reads were requested
bool all_sections ( ) const
inline

Test if all sections were requested

Returns
true if all sections were requested
bool all_swaths ( ) const
inline

Test if all swaths were requested

Returns
true if all swaths were requested
bool all_tile_numbers ( ) const
inline

Test if all tile numbers were requested

Returns
true if all tile numbers were requested
std::string base_description ( ) const
inline

Get a description of the base filter options

Returns
description
channel_t channel ( ) const
inline

Get channel to display

Returns
channel
std::string channel_description ( const std::vector< std::string > &  channels) const
inline

Get a description of the channel filter options

Returns
description
id_t cycle ( ) const
inline

Get cycle to display

Returns
cycle
std::string cycle_description ( ) const
inline

Get a description for the cycle filter option

Returns
description for the cycle filter option
dna_base_t dna_base ( ) const
inline

Get base to display

Returns
base
bool is_specific_read ( const constants::metric_type  type) const
inline

Test if metric is read metric and specific read is chosen

Parameters
typemetric type
Returns
true if metric type supports reads and a specific read is requested
bool is_specific_read ( ) const
inline

Test if specific read is chosen

Returns
true if a specific read is requested
bool is_specific_surface ( ) const
inline

Test if specific surface is chosen

Returns
true if a specific surface is requested
id_t lane ( ) const
inline

Get the lane to display

Returns
lane
std::string lane_description ( ) const
inline

Get a description of the lane filter options

Returns
description
constants::tile_naming_method naming_method ( ) const
inline

Get the tile naming convention

Returns
tile naming convention
util::chain_range_iterator option_iterator ( const model::run::info info,
const constants::metric_type  metric_type,
const constants::plot_types  plot_type,
const bool  keep_state = false 
)
inline

Create an iterator that updates the current object

flowcell - does not support lanes

Parameters
inforun info
metric_typemetric type
plot_typetype of the plot
keep_statekeep the current state of the options
Returns
iterator
id_t read ( ) const
inline

Get read to display

Returns
read
std::string read_description ( ) const
inline

Get a description of the read filter options

Returns
description
void reset ( )
inline

Reset all options to default values (except naming_method)

size_t subsample ( ) const
inline

Number of points to subsample

Returns
maximum number of points
bool supports_all_bases ( const constants::plot_types  plot_type) const
inline

Test if plot supports filtering by all bases

Parameters
plot_typeplot type
Returns
true if plot supports filtering by base
bool supports_all_channels ( const constants::plot_types  plot_type) const
inline

Test if plot supports filtering by all channels

Parameters
plot_typeplot type
Returns
true if plot supports filtering all channels
bool supports_all_cycles ( const constants::plot_types  plot_type) const
inline

Test if plot supports filtering by all cycles

Parameters
plot_typeplot type
Returns
true if plot supports filtering by all cycles
bool supports_all_lanes ( const constants::plot_types  plot_type) const
inline

Test if plot supports filtering by all lanes

Parameters
plot_typetype of plot
Returns
true if metric supports filtering by all lanes
bool supports_all_reads ( const constants::plot_types  plot_type) const
inline

Test if plot supports filtering by all reads

Parameters
plot_typeplot type
Returns
true if plot supports filtering by all reads
bool supports_base ( const constants::metric_type  metric_type) const
inline

Test if metric supports filtering by base

Parameters
metric_typemetric type
Returns
true if metric supports filtering by base
bool supports_channel ( const constants::metric_type  metric_type) const
inline

Test if metric supports filtering by channel

Parameters
metric_typemetric type
Returns
true if metric supports filtering by channel
bool supports_cycle ( const constants::metric_type  metric_type,
const constants::plot_types  plot_type 
) const
inline

Test if metric and plot combination supports filtering by cycle

Parameters
metric_typemetric type
plot_typeplot type
Returns
true if metric supports filtering by cycle
bool supports_lane ( const constants::plot_types  plot_type) const
inline

Test if plot supports filtering by lane

Parameters
plot_typetype of plot
Returns
true if metric supports filtering by lane
bool supports_read ( const constants::metric_type  metric_type,
const constants::plot_types  plot_type 
) const
inline

Test if metric and plot combination supports filtering by read

Parameters
metric_typemetric type
plot_typetype of plot
Returns
true if metric supports filtering by read
bool supports_section ( const constants::plot_types  ,
const model::run::info info 
) const
inline

Test if the combination of the plot and run info support filtering by section

param plot_type type of plot

Parameters
inforun info
Returns
true if metric supports filtering by swath
bool supports_surface ( const constants::metric_type  metric_type,
const model::run::info info 
) const
inline

Test if metric and run info combination supports filtering by surface

Parameters
metric_typemetric type
inforun info
Returns
true if metric supports filtering by surface
bool supports_swath ( const constants::plot_types  ) const
inline

Test if plot supports filtering by swath

param plot_type type of plot

Returns
true if metric supports filtering by swath
bool supports_tile ( const constants::plot_types  ) const
inline

Test if plot supports filtering by tile

param plot_type type of plot

Returns
true if metric supports filtering by tile
id_t surface ( ) const
inline

Get surface to display

Returns
cycle
std::string surface_description ( ) const
inline

Get a description of the surface filter options

Returns
description
bool valid_base ( const dna_base_t  base) const
inline

Test if the base if valid

Returns
true if base should not be filtered
bool valid_channel ( const channel_t  channel) const
inline

Test if the channel if valid

Returns
true if channel should not be filtered
bool valid_cycle ( const id_t  cycle) const
inline

Test if the cycle if valid

Returns
true if cycle should not be filtered
bool valid_lane ( const id_t  lane) const
inline

Test if the lane if valid

Returns
true if lane should not be filtered
bool valid_read ( const Metric &  metric) const
inline

Test if metric is a valid read

Parameters
metricany metric type
Returns
true if the tile should not be filtered
bool valid_read ( const id_t  read) const
inline

Test if the read if valid

Returns
true if read should not be filtered
bool valid_section ( const id_t  section) const
inline

Test if the section if valid

Returns
true if section should not be filtered
bool valid_surface ( const id_t  surface) const
inline

Test if the surface if valid

Returns
true if surface should not be filtered
bool valid_swath ( const id_t  swath) const
inline

Test if the swath if valid

Returns
true if swath should not be filtered
bool valid_tile ( const Metric &  metric) const
inline

Test if metric is a valid tile

Parameters
metricany metric type
Returns
true if the tile should not be filtered
bool valid_tile_cycle ( const Metric &  metric) const
inline

Test if metric is a valid tile

Parameters
metricany metric type
Returns
true if the tile should not be filtered
bool valid_tile_number ( const id_t  tile_number) const
inline

Test if the tile number if valid

Returns
true if tile number should not be filtered
void validate ( const constants::metric_type  type,
const run::info run_info,
const bool  check_ignored = false 
) const
inline

Test if the filter options are valid, if not throw an exception

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const filter_options options 
)
friend

The documentation for this class was generated from the following file: