00001 /* 00002 * Copyright (C) 2010 Regents of the University of Michigan 00003 * 00004 * This program is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation, either version 3 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00018 #ifndef __PILEUP_ELEMENT_BASE_QUAL_H__ 00019 #define __PILEUP_ELEMENT_BASE_QUAL_H__ 00020 00021 #include <stdint.h> 00022 #include "PileupElement.h" 00023 00024 /// This class inherits from the base class and stores base and qualities. 00025 class PileupElementBaseQual : public PileupElement 00026 { 00027 public: 00028 PileupElementBaseQual(); 00029 // NOTE that this method does not actually copy, it just resets. 00030 PileupElementBaseQual(const PileupElementBaseQual& q); 00031 virtual ~PileupElementBaseQual(); 00032 00033 // Add an entry to this pileup element. 00034 virtual void addEntry(SamRecord& record); 00035 00036 // Perform the alalysis associated with this class. In this case, it is 00037 // a print of the base & quality information associated with this position. 00038 virtual void analyze(); 00039 00040 // Resets the entry, setting the new position associated with this element. 00041 virtual void reset(int32_t refPosition); 00042 00043 private: 00044 static const char UNSET_QUAL = 0xFF; 00045 00046 char* myBases; 00047 char* myQualities; 00048 int myAllocatedSize; 00049 int myIndex; 00050 bool myAddDelAsBase; 00051 }; 00052 00053 #endif