/** ** Copyright (c) 2007-2009 Illumina, Inc. ** ** This software is covered by the "Illumina Genome Analyzer Software ** License Agreement" and the "Illumina Source Code License Agreement", ** and certain third party copyright/licenses, and any user of this ** source file is bound by the terms therein (see accompanying files ** Illumina_Genome_Analyzer_Software_License_Agreement.pdf and ** Illumina_Source_Code_License_Agreement.pdf and third party ** copyright/license notices). ** ** This file is part of the Consensus Assessment of Sequence And VAriation ** (CASAVA) software package. ** ** \file SignalMeansTile.hh ** ** \brief I/O API for signal means files (_all files). ** ** \author Mauricio Varea **/ #ifndef CASAVA_COMMON_SIGNAL_MEANS_TILE_HH #define CASAVA_COMMON_SIGNAL_MEANS_TILE_HH #include #include #include #include #include "common/SignalMeans.hh" namespace casava { namespace common { class SignalMeansTile { public: // use this one to read from file: SignalMeansTile(); // use either of these one to populate directly: SignalMeansTile(const SignalMeansTile &ref); SignalMeansTile(const unsigned int numberOfCycles); SignalMeansTile &operator=(const SignalMeansTile &ref); unsigned int getNumFilteredClusters() {return passFilter_.first;} unsigned int getNumOriginalClusters() {return passFilter_.second;} void setNumFilteredClusters(const unsigned int &n) {passFilter_.first = n;} void setNumOriginalClusters(const unsigned int &n) {passFilter_.second = n;} void incNumFilteredClusters() {passFilter_.first++;} void incNumOriginalClusters() {passFilter_.second++;} unsigned int getNumberOfCycles() {return baseCalls_.size();} void clear(const std::list &remove); void readHeader(std::istream &is); unsigned int read(std::istream &is); void writeHeader(std::ostream &os); unsigned int write(std::ostream &os); void incrementallyPopulate(std::string seq); // a SignalMeansTile is valid when baseCalls_[i] contains cycle i+1 (and there are no gaps) bool isValid(); void makeValid(); private: // first -> Filtered, second -> Original. (PF == 0 is second - first) std::pair passFilter_; std::vector baseCalls_; }; } // namespace common } // namespace casava #endif // #ifndef CASAVA_COMMON_SIGNAL_MEANS_TILE_HH