SHORE API
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
shore Namespace Reference

SHORE core API. More...

Classes

class  size_iterator
 Proxy iterator over a sequence of indeces. More...
 
struct  blockcmp_pos
 Comparator that compares the start positions of blocks (used with d2tree) More...
 
struct  blockcmp_end
 Comparator that compares the end positions of blocks (used with d2tree) More...
 
struct  blockcmp_posend
 Comparator that compares the start position of a block with the end position of another block (used with d2tree) More...
 
class  twodex
 Range index class. More...
 
class  dp_alignment_matrix
 Matrix representation of an alignment. More...
 
struct  dp_traits
 Dynamic programming type traits. More...
 
struct  dp_traits< shore::nuc::base, shore::nuc::base >
 Dynamic programming type traits for shore::nuc::base. More...
 
struct  dp_alignment
 Representation of a dynamic programming alignment. More...
 
struct  dp_aligner_config
 Configuration for dp_aligner_pipe. More...
 
class  dp_aligner_pipe
 Dynamic programming aligner. More...
 
class  dp_multialigner_pipe
 Dynamic programming aligner (multiple reference sequences). More...
 
struct  dp_trace
 Dynamic programming alignment backtrace. More...
 
struct  dp_backtracer_config
 Dynamic programming alignment backtracer configuration. More...
 
class  dp_backtracer_pipe
 Dynamic programming alignment backtracer class. More...
 
class  d2tree
 2d-tree: index-sort containers of 2-dimensional data for range queries More...
 
class  cmp_tokens
 General purpose line comparator. More...
 
class  line_sorter
 ASCII text file sorting. More...
 
class  suffix_index
 On disk DNA suffix array and hash. More...
 
class  incremental_mean_var
 Online calculation of mean, variance and standard deviation. More...
 
struct  index_generator
 A generator that increments its value after each call. More...
 
struct  index_comparator
 Compare indexes referring to another data structure. More...
 
struct  index_comparator< DataIter, void >
 Compare indexes referring to another data structure. More...
 
struct  relabs
 Class that represents a value that may be either absolute or relative to another value. More...
 
class  ptrkeeper
 Clean up heap allocated objects. More...
 
class  mmapping
 Memory mapped file handling. More...
 
class  md5_sum
 MD5 checksum calculation. More...
 
struct  iless
 A case insensitive string comparator. More...
 
class  tok_occurrence
 Tokenizer for strings and other containers. Splits at delimiter occurences. More...
 
class  tok_occurrences
 Tokenizer for strings and other containers. Splits at delimiter occurences and allows multiple alternative delimiters. More...
 
class  tok_transition
 Tokenizer for strings and other containers. Splits at no-delimiter-delimiter transitions (and vice versa). More...
 
class  tok_transitions
 Tokenizer for strings and other containers. Splits at no-delimiter-delimiter transitions (and vice versa) and allows multiple alternative delimiters. More...
 
class  ltok_occurrence
 Tokenizer for strings and other containers. Splits at delimiter occurences, where the delimiter consists of multiple characters/items. More...
 
class  ltok_transition
 Tokenizer for strings and other containers. Splits at no-delimiter-delimiter transitions (and vice versa), where the delimiter consists of multiple characters/items. More...
 
class  valterm_iterator
 A forward iterator over null-terminated character arrays or other value-terminated arrays. More...
 
class  chartable
 String conversion tables. More...
 
struct  manipd
 Class that associates values with stream manipulators and formatting. More...
 
class  umask_ts
 Thread safe wrapper for umask. More...
 
class  timer
 Simple timer class. More...
 
class  frag_vector
 Pseudo container combining a set of iterator ranges. More...
 
class  intpack
 Vector for dynamic bit-width integer storage. More...
 
struct  refcore_base
 Helper for implementing intpack::iterator / intpack::reference. More...
 
struct  refcore
 Helper for implementing intpack::iterator / intpack::reference. More...
 
struct  refcore< 0 >
 Helper for implementing intpack::iterator / intpack::reference. More...
 
struct  refcore< 3 >
 Helper for implementing intpack::iterator / intpack::reference. More...
 
struct  refcore< 8 >
 Helper for implementing intpack::iterator / intpack::reference. More...
 
struct  refcore< 64 >
 Helper for implementing intpack::iterator / intpack::reference. More...
 
class  rle_queue
 Queue container that run length encodes its contents. More...
 
class  alignment_queue
 Read alignment storage queue. More...
 
class  alignment_3px
 Move the 3' end of alignments, but keep them sorted by position. More...
 
class  poissonifier
 Adaptive duplicate read filtering. More...
 
class  seqid_translator
 Transpose reference sequence IDs, e.g. for re-alignment in mapflowcell. More...
 
class  besthit_filter
 Discards redundant or suboptimal alignments. More...
 
class  alignment_statistic
 Collect statistics on alignments. More...
 
class  hits_correction_single_pipe
 Set the number of hits to the number of entries in the alignment file. More...
 
class  flatten_alignment_pipe
 Extract the read information from alignments. More...
 
class  mapping_pair_finder_pipe
 Collect concordant or unique pairings from position-sorted and PE corrected map.lists. More...
 
class  mapping_pair_joiner_pipe
 Join paired alignments into one. More...
 
class  alignment_trimmer_pipe
 Trim alignments that overlap range boundaries. More...
 
class  alignment_filter_pipe
 Combines various alignment filters. More...
 
class  alignment_condenser_pipe
 Replaces 'match' streches in the alignment string with their length, and reduces their quality resolution. More...
 
class  alignment_token
 Stretch of an alignment that corresponds to a single AlignmentOperation. More...
 
class  alignment_tokenizer
 Tokenize an alignment string into alignment_tokens. More...
 
class  alignment_builder
 Build an alignment string base by base. More...
 
class  alignment_helper
 Alignment string utilities. More...
 
class  aa
 Amino acid symbols. More...
 
struct  refseq_coor
 Reference sequence coordinates. More...
 
struct  refseq_region
 Range on a reference sequence with start and end on the same chromosome. More...
 
struct  refseq_range
 Range on a reference sequence where start and end may be on different chromosomes. More...
 
struct  genomic_coor
 Genomic coordinates. More...
 
struct  genomic_region
 Range on a genomic sequence with start and end on the same chromosome. More...
 
struct  genomic_range
 Range on a genomic sequence where start and end may be on different chromosomes. More...
 
struct  read
 Short read data type. More...
 
struct  alignment
 Alignment, e.g. map.list file entry. More...
 
class  sequence_record
 Record type for potentially long sequences, e.g. fasta entries. More...
 
struct  sff_read
 SFF (Standard Flowgram Format) read record. More...
 
struct  annotation_entry
 GFF3 annotation entry. More...
 
struct  delta_record
 NUCMER or PROMER alignment record. More...
 
struct  coverage
 Record representing a segment of constant coverage. More...
 
struct  refdict_entry
 Entry in a reference sequence dictionary. More...
 
struct  local_variant
 quality_variant.txt file record. More...
 
class  conversion_proxy
 Proxy iterator that converts the referenced values using a user-defined functor / function. More...
 
struct  conv_base_compl
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_packed_compl
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_char_compl
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_int2base
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_int2base_compl
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_int2packed
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_int2packed_compl
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_int2char
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_int2char_compl
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_char2base
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_char2base_compl
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_char2packed
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_char2packed_compl
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_base2char
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_base2char_compl
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_base2packed
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_base2packed_compl
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_packed2char
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_packed2char_compl
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_packed2base
 Conversion functor for use with conversion_proxy. More...
 
struct  conv_packed2base_compl
 Conversion functor for use with conversion_proxy. More...
 
class  base_compl_iterator
 Conversion iterator. More...
 
class  packed_compl_iterator
 Conversion iterator. More...
 
class  char_compl_iterator
 Conversion iterator. More...
 
class  int2base_iterator
 Conversion iterator. More...
 
class  int2packed_iterator
 Conversion iterator. More...
 
class  int2char_iterator
 Conversion iterator. More...
 
class  int2base_compl_iterator
 Conversion iterator. More...
 
class  int2packed_compl_iterator
 Conversion iterator. More...
 
