⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.cpp

📁 利用动态规划算法进行核酸序列的两两比对的源代码。
💻 CPP
字号:
#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;
	
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -