00001 #ifndef ALGO_ALIGN_UTIL_BLAST_TABULAR__HPP
00002 #define ALGO_ALIGN_UTIL_BLAST_TABULAR__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
00035
00036 #include <corelib/ncbistd.hpp>
00037 #include <objects/seqalign/Std_seg.hpp>
00038 #include <algo/align/util/align_shadow.hpp>
00039
00040 BEGIN_NCBI_SCOPE
00041
00042
00043 class CBlastTabular: public CAlignShadow
00044 {
00045 public:
00046
00047 typedef CAlignShadow TParent;
00048 typedef TParent::TCoord TCoord;
00049
00050
00051 CBlastTabular(void) {};
00052
00053 CBlastTabular(const objects::CSeq_align& seq_align, bool save_xcript = false);
00054
00055 CBlastTabular(const TId& idquery, TCoord qstart, bool qstrand,
00056 const TId& idsubj, TCoord sstart, bool sstrand,
00057 const string& xcript);
00058
00059 CBlastTabular(const char* m8, bool force_local_ids = false);
00060
00061
00062
00063 typedef int (*SCORE_FUNC)(const CRef<objects::CSeq_id>& id);
00064 CBlastTabular(const char* m8, SCORE_FUNC score_func);
00065
00066
00067 void SetLength(TCoord length);
00068 TCoord GetLength(void) const;
00069
00070 void SetMismatches(TCoord mismatches);
00071 TCoord GetMismatches(void) const;
00072
00073 void SetGaps(TCoord gaps);
00074 TCoord GetGaps(void) const;
00075
00076 void SetEValue(double evalue);
00077 double GetEValue(void) const;
00078
00079 void SetIdentity(float identity);
00080 float GetIdentity(void) const;
00081
00082 void SetScore(float evalue);
00083 float GetScore(void) const;
00084
00085 virtual void Modify(Uint1 where, TCoord new_pos);
00086
00087 protected:
00088
00089 TCoord m_Length;
00090 TCoord m_Mismatches;
00091 TCoord m_Gaps;
00092 double m_EValue;
00093 float m_Identity;
00094 float m_Score;
00095
00096 template <class F>
00097 void x_Deserialize(const char* m8, F seq_id_extractor);
00098
00099 virtual void x_PartialSerialize(CNcbiOstream& os) const;
00100 virtual void x_PartialDeserialize(const char* m8);
00101
00102 static void sx_MineSegment(size_t where, const objects::CStd_seg::TLoc & locs,
00103 TSeqPos * delta, TSeqPos * prev);
00104 };
00105
00106
00107
00108
00109
00110 END_NCBI_SCOPE
00111
00112 #endif
00113
00114