class  int2char_compl_iterator
 Conversion iterator. More...
 
class  base2packed_iterator
 Conversion iterator. More...
 
class  base2char_iterator
 Conversion iterator. More...
 
class  base2packed_compl_iterator
 Conversion iterator. More...
 
class  base2char_compl_iterator
 Conversion iterator. More...
 
class  packed2base_iterator
 Conversion iterator. More...
 
class  packed2char_iterator
 Conversion iterator. More...
 
class  packed2base_compl_iterator
 Conversion iterator. More...
 
class  packed2char_compl_iterator
 Conversion iterator. More...
 
class  char2base_iterator
 Conversion iterator. More...
 
class  char2packed_iterator
 Conversion iterator. More...
 
class  char2base_compl_iterator
 Conversion iterator. More...
 
class  char2packed_compl_iterator
 Conversion iterator. More...
 
class  dna_iterator
 Iterate over DNA sequences in different encodings. More...
 
class  packeddna_iterator
 Iterate over DNA sequences in different encodings. More...
 
class  chardna_iterator
 Iterate over DNA sequences in different encodings. More...
 
class  nuc
 Base symbol conversions. More...
 
class  color2seq
 Converts raw read sequences from SOLiD color space to sequence space. More...
 
class  pefilter
 Filter element for selecting reads with a certain paired end index. More...
 
class  serialization_core_access
 Serialization access for classes with private data. More...
 
class  alignment_reader
 Merged read of alignment files in various formats. More...
 
class  aln_writer
 Writes alignments in cisgenome ALN format. More...
 
class  bed_writer
 Writer for BED formatted files. More...
 
class  bedgraph_writer
 Writer for BEDGraph formatted files. More...
 
class  eland_reader
 Reader for Illumina ELAND alignment files. More...
 
class  fasta_reader
 FastA file reader. More...
 
class  fasta_writer
 Writer for FastA files. More...
 
class  basic_fastq_reader
 Fastq file reader (basic interface). More...
 
class  fastq_writer
 FastQ file writer. More...
 
class  qual_writer
 .qual file writer. More...
 
class  flatread_tags_parser
 Parser for SHORE FlatRead tags. More...
 
class  basic_flatread_reader
 Reader for SHORE FlatRead files (basic interface). More...
 
class  flatread_writer
 Writer for SHORE FlatRead files. More...
 
class  gff_reader
 Read genomic features from a GFF files. More...
 
class  gff_writer
 Write genomic features to a gff file. More...
 
class  maplist_tags_parser
 Parser class for MapList tags. More...
 
class  basic_maplist_reader
 Reader for SHORE MapList files (basic interface). More...
 
class  maplist_reader
 Reader for SHORE MapList files (monolithic interface). More...
 
class  maplist_writer
 Writer for SHORE MapList files. More...
 
class  delta_reader
 Reader for NUCMER / PROMER delta files. More...
 
class  psl_reader
 Reader for BLAT PSL / PSLX files. More...
 
class  basic_qseq_reader
 Reader for Illumina QSEQ files. More...
 
class  read_reader
 File format independent short read file reader. More...
 
class  basic_refdict_reader
 Reads reference sequence dictionary files. More...
 
class  sam_base
 Shared functionality for sam_reader and bam_reader. More...
 
class  sam_reader
 Reader for SAM alignment files. More...
 
class  bam_reader
 Reader for BAM alignment files. More...
 
class  sam_writer
 Writer for SAM alignment files. More...
 
class  segment_reader
 Reader for genomic segments in various file formats. More...
 
class  segment_writer
 Writer for genomic segment data. More...
 
class  basic_sff_reader
 454 SFF (Standard Flowgram Format) file reader. More...
 
class  sff_flatten_pipe
 Convert SFF file records obtained from sff_reader into regular raw read records. More...
 
class  basic_line_reader
 Read plain text files line by line (basic interface). More...
 
class  line_reader
 Read plain text files line by line (monolithic interface). More...
 
class  line_writer
 Plain text file writer. More...
 
class  row_reader
 Read tab delimited entries from plain text files. More...
 
class  vcf_writer
 Writes quality_variant entries in Variant Call Format (VCF). More...
 
class  qualvar_reader
 quality_variant file reader. More...
 
class  mpi
 Interface to the Message Passing Interface. More...
 
class  serial
 Serial part of a pipeline. Prevents instantiation and use of the. More...
 
class  parallel
 Parallel part of a pipeline. More...
 
class  sync
 Synchronization of parallel pipelines. More...
 
class  desync
 Gathers the data generated by the serial processing steps and multiplexes it to downstream after the mutex is unlocked. More...
 
class  parallelizer
 Pipeline parallelization. More...
 
class  parallel_log
 Logging for parallel operations. More...
 
class  thread
 Uncaught exception handling for threads. More...
 
class  thread_index
 Stores an enumerated ID for each thread number/process rank combination. More...
 
class  buffer_chain
 Base class for data sources that support adding plugin objects. More...
 
class  extractor
 Manually get data from the end of a pipeline. More...
 
class  feed
 Manually append data to the start of a pipeline. More...
 
class  thru
 Simply pass the data on, optionally perform a type cast. More...
 
struct  conversion
 Specializable assignment functor for use with conversion_pipe. More...
 
class  conversion_pipe
 Simply pass the data on, but perform a type conversion. More...
 
class  filter
 Takes up functors for filtering items from a pipeline. More...
 
class  splitter
 Takes up functors for filtering items from a pipeline. More...
 
class  merge
 Merge sorted data from multiple inputs. More...
 
class  monolithic
 Turns a data source without an internal buffer into one with an internal buffer. More...
 
struct  source_traits
 Specifies the data type a source provides through its current() method. More...
 
class  pipeline_core_access
 Grants the pipeline system access to private methods. More...
 
class  source
 Template for turning a class into a pipeline source. More...
 
class  sink
 Template for turning a class into a pipeline sink. More...
 
class  pipe
 Template for turning a class into a pipe element. More...
 
class  pipe_facade
 Template to aid implementing pipe elements. More...
 
class  plugin
 Plugin interface for use with data source objects that manage internal buffers by inheriting from buffer_chain, e.g. monolithic. More...
 
class  sorting_check
 Plugin to check that a dataset is sorted according to a comparator. More...
 
class  signal
 Signal. More...
 
class  slot
 Slot. More...
 
struct  sig_spec
 Helper for signal / slot. More...
 
struct  sig_spec< void >
 Helper for signal / slot. More...
 
struct  opt_base
 Helper for av_parser. More...
 
struct  opt_base1
 Helper for av_parser. More...
 
struct  opt_base2
 Helper for av_parser. More...
 
struct  av_option
 Helper for av_parser. More...
 
class  av_parser
 Command line option parser. More...
 
struct  av_option< std::pair< T, U > >
 Helper for av_parser. More...
 
struct  av_option< std::vector< T > >
 Helper for av_parser. More...
 
struct  av_option< std::set< T > >
 Helper for av_parser. More...
 
struct  av_option< std::vector< std::vector< T > > >
 Helper for av_parser. More...
 
struct  av_option< bool >
 Helper for av_parser. More...
 
struct  av_option< unary >
 Helper for av_parser. More...
 
class  program
 Program base class. More...
 
class  uncaught_handler
 Reporting uncaught program exceptions. More...
 
class  berry
 Class for finding the optimal log-transformation constant for ANOVA-type models uing the method proposed by Berry. More...
 
class  binomial
 Binomial distribution. More...
 
class  chisquare
 Chi square distribution. More...
 
class  exponential
 Exponential distribution. More...
 
class  geometric
 Geometric distribution. More...
 
class  glm
 General Linear Model. More...
 
class  glht
 Linear hypothesis test. More...
 
class  mtc
 Multiple testing correction. More...
 
class  poisson
 Poisson distribution. More...
 
class  gzxbase
 Base for gzx... classes. More...
 
class  gzxindex
 Read and access the index extension of a gzip file. More...
 
class  gzxdeflater
 GZIP compress a stream in blocks. More...
 
class  gzxdeflater_sink
 Sink device for GZIP block-wise compression. More...
 
class  gzx_ostream
 Block-wise GZIP compressing ostream wrapper. More...
 
