00001 // Copyright 2010 Complete Genomics, Inc. 00002 // 00003 // Licensed under the Apache License, Version 2.0 (the "License"); you 00004 // may not use this file except in compliance with the License. You 00005 // may obtain a copy of the License at 00006 // 00007 // http://www.apache.org/licenses/LICENSE-2.0 00008 // 00009 // Unless required by applicable law or agreed to in writing, software 00010 // distributed under the License is distributed on an "AS IS" BASIS, 00011 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 00012 // implied. See the License for the specific language governing 00013 // permissions and limitations under the License. 00014 00015 #ifndef CGATOOLS_VARIANTS_CALLDIFFRESULT_HPP_ 00016 #define CGATOOLS_VARIANTS_CALLDIFFRESULT_HPP_ 1 00017 00019 00020 #include "cgatools/core.hpp" 00021 #include "cgatools/variants/Call.hpp" 00022 #include "cgatools/variants/CallDiffMatchType.hpp" 00023 #include "cgatools/variants/PhasedHypothesis.hpp" 00024 00025 namespace cgatools { namespace variants { 00026 00028 class CallDiffResult 00029 { 00030 public: 00031 void setHypotheses(const PhasedHypothesis& lhs, const PhasedHypothesis& rhs, 00032 const std::vector<size_t>& perm); 00033 00037 static cdmt::MatchType mergeMatchTypes(cdmt::MatchType mtA, cdmt::MatchType mtB); 00038 00040 static const char* getMatchTypeString(cdmt::MatchType mt); 00041 00044 static std::string getMatchTypeString(const std::vector<cdmt::MatchType>& mt); 00045 00049 static std::string getSimpleMatchTypeString(const std::vector<cdmt::MatchType>& mt); 00050 00052 static bool isConsistent(cdmt::MatchType mt); 00053 00055 static bool isIdentical(cdmt::MatchType mt); 00056 00058 std::vector<cdmt::MatchType> matchType_; 00059 00062 std::vector<cdmt::MatchType> matchTypeBySegment_; 00063 00065 boost::array<PhasedHypothesis, 2> hyp_; 00066 00069 boost::array<std::vector< std::vector< std::pair<cdmt::MatchType, const Call*> > >, 2> callClass_; 00070 }; 00071 00072 } } // cgatools::variants 00073 00074 #endif // CGATOOLS_VARIANTS_CALLDIFFRESULT_HPP_