/** ** Copyright (c) 2007-2010 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. ** **/ #ifndef TRIMMER_PROCESS_H #define TRIMMER_PROCESS_H #include #include #include #include #include "TrimmerResult.h" class CTrimmerInput; class CTrimmer; class CTrimmerProcess { public: CTrimmerProcess() : m_FpIn(0) , m_FpOut(0) , m_Threshold(INT_MIN) , m_nPadLen(0) , m_nExtraBases(0) {}; CTrimmerProcess(CTrimmerInput & trimmerInput); virtual ~CTrimmerProcess(); void Run(CTrimmer & trimmer); private: FILE * m_FpIn; FILE * m_FpOut; FILE * m_FpReport; int m_Threshold; int m_nPadLen; int m_nExtraBases; char m_Buffer[MAX_BUF_SIZE]; char m_ReadString[MAX_BUF_SIZE]; char m_PreString[MAX_BUF_SIZE]; std::map m_ResultHolder; void runFromFile(CTrimmer & trimmer); void runFromFastqFile(CTrimmer & trimmer); void runFromConsole(CTrimmer & trimmer); void deallocateHolder(); void parse(); void parse(const char delimiter, const int startColumn, // Columns are indexed from 1 const int endColumn); }; #endif // TRIMMER_PROCESS_H