SamTags.h

00001 /*
00002  *  Copyright (C) 2010-2011  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 __SAM_TAGS_H__
00019 #define __SAM_TAGS_H__
00020 
00021 #include <stdint.h>
00022 #include <stdexcept>
00023 #include "SamRecord.h"
00024 
00025 class SamTags
00026 {
00027 public:
00028     /// Constants for parsing a tags.
00029     static const char* BQ_TAG;
00030     static const char BQ_TAG_TYPE;
00031     static const char* MD_TAG;
00032     static const char MD_TAG_TYPE;
00033     static const char* ORIG_POS_TAG;
00034     static const char ORIG_POS_TAG_TYPE;
00035     static const char* ORIG_CIGAR_TAG;
00036     static const char ORIG_CIGAR_TAG_TYPE;
00037     static const char* ORIG_QUAL_TAG;
00038     static const char ORIG_QUAL_TAG_TYPE;
00039 
00040     /// Create the MD tag for the specified input record and the genome.
00041     /// \return returns true if an MD tag was created, false if one could not
00042     /// be created.
00043     static bool createMDTag(String& outputMDtag, SamRecord& inputRec, GenomeSequence& genome);
00044     /// Check to see if the MD tag in the record is accurate.
00045     static bool isMDTagCorrect(SamRecord& inputRec, GenomeSequence& genome);
00046     // Update/Add the MD tag in the inputRec.
00047     static bool updateMDTag(SamRecord& inputRec, GenomeSequence& genome);
00048 
00049 private:
00050     SamTags();
00051 };
00052 
00053 
00054 #endif
Generated on Tue Aug 23 18:19:04 2011 for libStatGen Software by  doxygen 1.6.3