Пример #1
0
void main()
{
	TFIM test1[5];
	Regulation test;
	test.readName(test1);
	int a=test.getGeneAmount();
	cout<<"gene amount:"<<a<<endl;
	int i;
	for(i=0;i<5*5;i++)
	{
		cout<<"regulation:"<<test.originalMatrix<<endl;
		test.originalMatrix=test.originalMatrix+1;
	}
	getchar();
}
Пример #2
0
int main()
{
	TFIM test[N];
	Regulation Hope;
	Hope.readName(test);
	Hope.fullFill();
	cout<<Hope.getGeneAmount()<<endl;
	cout<<Hope.originalMatrix[11][11]<<endl;
	FILE *fp;
	fp=fopen("sequence","w");
	for(int i=0;i<Hope.getGeneAmount();i++)
	{
		test[i].getGeneInformation(fp);
		cout<<i<<endl;
		//cout<<test[i].getGeneSequence()<<endl;
	}
	fclose(fp);
	//rewind(fp);
	//cout<<i<<endl;
	//cout<<test[164].getGeneName()<<endl;
	//cout<<test[164].getLeftPosition()<<endl;
	//cout<<test[164].getRightPosition()<<endl;
	//cout<<test[164].getGeneSequence()<<endl;
	/*EasytoDebug test1[200];
	test1[100].fetch();
	cout<<test1[100].getLength()<<endl;
	cout<<test1[100].getNumber()<<endl;
	cout<<test1[100].getSequence()<<endl;*/
	//EasytoDebug read[100];
	//fp=fopen("Sequence","r");
	/*for(int j=0;j<1;j++)
	{
		read[j].fetch(fp);
		//cout<<read[j].getNumber()<<endl;
		//cout<<read[j].getSequence()<<endl;
	}*/
	getchar();
}
Пример #3
0
int main()
{
	TFIM test[N];
	Regulation Hope;
	Hope.readName(test);
	Hope.fullFill();
	//Calculate xinyu;
	//xinyu.Network_1(Hope.originalMatrix,166);
	//xinyu.Network_2(Hope.originalMatrix,166);
	//cout<<xinyu.nong[90];
	int A,C;
	string B;
	FILE *fp;
	//FILE *fp1;
	//fp=fopen("DNA","w");
	/*for(int i=160;i<Hope.getGeneAmount();i++)
	{
		test[i].getGeneInformation(fp);
		cout<<i<<endl;
		//cout<<test[i].getGeneSequence()<<endl;
	}
	fclose(fp);*/
	//ReadDNA read[100];
	ReadDNA luck[N];
	Sequence good[N];
	fp=fopen("DNA","r");
	//fp1=fopen("AAS","w");
	//ofstream data("AAS");
	for(int i=0;i<Hope.getGeneAmount();i++)
	{
		//test[i].getGeneInformation(fp);
		luck[i].fetch(fp);
		A=luck[i].getNumber();
		B=luck[i].getSequence();
		C=luck[i].getLength();
		//B=test[i].getGeneSequence();
		//C=B.length();
		good[i].initializeGeneSequence(B,A,C);
		good[i].translation();
		B=good[i].aminoAcidSequence;
		//cout<<A<<"	"<<B<<endl;
	}
	fclose(fp);
	//data.close();
	ofstream RN("newGRN");
	string insertGene="MSKGEELFTGVVPILVELDGDVNGHKFSVSGEGEGDATYGKLTLKFICTTGKLPVPWPTLVTTFAYGVQCFSRYPDHMKRHDFFKSAMPEGYVQERTIFFKDDGNYKTRAEVKFEGDTLVNRIELKGIDFKEDGNILGHKLEYNYNSHNVYIMADKQKNGIKVNFKIRHNIEDGSVQLADHYQQNTPIGDGPVLLPDNHYLSTQSVLSKDPNEKRDHMVLLEFVTAAGITHGMDELYK";
	GRN newGRN;
	newGRN.initializeGRN(Hope.originalMatrix,Hope.getGeneAmount());
	good[166].getNewASS(insertGene);
	newGRN.constructNewGRN(good);
	for(int j=0;j<N;j++)
	{
		for(int i=0;i<N;i++)
		{
			RN<<newGRN.newGRNCorrelation[j][i]<<"	";
		}
		RN<<endl;
	}
	//test[30].getGeneInformation();
	//test[31].getGeneInformation();
	//int a;
	//a=test[31].getRNA();
	//a=test[30].getRNA();
	getchar();
}