class  gzxinflater
 Decode or seek in a GZIP compressed stream. More...
 
class  gzxinflater_source
 Source device for GZIP decompression. More...
 
class  gzx_istream
 istream wrapper for GZIP decompression. More...
 
class  stream_slicer
 Chop a file or input stream into slices, using mmap when possible. More...
 
class  streams_base
 Base class for istreams and ostreams. More...
 
class  istreams
 Manages an array of input streams. More...
 
class  ostreams
 Manages an array of output streams. More...
 
class  ipipe
 Stream source for an input pipe. More...
 
class  opipe
 Stream source for an output pipe. More...
 
class  mmapping_source
 Stream source that reads from an mmapped file. More...
 
class  mmapping_ifstream
 Stream that reads from an mmapped file. More...
 
class  xzbase
 Base for xz... classes. More...
 
class  xzdeflater
 XZ compress a stream in blocks. More...
 
class  xzdeflater_sink
 Sink device for block-wise xz compression. More...
 
class  xz_ostream
 Block-wise XZ compressing ostream wrapper. More...
 
class  xzindex
 Read and access the index of an xz file. More...
 
class  xzinflater
 Decode and seek in an xz compressed stream. More...
 
class  xzinflater_source
 Source device for xz decompression. More...
 
class  xz_istream
 istream wrapper for xz decompression. More...
 

Typedefs

typedef shore::pipe_box
< dp_mapper_pipe > 
dp_mapper
 
typedef shore::sink
< dp_mapping_writer > 
dp_mapping_sink
 
typedef boost::uint8_t uint8_t
 
typedef boost::uint16_t uint16_t
 
typedef boost::uint32_t uint32_t
 
typedef boost::uint64_t uint64_t
 
typedef shore::source
< alignment_reader
alignment_source
 
typedef shore::sink< aln_writeraln_sink
 ALN file pipeline sink.
 
typedef shore::sink< bed_writerbed_sink
 BED file pipeline sink.
 
typedef shore::sink
< bedgraph_writer
bedgraph_sink
 BEDGraph file pipeline sink.
 
typedef shore::source
< eland_reader
eland_source
 ELAND file pipeline source.
 
typedef shore::source
< fasta_reader
fasta_source
 Fasta file pipeline source.
 
typedef shore::sink< fasta_writerfasta_sink
 Fasta file pipeline sink.
 
typedef shore::sink
< fasta_writer, shore::read
fasta_read_sink
 Fasta file pipeline sink for read.
 
typedef shore::monolithic
< basic_fastq_reader,
shore::read,
shore::read::compare_type > 
fastq_reader
 Fastq file reader (monolithic interface).
 
typedef shore::source
< fastq_reader
fastq_source
 Fastq file pipeline source.
 
typedef shore::sink< fastq_writerfastq_sink
 Fastq file pipeline sink.
 
typedef shore::sink< qual_writerqual_sink
 .qual file pipeline sink.
 
typedef shore::monolithic
< basic_flatread_reader,
shore::read,
shore::read::compare_type > 
flatread_reader
 Reader for SHORE FlatRead files (monolithic interface).
 
typedef shore::source
< flatread_reader
flatread_source
 FlatRead file pipeline source.
 
typedef shore::sink
< flatread_writer
flatread_sink
 FlatRead file pipeline sink.
 
typedef shore::source< gff_readergff_source
 GFF file pipeline source.
 
typedef shore::sink< gff_writergff_sink
 GFF file pipeline sink.
 
typedef shore::source
< maplist_reader
maplist_source
 MapList file pipeline source.
 
typedef shore::sink
< maplist_writer
maplist_sink
 MapList file pipeline sink.
 
typedef shore::source
< delta_reader
delta_source
 Delta file pipeline source.
 
typedef shore::source< psl_readerpsl_source
 BLAT-PSL file pipeline source.
 
typedef shore::monolithic
< basic_qseq_reader,
shore::read,
shore::read::compare_type > 
qseq_reader
 
typedef shore::source
< qseq_reader
qseq_source
 QSEQ file pipeline source.
 
typedef shore::source
< read_reader
read_source
 File format independent short read file pipeline source.
 
typedef shore::monolithic
< basic_refdict_reader,
refdict_entry
refdict_reader
 
typedef shore::source
< refdict_reader
refdict_source
 
typedef shore::monolithic
< basic_refdict_reader,
shore::refseq_region
refdict_region_reader
 Read reference sequence dictionary entries as shore::refseq_region.
 
typedef shore::source
< refdict_region_reader
refdict_region_source
 
typedef shore::source< sam_readersam_source
 SAM file pipeline source.
 
typedef shore::source< bam_readerbam_source
 BAM file pipeline source.
 
typedef shore::sink< sam_writersam_sink
 SAM file pipeline sink.
 
typedef shore::sink
< sam_writer, shore::read
sam_read_sink
 SAM file pipeline sink for unaligned reads.
 
typedef shore::source
< segment_reader
segment_source
 Pipeline source for genomic segments in various file formats.
 
typedef shore::sink
< segment_writer
segment_sink
 Pipeline sink for genomic segment data.
 
typedef shore::monolithic
< basic_sff_reader, sff_read,
sff_read::compare_type > 
sff_reader
 
typedef shore::source< sff_readersff_source
 SFF file pipeline source.
 
typedef shore::source
< line_reader
line_source
 Text file pipeline source.
 
typedef shore::sink< line_writerline_sink
 Text file pipeline sink.
 
typedef shore::source< row_readerrow_source
 Tab delimited table file pipeline source.
 
typedef shore::sink< vcf_writervcf_sink
 VCF file pipeline sink.
 
typedef shore::source
< qualvar_reader
qualvar_source
 quality_variant file pipeline source.
 

Enumerations

enum  AlignmentMode {
  ALN_NONE =-1, ALN_GLOBAL =0, ALN_DANGLING_REF =1, ALN_DANGLING_QRY =2,
  ALN_DANGLING_ANY =3, ALN_LOCAL =7
}
 Valid ways of aligning one end of the sequences.
 
enum  ExtendedFlag { XFLAG_NA =-1, XFLAG_FALSE =0, XFLAG_TRUE =1, XFLAG_IRRELEVANT =2 }
 Flag type with additional values 'NA' and 'IRRELEVANT'.
 
enum  AlignmentOperation {
  ALN_NOOP =0, ALN_MATCH =1, ALN_SUBST =2, ALN_INS =4,
  ALN_DEL =8, ALN_LONGDEL =16, ALN_FRAGMENT =32, ALN_SOFTCLIP =64,
  ALN_BISULFITE =128, ALN_GRAPH =256, ALN_INVERT =512
}
 Operations that may me encoded in an alignment string. More...
 
enum  Strand { STR_FWD =1, STR_REV =2 }
 Strand.
 
enum  OptionalStrand { STR_NA_OPT =0, STR_FWD_OPT =STR_FWD, STR_REV_OPT =STR_REV }
 Strand with an additional value NA.
 
enum  ExtendedStrand { STR_NA_EXT =STR_NA_OPT, STR_FWD_EXT =STR_FWD, STR_REV_EXT =STR_REV, STR_UNKNOWN_EXT =3 }
 As OptionalStrand, with additional value UNKNOWN (e.g. as in GFF). More...
 
enum  FastqQualType { FQ_QUAL_SANGER, FQ_QUAL_ILLUMINA, FQ_QUAL_SOLEXA }
 Different types of quality string encodings for FastQ files.
 
enum  SAMFlags {
  SAM_PE_PAIRED_END =0x001, SAM_PE_PROPER_PAIR =0x002, SAM_UNMAPPED_SELF =0x004, SAM_PE_UNMAPPED_MATE =0x008,
  SAM_REVERSE_SELF =0x010, SAM_REVERSE_MATE =0x020, SAM_PE_READ1 =0x040, SAM_PE_READ2 =0x080,
  SAM_NO_PRIMARY_ALIGNMENT =0x100, SAM_QUALITY_FILTERED =0x200, SAM_DUPLICATE_READ =0x400
}
 Enumeration of valid SAM flags (bitmask).
 
