PileupElement.h

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_H__
00019 #define __PILEUP_ELEMENT_H__
00020 
00021 #include "SamRecord.h"
00022 
00023 /// This is a base class pileup component, representing the information
00024 /// for one reference position.  Child classes will be defined to detail more
00025 /// information that needs to be saved and how it should be analyzed.
00026 class PileupElement
00027 {
00028 public:
00029     PileupElement();
00030 
00031     PileupElement(const PileupElement& q);
00032 
00033     virtual ~PileupElement();
00034 
00035 
00036     // Add an entry to this pileup element.  
00037     virtual void addEntry(SamRecord& record);
00038 
00039     // Perform the analysis associated with this class.
00040     virtual void analyze();
00041 
00042     // Resets the entry, setting the new position associated with this element.
00043     virtual void reset(int32_t refPosition);
00044     
00045     const char* getChromosome() const { return(myChromosome.c_str()); }
00046 
00047     int32_t getRefPosition()  const { return(myRefPosition); }
00048 
00049 protected:
00050     static const int32_t UNSET_POSITION = -1;
00051 
00052 private:
00053     int32_t myRefPosition;
00054     std::string myChromosome;
00055 };
00056 
00057 
00058 #endif
Generated on Wed Nov 17 15:38:27 2010 for StatGen Software by  doxygen 1.6.3