00001 #ifndef ALGO_ALIGN_PROSPLIGN_COMPART__HPP
00002 #define ALGO_ALIGN_PROSPLIGN_COMPART__HPP
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #include <corelib/ncbistl.hpp>
00035 #include <corelib/ncbiargs.hpp>
00036 #include <algo/align/splign/splign.hpp>
00037 #include <objects/seqalign/seqalign__.hpp>
00038
00039 BEGIN_NCBI_SCOPE
00040 USING_SCOPE(objects);
00041
00042 BEGIN_SCOPE(prosplign)
00043
00044 class CCompartOptions {
00045 public:
00046 static void SetupArgDescriptions(CArgDescriptions* argdescr);
00047
00048 CCompartOptions(const CArgs& args);
00049
00050 double m_CompartmentPenalty;
00051 double m_MinCompartmentIdty;
00052 double m_MinSingleCompartmentIdty;
00053 int m_MaxExtent;
00054 bool m_ByCoverage;
00055 int m_MaxIntron;
00056
00057 static const double default_CompartmentPenalty;
00058 static const double default_MinCompartmentIdty;
00059 static const double default_MinSingleCompartmentIdty;
00060 static const int default_MaxExtent = 500;
00061 static const bool default_ByCoverage = true;
00062 static const int default_MaxIntron;
00063 };
00064
00065 struct SCompartment {
00066 SCompartment(int from_, int to_, bool strand_, int covered_aa_, double score_) :
00067 from(from_), to(to_), strand(strand_), covered_aa(covered_aa_), score(score_) {}
00068
00069 int from;
00070 int to;
00071 bool strand;
00072 int covered_aa;
00073 double score;
00074
00075 bool operator< (const SCompartment& comp) const
00076 {
00077 if (strand == comp.strand) {
00078 return from < comp.from;
00079 } else {
00080 return strand < comp.strand;
00081 }
00082 }
00083 };
00084
00085 typedef vector<SCompartment> TCompartmentStructs;
00086 typedef list<CRef<CSeq_annot> > TCompartments;
00087
00088
00089 TCompartments SelectCompartmentsHits(const CSplign::THitRefs& hitrefs, CCompartOptions compart_options);
00090 TCompartmentStructs MakeCompartments(const TCompartments& compartments_hits, CCompartOptions compart_options);
00091
00092 TCompartmentStructs MakeCompartments(const CSplign::THitRefs& hitrefs, CCompartOptions compart_options);
00093
00094 END_SCOPE(prosplign)
00095 END_NCBI_SCOPE
00096 #endif
00097
00098