enum  OptionFlags { OPT_NOTSET, OPT_SET, OPT_AUTO, OPT_MANDATORY }
 Different types of command line options. More...
 

Functions

template<typename RefIter , typename QryIter , typename Scoring >
void dp_align (dp_alignment_matrix &matrix, RefIter rbeg, const size_t rsize, QryIter qbeg, const size_t qsize, const Scoring scoring, const AlignmentMode left_ends, const AlignmentMode exclude_left=ALN_NONE, const AlignmentMode exclude_right=ALN_NONE)
 Perform dynamic programming alignment.
 
template<typename first_t , typename second_t >
bool paircmpx (const std::pair< first_t, second_t > &p1, const std::pair< first_t, second_t > &p2)
 First d2tree comparator for std::pair.
 
template<typename first_t , typename second_t >
bool paircmpy (const std::pair< first_t, second_t > &p1, const std::pair< first_t, second_t > &p2)
 Second d2tree comparator for std::pair.
 
template<typename first_t , typename second_t >
bool paircmpxy (const std::pair< first_t, second_t > &p1, const std::pair< first_t, second_t > &p2)
 Third d2tree comparator for std::pair.
 
bool cmp_field0 (const char *const c0, const char *const c1)
 Numerically compares the first tab-delimited text field of two lines (reads_0.fl comparator).
 
bool scmp_field0 (const std::string &s0, const std::string &s1)
 Numerically compares the first tab-delimited text field of two lines (std::string version of the reads_0.fl comparator).
 
bool cmp_field0_lex (const char *const c0, const char *const c1)
 Lexically compares the first tab-delimited text field of two lines.
 
bool cmp_line (const char *const c0, const char *const c1)
 Compares two text lines.
 
bool cmp_maplist (const char *const c0, const char *const c1)
 Compares two map.list lines by position (columns 1&2).
 
bool cmp_maplist_readid (const char *const c0, const char *const c1)
 Compares two map.list lines by read id (column 4).
 
bool cmp_sam (const char *const c0, const char *const c1)
 Compares two mapping lines in sam format.
 
template<int K>
bool cmp_field (const char *const c0, const char *const c1)
 Numerically compares two lines by field K (offset 0).
 
template<int K>
bool cmp_field_lex (const char *const c0, const char *const c1)
 Lexically compares two lines by field K (offset 0).
 
template<typename Iter , typename Oter >
void count_elements (Iter ibeg, Iter iend, Oter obeg, Oter oend, bool initialize_counts=true, int shift=0)
 Count elements in a range. More...
 
template<typename Iter >
void counts_to_intervals (Iter beg, Iter end)
 
template<typename Iter , typename Oter >
void suffix_array (Iter ibeg, Iter iend, Oter obeg, bool initialize_sa=true, typename std::iterator_traits< Iter >::value_type imax=std::numeric_limits< typename std::iterator_traits< Iter >::value_type >::max())
 Construct suffix array; values in input range must not be negative. More...
 
template<typename Ater , typename Oter >
void suffix_ranks (Ater abeg, Ater aend, Oter rbeg)
 
template<typename Ster , typename Ater >
std::pair< size_t, size_t > suffix_lcpmax (Ster sbeg, Ster send, Ater abeg)
 Get the value and position of the maximal lcp for a suffix array.
 
template<typename Ster , typename Ater , typename Oter >
void suffix_lcp (Ster sbeg, Ster send, Ater abeg, Oter obeg)
 Construct the lcp array for a suffix array.
 
template<typename Ster , typename Ater , typename Qter >
std::pair< Ater, Ater > suffix_query (Ster sbeg, Ster send, Ater abeg, Ater aend, Qter qbeg, Qter qend)
 Binary search on a suffix array.
 
template<typename Ster , typename Ater , typename Qter >
suffix_query_result< Ater, Qter > suffix_query_prefix (Ster sbeg, Ster send, Ater abeg, Ater aend, Qter qbeg, Qter qend)
 Binary search on a suffix array.
 
template<typename Ster , typename Ater , typename Query >
std::pair< Ater, Ater > suffix_query_incremental (Ster sbeg, Ster send, Ater abeg, Ater aend, const Query q, const size_t ofs)
 Binary search on a suffix array. More...
 
template<typename Ster , typename Ater , typename Qter >
std::pair< Ater, Ater > suffix_query (Ster sbeg, Ster send, Ater abeg, Qter qbeg, Qter qend)
 Binary search on a suffix array.
 
template<typename Ster , typename Ater , typename Qter >
suffix_query_result< Ater, Qter > suffix_query_prefix (Ster sbeg, Ster send, Ater abeg, Qter qbeg, Qter qend)
 Binary search on a suffix array.
 
template<typename Ster , typename Ater >
std::ostream & suffix_dump (std::ostream &os, Ster sbeg, Ster send, Ater abeg)
 
template<typename Ster , typename Ater >
bool suffix_test (Ster sbeg, Ster send, Ater abeg)
 Test correctness of a suffix array (slow)
 
template<class U , class T >
round (T floatval)
 brief Round a floating point value.
 
double log2 (const double val)
 Base two logarithm.
 
template<class Iter >
double mean (const Iter begin, const Iter end)
 Calculate the arithmetic mean of the values in a range.
 
template<class Iter >
double pairs_mean (Iter begin, const Iter end)
 Calculate the arithmetic mean of the values in a range of (value,count) pairs.
 
template<class Iter >
double medianize (const Iter begin, const Iter end)
 Reorder the values in a range such that the median is in the center. More...
 
template<class Iter >
double geometric_mean (const Iter begin, const Iter end, const bool skipZ=false)
 Calculate the geometric mean of the values in a range.
 
template<class Iter >
double harmonic_mean (const Iter begin, const Iter end)
 Calculate the harmonic mean of the values in a range.
 
template<class Iter , class Oter >
void skewness_kurtosis (Iter begin, Iter end, Oter dest, const bool var_n)
 Calculate skewness and kurtosis for the values in a range. More...
 
template<class Iter >
double var (const Iter begin, const Iter end, const double mu, const bool var_n=false)
 Calculate the variance of the values in a range, utilizing the previously calculated mean.
 
template<class Iter >
double pairs_var (const Iter begin, const Iter end, const double mu, const bool var_n=false)
 Calculate the variance of the values in a range of value->count pairs, utilizing the previously calculated mean.
 
template<class Iter >
double var (const Iter begin, const Iter end, const bool var_n=false)
 Calculate the variance of the values in a range.
 
template<class Iter >
double stddev (const Iter begin, const Iter end, const bool var_n=false)
 Calculate the standard deviation of the values in a range.
 
template<class Iter >
double stddev (const Iter begin, const Iter end, const double mu, const bool var_n=false)
 Calculate the standard deviation of the values in a range, utilizing the previously calculated mean.
 
template<class Iter >
double pairs_stddev (const Iter begin, const Iter end, const double mu, const bool var_n=false)
 Calculate the standard deviation of a range of value->count pairs, utilizing the previously calculated mean.
 
template<class Xter , class Yter >
std::pair< double, double > polycog (Xter x_beg, Xter x_end, Yter y_beg, double *const ret_area2)
 Calculate the centre of gravity of a polygon.
 
template<class Xter , class Yter >
std::pair< double, double > polycog (Xter x_beg, Xter x_end, Yter y_beg)
 Calculate the centre of gravity of a polygon.
 
template<class Iter >
void mean_filter (Iter beg, Iter end, const size_t width)
 Applies mean filtering to the given sequence. More...
 
template<class T , class Iter >
void seq (T lb, const T ub, const size_t len, Iter dest)
 Generate sequence of equidistant values, between (inclusive) lb & ub.
 
template<class IIter , class OIter , class Rng >
void random_copy (IIter b, IIter e, OIter o, Rng &rng)
 Shuffle the values in a range.
 
template<typename IndexIter >
void index_fill (IndexIter ib, IndexIter ie)
 Fill a range with consecutive values.
 
template<typename DataIter , typename IndexIter >
void index_sort (IndexIter ib, IndexIter ie, DataIter db)
 Sort indexes with reference to another data structure.
 
