AlignmentClass.h
资源名称:040103.rar [点击查看]
上传用户:hnzyys
上传日期:2007-06-13
资源大小:32k
文件大小:2k
源码类别:
生物技术
开发平台:
Visual C++
- #include <math.h>
- #include <vector>
- #include <algorithm>
- #include <fstream>
- #include <iostream>
- #include <stdio.h>
- #include <time.h>
- #define Alignmentclassh Alignmentclassh
- #define PSS4LineLength 8044
- //64722025
- #define PSS4Val 4
- #define LocalSimDomain 0.666666
- #define GlobalSimDomain 0.83
- #define AlignmentLen 28
- #define ExtendStep 12
- const int StartCount=8;
- const int PalCount=4;
- int conversL(char L);
- int PDBIDHash(const char *PDBID);
- int conversSeedVal(char *tmp,int step);
- class AlignmentResult
- {
- public:
- int PDBPos;
- int TBegin;
- int TEnd;
- int PBegin;
- int PEnd;
- std::vector<int> TGapRecord;
- std::vector<int> PGapRecord;
- std::vector<char> AlignedT;
- std::vector<char> AlignedP;
- int TGapCount;
- int PGapCount;
- char *Text;
- char *Pattern;
- int PatternCount;
- int TextCount;
- float Similarity;
- float SimScore;
- double p_value;
- bool IsTbegin();
- bool IsTend();
- bool IsPbegin();
- bool IsPend();
- int Lextern();
- int Rextern();
- void gapinsert();
- void AssignOneResult(int PDBPos1,int TBegin1,int TEnd1,int PBegin1,int PEnd1,char *Text1,char *Pattern1,int PatternCount1,int TextCount1)
- {
- PDBPos=PDBPos1;
- PBegin=PBegin1;
- PEnd=PEnd1;
- TBegin=TBegin1;
- TEnd=TEnd1;
- Text=Text1;
- Pattern=Pattern1;
- PatternCount=PatternCount1;
- TextCount=TextCount1;
- Similarity=1;
- SimScore=0;
- }
- };
- class AlignmentClass
- {
- public:
- //int ShowMax(int a,int b,int c);
- //float S(char a,char b);// 罚分函数
- void MainAlignment(AlignmentResult &tmpAR);
- void ResultAsignMent(AlignmentResult& tmpA1,AlignmentResult& tmpA2);
- void test(AlignmentResult &tmpAR);
- float FinalAlign(AlignmentResult& tmpA,int tb,int te,int pb,int pe);
- //float s[4][4]={{1,0.1,0,0.1},{0.1,1,0.1,0},{0,0.1,1,0.1},{0.1,0,0.1,1}};
- //AligmentResult LExtend(AligmentResult tmpAS);
- //AligmentResult RExtend(AligmentResult tmpAS);
- //AligmentResult GlobalExtend(AligmentResult tmpAS);
- //AligmentResult FininalAlignment();
- //char P[PSS4LineLength],T[PSS4LineLength];
- /*
- char *Seed;
- char *Pattern;
- char *Text;
- int PatternCount;
- int TextCount;
- int Pbegin;
- int Pend;
- int Tbegin;
- int Tend;
- int PDBPos;*/
- //void Init(int PDBPos,char *Pattern,char *Text,int PatternCount,int TextCount,int Pbegin,int Pend,int Tbegin,int Tend);
- };