main.cpp
上传用户:hnzyys
上传日期:2007-06-13
资源大小:32k
文件大小:1k
源码类别:

生物技术

开发平台:

Visual C++

  1. #include <iostream>
  2. #include "AlignmentClass.h"
  3. #include "seqin.h"
  4. void main()
  5. {
  6. std::ofstream log("log");
  7. char *t=new char[];
  8. char *p=new char[];
  9. p="0000120000000022200000000";
  10. t="00000001200000000222000000";
  11. AlignmentResult *rar=new AlignmentResult;
  12. rar->Pattern=p;
  13. rar->Text=t;
  14. rar->TBegin=0;
  15. rar->TEnd=24;
  16. rar->PBegin=0;
  17. rar->PEnd=23;
  18. rar->TextCount=24;
  19. rar->PatternCount=23;
  20. seqgroup Seq;
  21. int seqcount=Seq.input();
  22. AlignmentClass align;
  23. float score=align.FinalAlign(*rar,rar->TBegin,rar->TEnd,rar->PBegin,rar->PEnd);
  24. int pgpcount=rar->PGapCount;
  25. int tgpcount=rar->TGapCount;
  26. std::vector<char>::iterator tmp1;
  27. log<<"tgap:";
  28. for(tmp1=rar->AlignedT.begin();tmp1<rar->AlignedT.end();++tmp1)
  29. log<<*tmp1<<" ";
  30. log<<std::endl;
  31. log<<"pgap:";
  32. for(tmp1=rar->AlignedP.begin();tmp1<rar->AlignedP.end();++tmp1)
  33. log<<*tmp1<<" ";
  34. log<<std::endl;
  35. }