main.cpp
资源名称:040103.rar [点击查看]
上传用户:hnzyys
上传日期:2007-06-13
资源大小:32k
文件大小:1k
源码类别:
生物技术
开发平台:
Visual C++
- #include <iostream>
- #include "AlignmentClass.h"
- #include "seqin.h"
- void main()
- {
- std::ofstream log("log");
- char *t=new char[];
- char *p=new char[];
- p="0000120000000022200000000";
- t="00000001200000000222000000";
- AlignmentResult *rar=new AlignmentResult;
- rar->Pattern=p;
- rar->Text=t;
- rar->TBegin=0;
- rar->TEnd=24;
- rar->PBegin=0;
- rar->PEnd=23;
- rar->TextCount=24;
- rar->PatternCount=23;
- seqgroup Seq;
- int seqcount=Seq.input();
- AlignmentClass align;
- float score=align.FinalAlign(*rar,rar->TBegin,rar->TEnd,rar->PBegin,rar->PEnd);
- int pgpcount=rar->PGapCount;
- int tgpcount=rar->TGapCount;
- std::vector<char>::iterator tmp1;
- log<<"tgap:";
- for(tmp1=rar->AlignedT.begin();tmp1<rar->AlignedT.end();++tmp1)
- log<<*tmp1<<" ";
- log<<std::endl;
- log<<"pgap:";
- for(tmp1=rar->AlignedP.begin();tmp1<rar->AlignedP.end();++tmp1)
- log<<*tmp1<<" ";
- log<<std::endl;
- }