template<typename DataIter , typename IndexIter , typename Comparator >
void index_sort (IndexIter ib, IndexIter ie, DataIter db, Comparator data_cmp)
 Sort indexes with reference to another data structure.
 
template<typename DataIter , typename OrderingIter , typename RankIter >
void ranks (RankIter first, RankIter last, OrderingIter ob, DataIter db)
 Compute 0-based ranks given an ordering. Equal stretches share the same, highest rank value.
 
template<class Abs_t >
std::istream & operator>> (std::istream &is, relabs< Abs_t > &dest)
 Parse a relabs object from a stream. A '' suffix indicates a relative value.
 
template<class Abs_t >
std::ostream & operator<< (std::ostream &os, const relabs< Abs_t > &val)
 Write a relabs object to a stream. A '' suffix is used to indicate a relative value.
 
template<class T , int SZ>
size_t size (T(&)[SZ])
 Get the size of a fixed size array.
 
template<class T , int SZ>
T * end (T(&array)[SZ])
 Get the end pointer for a fixed size array.
 
std::ostream & memdump (std::ostream &os, const void *src, size_t n)
 Write a bit-wise dump of a given memory location.
 
void * bit_memcpy (void *const dst, const void *const src, const size_t nbits, const size_t dst_bitofs, const size_t src_bitofs=0)
 Perform a bit-aligned memcpy.
 
uint64_t ntoh64 (const void *const netw64)
 Converts a 64 bit integer from network byte order to host byte order.
 
uint32_t ntoh32 (const void *const netw32)
 Converts a 32 bit integer from network byte order to host byte order.
 
uint16_t ntoh16 (const void *const netw16)
 Converts a 16 bit integer from network byte order to host byte order.
 
uint64_t letoh64 (const void *const le64)
 Converts a 64 bit integer from little endian byte order to host byte order.
 
uint32_t letoh32 (const void *const le32)
 Converts a 32 bit integer from little endian byte order to host byte order.
 
uint16_t letoh16 (const void *const le16)
 Converts a 16 bit integer from little endian byte order to host byte order.
 
uint64_t hton64 (const void *const host64)
 converts a 64 bit integer from host byte order to network byte order */
 
uint32_t hton32 (const void *const host32)
 converts a 32 bit integer from host byte order to network byte order */
 
uint16_t hton16 (const void *const host16)
 converts a 16 bit integer from host byte order to network byte order */
 
std::string home ()
 Get the current user's home directory.
 
std::string config_home ()
 Get the config file directory for the current user (usually ~/.config/).
 
std::string expand_home (const std::string &path)
 Expand leading tilde '~' char into the current user's home directory.
 
std::string path_parent (const std::string &path)
 Get the parent directory for a path.
 
std::string path_leaf (const std::string &path)
 Get only the last element in a path.
 
std::string path_trunk (const std::string &path)
 Get only the first element in a path.
 
std::string path_clean (const std::string &path)
 Make a path absolute and remove "." and ".." nodes and multiple slashes.
 
std::string path_enum (const std::string &path, const std::string &suffix, int &num_ofs, const char sep='_')
 Increment a counter until the file <path><sep><counter><suffix> does not exist.
 
std::string path_enum (const std::string &path, const std::string &suffix=std::string())
 Increment a counter until the file <path>_<counter><suffix> does not exist.
 
bool is_executable (const std::string &fn)
 Test if a path points to a file that we're permitted to execute.
 
std::string mktempdir (const std::string &prefix)
 Create a temporary file directory with the given path prefix. More...
 
std::string which_nofail (const std::string &command, const std::string &env=std::string())
 Equivalent to the shell command.
 
uint64_t file_size (const std::string &fn)
 Get the size of a file.
 
void toupper (std::string &str)
 In-place conversion to upper case.
 
template<class Ex >
std::string which_fail (const std::string &command, const std::string &env=std::string())
 Equivalent to the shell command.
 
std::string which (const std::string &command, const std::string &env=std::string())
 Equivalent to the shell command.
 
template<class Iter >
void glob (Iter b, Iter e, std::vector< std::string > &ret)
 
template<class Iter >
std::vector< std::string > glob (Iter b, Iter e)
 Find files matching the given glob pattern.
 
void glob (const std::string &pattern, std::vector< std::string > &ret)
 Find files matching the given glob pattern.
 
std::vector< std::string > glob (const std::string &pattern)
 Find files matching the given glob pattern.
 
uint64_t get_mtime (const std::string &path)
 Get the modification time for a path.
 
bool is_older (const std::string &path1, const std::string &path2)
 Test if path1 modification time is older than the one for path2.
 
void tolower (std::string &str)
 In-place conversion to lower case.
 
template<typename Iter >
bool is_numeric (Iter b, Iter e)
 Test if a range of characters contains only digits.
 
std::vector< std::string > split (const std::string &s, const char delim='\t')
 Tokenize a string. Splits at delimiter occurences.
 
std::vector< std::string > split (const std::string &s, const char *const delims)
 Tokenize a string. Splits at delimiter occurences and allows multiple alternative delimiters.
 
std::vector< std::string > tsplit (const std::string &s, const char delim='\t')
 Tokenize a string. Splits at no-delimiter-delimiter transitions (and vice versa).
 
std::vector< std::string > tsplit (const std::string &s, const char *const delims)
 Tokenize a string. Splits at no-delimiter-delimiter transitions (and vice versa) and allows multiple alternative delimiters.
 
std::vector< std::string > lsplit (const std::string &s, const std::string &delim)
 Tokenize a string. Splits at delimiter occurences, where the delimiter consists of multiple characters.
 
std::vector< std::string > ltsplit (const std::string &s, const std::string &delim)
 Tokenize a string. Splits at no-delimiter-delimiter transitions (and vice versa), where the delimiter consists of multiple characters/items.
 
template<class StringIterator >
size_t split (const std::string &s, StringIterator destination, const char delim='\t', const size_t limit=std::numeric_limits< size_t >::max()-1)
 Tokenize a string into a container. More...
 
template<class StringIterator >
size_t split (const std::string &s, StringIterator destination, const char *const delims, const size_t limit=std::numeric_limits< size_t >::max()-1)
 Tokenize a string into a container using multiple alternative delimiters. More...
 
template<class StringIterator >
size_t tsplit (const std::string &s, StringIterator destination, const char delim='\t', const size_t limit=std::numeric_limits< size_t >::max()-1)
 Tokenize a into a container. Splits at no-delimiter-delimiter transitions (and vice versa). More...
 
template<class StringIterator >
size_t tsplit (const std::string &s, StringIterator destination, const char *const delims, const size_t limit=std::numeric_limits< size_t >::max()-1)
 Tokenize a into a container using multiple alternative delimiters. Splits at no-delimiter-delimiter transitions (and vice versa). More...
 
template<typename T >
std::string to_string (const T &value, const int prec)
 Format the given value as a string.
 
template<typename T , int precision>
std::string to_string (const T &value)
 Format the given value as a string.
 
template<typename T >
std::string to_string (const T &value)
 Format the given value as a string.
 
template<>
std::string to_string< bool > (const bool &value)
 
template<>
std::string to_string< std::ostringstream > (const std::ostringstream &str)
 Format the given value as a string (override the template for ostringstreams).
 
template<>
std::string to_string< std::string > (const std::string &s)
 Format the given value as a string (override the template for strings).
 
template<class Iter >
std::string join (Iter begin, Iter end, const std::string &delim)
 Join the values in a range into a string.
 
template<class Iter >
std::string join (const Iter begin, const Iter end)
 Join the values in a range into a string, using TAB as delimiter.
 
template<typename T >
std::string join (const std::vector< T > &sv, const std::string &delim)
 Join the values in a std::vector into a string.
 
template<typename T >
std::string join (const std::vector< T > &sv)
 Join the values in a std::vector into a string, using TAB as delimiter.
 
template<class Iteriter >
std::string ijoin (Iteriter begin, Iteriter end, const std::string &delim)
 Join the given range of string iterators into a string.
 
template<typename Iter >
std::string ijoin (const std::vector< Iter > &sv, const std::string &delim)
 Join the given vector of string iterators into a string.
 
std::vector< std::string > join2d (std::vector< std::vector< std::string > > &pv, const std::string &delim)
 Join a 2-dimensional std::vector into a one-dimensional std::vector<std::string> >.
 
template<typename T >
std::string to_string (const std::vector< T > &v)
 Format the given value as a string (override the template for vector).
 
template<typename T >
std::string to_string (const std::vector< std::vector< T > > &v)
 Format the given value as a string (override the template for vector).
 
template<typename conv_type , void(*)(conv_type *const) initfunc>
const conv_type * chartab ()
 String conversion tables.
 
void ctabinit_digit (int *const table)
 String conversion tables.
 
template<int exp>
void ctabinit_expdigit (int64_t *const table)
 String conversion tables.
 
void ctabinit_base32hex (int *const table)
 String conversion tables.
 
template<typename iter_type >
uint64_t parse_uint64 (iter_type beg, iter_type end)
 Parse an unsigned int from an iterator range.
 
template<typename iter_type >
int64_t parse_int64 (iter_type beg, iter_type end)
 Parse a signed int from an iterator range.
 
template<typename T >
void parse_value (T *dest, const std::string &str)
 Parse a value from a string. More...
 
template<>
void parse_value< std::string > (std::string *dest, const std::string &str)
 Parse a value from a string (std::string specialization).
 
template<>
void parse_value< bool > (bool *dest, const std::string &str)
 Parse a value from a string (bool specialization). More...
 
template<typename T >
parse_value (const std::string &str)
 Parse a value from a string.
 
template<>
double parse_value< double > (const std::string &str)
 Parse a value from a string (speedup for double).
 
template<typename iter_type >
void parse_value (std::string *const dest, iter_type beg, iter_type end)
 Parse a value from an iterator range.
 
template<typename iter_type >
void parse_value (uint64_t *const dest, iter_type beg, iter_type end)
 Parse a value from an iterator range.
 
template<typename iter_type >
void parse_value (int64_t *const dest, iter_type beg, iter_type end)
 Parse a value from an iterator range.
 
template<typename T , typename iter_type >
void parse_value (T *const dest, iter_type beg, iter_type end, typename boost::enable_if< boost::is_integral< T > >::type *dummy_int=0, typename boost::enable_if< boost::is_signed< T > >::type *dummy_sign=0)
 Parse a value from an iterator range.
 
template<typename T , typename iter_type >
void parse_value (T *const dest, iter_type beg, iter_type end, typename boost::enable_if< boost::is_integral< T > >::type *dummy_int=0, typename boost::disable_if< boost::is_signed< T > >::type *dummy_sign=0)
 Parse a value from an iterator range.
 
template<typename Dest , typename Default >
void parse_envvar (Dest *const dest, const std::string &envvar, const Default &def)
 Stores the value of an environment variable into a variable, or or assigns the given default if the environment variable is not set.
 
template<typename Dest , typename Default >
Dest parse_envvar (const std::string &envvar, const Default &def)
 Gets the value of an environment variable, or returns the given default if the environment variable is not set.
 
bool charcmp_ci (const char a, const char b)
 Case insensitive char comparator function.
 
bool charcmp_equal_ci (const char a, const char b)
 Case insensitive test if two chars are equal.
 
template<typename Iterator >
bool equal_ci (const std::string &s, Iterator b, Iterator e)
 Case insensitive test if a string equals the character in a range.
 
bool starts_with_cs (const std::string &s, const std::string &pref)
 Case sensitive test if a string starts with a given prefix.
 
bool ends_with_cs (const std::string &s, const std::string &suff)
 Case sensitive test if a string ends with a given suffix.
 
bool starts_with_ci (const std::string &s, const std::string &pref)
 Case insensitive test if a string starts with a given prefix.
 
bool ends_with_ci (const std::string &s, const std::string &suff)
 Case insensitive test if a string ends with a given suffix.
 
std::string toggle_suffix_cs (const std::string &s, const std::string &suff)
 Add or remove the given suffix to a string (case sensitive).
 
std::string remove_suffix_cs (const std::string &s, const std::string &suff)
 Remove the given suffix from a string, should it exist (case sensitive).
 
std::string toggle_suffix_ci (const std::string &s, const std::string &suff)
 Add or remove the given suffix to a string (case insensitive).
 
std::string remove_suffix_ci (const std::string &s, const std::string &suff)
 Remove the given suffix from a string, should it exist (case insensitive).
 
template<class T >
std::string lprefix (const T &what, const std::string &prefix)
 Add a prefix to each line in a string.
 
std::vector< std::string > wrap_line (const std::string &line, const size_t maxlw)
 Wrap a line of text at white space positions.
 
void expand_tabs (std::istream &in, std::ostream &out, const int colsep=4, const std::vector< size_t > &maxwidths=std::vector< size_t >(), const bool headings=true)
 Aligns all TAB positions in a text by converting them to spaces.
 
std::string expand_tabs (const std::string &str, const int colsep=4, const std::vector< size_t > &maxwidths=std::vector< size_t >(), const bool headings=true)
 Aligns all TAB positions in a text by converting them to spaces.
 
template<class Iter >
std::string expand_tabs (const std::string &str, const int colsep, Iter b_maxwidths, Iter e_maxwidths, const bool headings=true)
 Aligns all TAB positions in a text by converting them to spaces.
 
template<typename Iter >
std::pair< Iter, Iter > trim (Iter beg, Iter end)
 Get a pair of iterators indicating the white space trimmed version of the given range.
 
template<class T >
std::ostream & operator<< (std::ostream &os, const manipd< T > &mp)
 
template<class T >
std::istream & operator>> (std::istream &is, manipd< T > &mp)
 
template<typename exception_type >
void throw_exception (const std::string &msg)
 
template<>
void throw_exception< void > (const std::string &msg)
 
template<class exception_type , class Iter >
Iter match_arg (const std::string &arg, Iter beg, Iter end, const std::string &exlabel=std::string("match_arg"))
 Try to find a match for a string in a given set of possible values. More...
 
template<class Ex , class Iter >
size_t match_arg_idx (const std::string &arg, Iter beg, Iter end, const std::string &exlabel=std::string("match_arg"))
 Version of match_arg() that returns an array index instead of an iterator.
 
template<typename Enum , typename Iter >
std::istream & parse_enum (std::istream &in, Enum &dest, Iter beg, Iter end)
 Parse an enum value using match_arg().
 
template<typename Enum , int SZ>
std::istream & parse_enum (std::istream &in, Enum &dest, const std::string(&templ)[SZ])
 Parse an enum value using match_arg().
 
template<typename Enum >
enum_traits< Enum >::istream_type & operator>> (std::istream &in, Enum &en)
 Enum<-string conversion operator.
 
template<typename Enum >
enum_traits< Enum >::ostream_type & operator<< (std::ostream &out, const Enum &en)
 Enum->string conversion operator.
 
template<typename T >
void throw_exception (const T &ex)
 Throw an exception; if debugging is enabled, prints a message and optionally a backtrace when an exception is generated.
 
int get_maxopenfiles (const bool hardlim=false)
 Get the maximal number of open files.
 
int get_nopenfiles ()
 Get the number of files currently opened by the calling process.
 
std::string timestr ()
 Get a string representation of the current time.
 
uint64_t time_stamp ()
 Get a time stamp of the form yyyymmddhhmmss.
 
template<class T >
std::vector< typename T::key_type > map_keys (const T &m)
 Get the keys in a std::map as a vector.
 
template<class T >
std::vector< typename
T::mapped_type > 
map_values (const T &m)
 Get the values in a std::map as a vector.
 
std::ostream & operator<< (std::ostream &os, const poissonifier::pf_core::pos &p)
 
refseq_coor operator+ (const refseq_coor &c0, const refseq_coor::diff_t d)
 
refseq_coor operator- (const refseq_coor &c0, const refseq_coor::diff_t d)
 
refseq_coor::diff_t operator- (const refseq_coor &c0, const refseq_coor &c1)
 
bool operator< (const refseq_coor &gc1, const refseq_coor &gc2)
 
bool operator> (const refseq_coor &gc1, const refseq_coor &gc2)
 
bool operator<= (const refseq_coor &gc1, const refseq_coor &gc2)
 
bool operator>= (const refseq_coor &gc1, const refseq_coor &gc2)
 
bool operator== (const refseq_coor &gc1, const refseq_coor &gc2)
 
bool operator!= (const refseq_coor &gc1, const refseq_coor &gc2)
 
std::ostream & operator<< (std::ostream &os, const refseq_coor &gc)
 
std::istream & operator>> (std::istream &is, refseq_coor &gc)
 
bool operator== (const refseq_region &gc1, const refseq_region &gc2)
 
bool operator!= (const refseq_region &gc1, const refseq_region &gc2)
 
bool operator== (const refseq_range &gc1, const refseq_range &gc2)
 
bool operator!= (const refseq_range &gc1, const refseq_range &gc2)
 
std::ostream & operator<< (std::ostream &os, const refseq_range &gr)
 
std::istream & operator>> (std::istream &is, refseq_range &gr)
 
std::istream & operator>> (std::istream &in, Strand &s)
 Parse Strand.
 
std::ostream & operator<< (std::ostream &out, const Strand &s)
 Print Strand.
 
Strand other_strand (const Strand strand)
 Get the opposite strand.
 
std::istream & operator>> (std::istream &in, OptionalStrand &s)
 Parse OptionalStrand.
 
std::ostream & operator<< (std::ostream &out, const OptionalStrand &s)
 Print OptionalStrand.
 
OptionalStrand other_strand (const OptionalStrand strand)
 Get the opposite strand.
 
std::istream & operator>> (std::istream &in, ExtendedStrand &s)
 Parse ExtendedStrand.
 
std::ostream & operator<< (std::ostream &out, const ExtendedStrand &s)
 Print ExtendedStrand.
 
ExtendedStrand other_strand (const ExtendedStrand strand)
 Get the opposite strand.
 
std::istream & operator>> (std::istream &is, genomic_range &gr)
 Parse genomic_range. More...
 
std::ostream & operator<< (std::ostream &os, const genomic_range &gr)
 Print a genomic_range. More...
 
std::istream & operator>> (std::istream &is, annotation_entry::Phase &phase)
 
std::ostream & operator<< (std::ostream &os, const annotation_entry::Phase &phase)
 
std::ostream & operator<< (std::ostream &os, const nuc::base b)
 
template<typename Archive >
void serialize (Archive &ar, shore::refseq_coor &c, const unsigned int version)
 Serialization for shore::refseq_coor.
 
template<typename Archive >
void serialize (Archive &ar, shore::refseq_region &c, const unsigned int version)
 Serialization for shore::refseq_region.
 
template<typename Archive >
void serialize (Archive &ar, shore::refseq_range &c, const unsigned int version)
 Serialization for shore::refseq_range.
 
template<typename Archive >
void serialize (Archive &ar, shore::genomic_coor &c, const unsigned int version)
 Serialization for shore::genomic_coor.
 
template<typename Archive >
void serialize (Archive &ar, shore::genomic_region &c, const unsigned int version)
 Serialization for shore::genomic_region.
 
template<typename Archive >
void serialize (Archive &ar, shore::genomic_range &c, const unsigned int version)
 Serialization for shore::genomic_range.
 
template<typename Archive >
void serialize (Archive &ar, shore::read::accessory &r, const unsigned int version)
 
template<typename Archive >
void serialize (Archive &ar, shore::read &r, const unsigned int version)
 
template<typename Archive >
void serialize (Archive &ar, shore::alignment::accessory &a, const unsigned int version)
 
template<typename Archive >
void serialize (Archive &ar, shore::alignment &a, const unsigned int version)
 
template<typename Archive >
void serialize (Archive &ar, shore::dp_trace &t, const unsigned int version)
 
template<typename Archive >
void serialize (Archive &ar, shore::dp_mapping &m, const unsigned int version)
 
template<typename Archive >
void serialize (Archive &ar, shore::alignment_statistic &c, const unsigned int version)
 Serialization for shore::alignment_statistic.
 
std::ostream & operator<< (std::ostream &out, const shore::read &e)
 Write a FlatRead formatted SHORE read entry.
 
std::ostream & operator<< (std::ostream &os, const shore::alignment &en)
 Write an alignment struct to a MapList stream.
 
template<typename T >
std::istream & read_bigendian (std::istream &in, T &value)
 
std::istream & operator>> (std::istream &in, shore::local_variant &e)
 
template<typename T , typename U >
serial< U > & operator| (serial< T > &ser1, serial< U > &ser2)
 Connect two serial pipeline elements.
 
template<typename T , typename U >
parallel< U > & operator| (parallel< T > &par1, parallel< U > &par2)
 Connect two parallel pipeline elements.
 
template<typename T , typename U >
parallelizer< U > & operator| (serial< T > &ser, parallelizer< U > &paz)
 Connect a serial pipeline element to a parallelizer element.
 
template<typename T , typename U >
parallel< U > & operator| (parallelizer< T > &paz, parallel< U > &par)
 Connect a parallelizer to a parallel pipeline element.
 
template<typename T , typename U >
sync< U > & operator| (parallel< T > &par, sync< U > &syn)
 Connect a parallel pipeline element to a sync element.
 
template<typename T , typename U >
serial< U > & operator| (sync< T > &syn, serial< U > &ser)
 Connect a sync element to a serial pipeline element.
 
template<typename T , typename U >
desync< U > & operator| (serial< T > &ser, desync< U > &dsc)
 Connect a serial pipeline element to a desync element.
 
template<typename T , typename U >
parallel< U > & operator| (desync< T > &dsc, parallel< U > &par)
 Connect a desync element to a parallel pipeline element.
 
template<typename T >
void dump (serial< T > &ser)
 
template<typename A , typename B >
B & operator| (A &a, B &b)
 Connect two pipeline elements.
 
template<typename Cmp >
bool is_valid_comparator (const Cmp &cmp, typename boost::disable_if< boost::is_pointer< Cmp > >::type *=0)
 Check if cmp can be used for comparisons (always true for non function pointers).
 
template<typename Cmp >
bool is_valid_comparator (const Cmp &cmp, typename boost::enable_if< boost::is_pointer< Cmp > >::type *=0)
 Check if cmp can be used for comparisons (for function pointers, check that non-null).
 
template<typename T >
std::string typestr (const T *const value, typename boost::disable_if< boost::is_integral< T > >::type *dummy_int=0, typename boost::disable_if< boost::is_float< T > >::type *dummy_float=0)
 
template<typename T >
std::string typestr (const T *const value, typename boost::enable_if< boost::is_integral< T > >::type *dummy_int=0)
 
template<typename T >
std::string typestr (const T *const value, typename boost::enable_if< boost::is_float< T > >::type *dummy_float=0)
 
std::string typestr (const char *value)
 
template<typename T >
std::string typestr (const shore::relabs< T > *const value)
 
template<typename T >
std::string typestr (const std::vector< T > *const value)
 
template<typename T >
std::string typestr (const std::vector< std::vector< T > > *const value)
 
template<typename T >
std::string typestr (const std::set< T > *const value)
 
std::string path_compression (const std::string &path)
 Get only the compression suffix of a path name.
 
bool path_remove_compression (std::string &path)
 Remove any compression suffix from a path name. More...
 
std::string path_without_compression (const std::string &path)
 Get the path name with any compression suffix removed.
 
std::string file_maybe_compressed (const std::string &fn, bool *exists=0)
 Append or remove compression suffixes from a path name, depending on which one exists. More...
 
bool file_exists_compressed (const std::string &fn)
 Test if a file, or a compressed version, exists.
 

Variables

const int *const ctab_digit
 
const int64_t *const ctab_expdigit [21]
 

Detailed Description

SHORE core API.

       ___                          ___/
       ___    (1)                   ___    (6)
                                   /
   
   
      \___/                        \___
       ___    (2)                   ___    (7)
      /   \
   
   
      \___/                         ___
       ___    (3)                   ___    (8)
                                   /
   
   
       ___                          ___/
       ___   (4)                    ___    (9)
      /   \
   
   
      \___                          ___
       ___   (5)                    ___   (10)
          \                            \
   
   
      \___/                        \___
       ___   (11)                   ___   (12)
      /                            /   \
   
   
      \___/                         ___/
       ___   (13)                   ___   (14)
          \                        /   \
   
   
      \___                          ___/
       ___   (15)                   ___   (16)
      /                                \
   
   
         ALN                         BT
     1   global                      global
     2   local                       local
     3   dangling_ref/dangling_any   dangling_ref/dangling_any/dangling_same
     4   dangling_qry/dangling_any   dangling_qry/dangling_any/dangling_same
     5   dangling_ref/dangling_any   dangling_qry/dangling_any/dangling_other
     6   dangling_qry/dangling_any   dangling_ref/dangling_any/dangling_other
     7   dangling_ref/dangling_any   global
     8   dangling_qry/dangling_any   global
     9   global                      dangling_ref/dangling_any
    10   global                      dangling_qry/dangling_any
    11   local                       dangling_ref/dangling_any
    12   local                       dangling_qry/dangling_any
    13   dangling_ref/dangling_any   local
    14   dangling_qry/dangling_any   local
    15   local                       global
    16   global                      local

Copyright 2008,2009,2010,2011,2012 Stephan Ossowski, Korbinian Schneeberger, Felix Ott, Joerg Hagmann, Alf Scotland, Sebastian Bender

This file is part of SHORE.

SHORE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

SHORE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with SHORE. If not, see http://www.gnu.org/licenses/.

Enumeration Type Documentation

Operations that may me encoded in an alignment string.

Enumerator
ALN_MATCH 

Alignment match, T.

ALN_SUBST 

Alignment mismatch, [AT].

ALN_INS 

Insertion, [-T].

ALN_DEL 

Deletion, [T-].

ALN_LONGDEL 

Long query gap, [L150].

ALN_FRAGMENT 

Alignment region without sequence data of some (possibly estimated if at an end of an alignment) size, [F150], e.g. a result of paired-end read joining or 3' extension.

ALN_SOFTCLIP 

Soft clip, <ACGATT>.

ALN_BISULFITE 

Methyl mismatch, e.g. {CT}.

ALN_GRAPH 

Sequence graph mismatch / indel, e.g. (A-).

ALN_INVERT 

Modifier for ALN_FRAGMENT that reverses the strand, e.g.: [f150].

As OptionalStrand, with additional value UNKNOWN (e.g. as in GFF).

I.e. STR_NA_EXT="not stranded", STR_UNKNOWN_EXT="stranded, but strand unknown".

Different types of command line options.

Enumerator
OPT_NOTSET 

Command line option without a default value.

OPT_SET 

Command line option with a default value.

OPT_AUTO 

Command line option whose default will vary depending on other factors.

OPT_MANDATORY 

Mandatory command line option.

Function Documentation

template<typename Iter , typename Oter >
void shore::count_elements ( Iter  ibeg,
Iter  iend,
Oter  obeg,
Oter  oend,
bool  initialize_counts = true,
int  shift = 0 
)

Count elements in a range.

Output range must be zero-initialized and have at least size max_element(ibeg,iend)+2

std::string shore::file_maybe_compressed ( const std::string &  fn,
bool *  exists = 0 
)

Append or remove compression suffixes from a path name, depending on which one exists.

Returns
The modified file name and store a bool indicating if it exists.
template<class exception_type , class Iter >
Iter shore::match_arg ( const std::string &  arg,
Iter  beg,
Iter  end,
const std::string &  exlabel = std::string("match_arg") 
)

Try to find a match for a string in a given set of possible values.

First tries to find a perfect match. If a perfect match is not found, looks for a case insensitive complete match. If none is found, tries to find a matching prefix, first case sensitive, then case insensitive.

If no match, or multiple matches are found at the same stage of the lookup, an exception of the user-specified type is generated.

template<class Iter >
void shore::mean_filter ( Iter  beg,
Iter  end,
const size_t  width 
)

Applies mean filtering to the given sequence.

Parameters
beginBegin of the sequence.
endEnd of the sequence.
[in]widthWidth of the sliding window, must be odd.
template<class Iter >
double shore::medianize ( const Iter  begin,
const Iter  end 
)

Reorder the values in a range such that the median is in the center.

Returns
The median of the values in the range.
std::string shore::mktempdir ( const std::string &  prefix)

Create a temporary file directory with the given path prefix.

Returns
The name of the created directory.
std::ostream& shore::operator<< ( std::ostream &  os,
const genomic_range &  gr 
)

Print a genomic_range.

Format:

'SEQ1:POS..[SEQ2:]END';

'SEQ1:POS...XEND' if range size is zero;

END is inclusive, XEND exclusive

std::istream& shore::operator>> ( std::istream &  is,
genomic_range &  gr 
)

Parse genomic_range.

Formats:

'SEQ:POS..END', 'SEQ:POS~SIZE', 'SEQ1:POS..SEQ2:END';

'SEQ:POS...XEND', 'SEQ1:POS...SEQ2:XEND';

END is inclusive, XEND exclusive

template<typename T >
void shore::parse_value ( T *  dest,
const std::string &  str 
)

Parse a value from a string.

This one is required by av_parser.

template<>
void shore::parse_value< bool > ( bool *  dest,
const std::string &  str 
)

Parse a value from a string (bool specialization).

bool: Allow t[rue],f[alse],y[es],n[o] and 0,1.

bool shore::path_remove_compression ( std::string &  path)

Remove any compression suffix from a path name.

Returns
True If the path name was altered.
template<class Iter , class Oter >
void shore::skewness_kurtosis ( Iter  begin,
Iter  end,
Oter  dest,
const bool  var_n 
)

Calculate skewness and kurtosis for the values in a range.

Parameters
[in]beginBegin of the input range.
[in]endEnd of the input range.
[out]destOutput location for skewness and kurtosis; must have size >=2.
[in]var_n
template<class StringIterator >
size_t shore::split ( const std::string &  s,
StringIterator  destination,
const char  delim = '\t',
const size_t  limit = std::numeric_limits<size_t>::max()-1 
)

Tokenize a string into a container.

Returns
Number of tokens, or (limit+1) if there are more tokens available than limit.
template<class StringIterator >
size_t shore::split ( const std::string &  s,
StringIterator  destination,
const char *const  delims,
const size_t  limit = std::numeric_limits<size_t>::max()-1 
)

Tokenize a string into a container using multiple alternative delimiters.

Returns
Number of tokens, or (limit+1) if there are more tokens available than limit.
template<typename Iter , typename Oter >
void shore::suffix_array ( Iter  ibeg,
Iter  iend,
Oter  obeg,
bool  initialize_sa = true,
typename std::iterator_traits< Iter >::value_type  imax = std::numeric_limits<typename std::iterator_traits<Iter>::value_type>::max() 
)

Construct suffix array; values in input range must not be negative.

Parameters
ibegIterator to the begin of the input sequence.
iendIterator to the end of the input sequence.
obegIterator to the storage where the array is constructed.
initialize_saInitialize the output range to zero?
imaxMaximum value in the input range (size of the bucket array).
template<typename Ster , typename Ater , typename Query >
std::pair<Ater,Ater> shore::suffix_query_incremental ( Ster  sbeg,
Ster  send,
Ater  abeg,
Ater  aend,
const Query  q,
const size_t  ofs 
)

Binary search on a suffix array.

Parameters
sbegStart of the text.
sendEnd of the text.
abegStart of the suffix array range.
aendEnd of the suffix array range.
qLetter of the query.
ofsPosition of q in the query string.
template<class StringIterator >
size_t shore::tsplit ( const std::string &  s,
StringIterator  destination,
const char  delim = '\t',
const size_t  limit = std::numeric_limits<size_t>::max()-1 
)

Tokenize a into a container. Splits at no-delimiter-delimiter transitions (and vice versa).

Returns
Number of tokens, or (limit+1) if there are more tokens available than limit.
template<class StringIterator >
size_t shore::tsplit ( const std::string &  s,
StringIterator  destination,
const char *const  delims,
const size_t  limit = std::numeric_limits<size_t>::max()-1 
)

Tokenize a into a container using multiple alternative delimiters. Splits at no-delimiter-delimiter transitions (and vice versa).

Returns
Number of tokens, or (limit+1) if there are more tokens available than limit.