Пример #1
0
void Do_PairAlign()
{
	if(param.max_snp_num>0)
		param.max_snp_num=2;
	read_a.CheckFile(fin_a);
	read_b.CheckFile(fin_b);
	
	vector<pthread_t> pthread_ids(param.num_procs);
	//create
	for(int i=0; i<param.num_procs; i++)
		pthread_create(&pthread_ids[i], NULL, t_PairAlign, NULL);
	//join
	for (int i=0; i<param.num_procs; i++)
		pthread_join(pthread_ids[i], NULL);
	//
};
Пример #2
0
void Do_SingleAlign()
{
	read_a.CheckFile(fin_a);
	vector<pthread_t> pthread_ids(param.num_procs);
	//create
	for(int i=0; i<param.num_procs; i++)
		pthread_create(&pthread_ids[i], NULL, t_SingleAlign, NULL);
	//join
	for (int i=0; i<param.num_procs; i++)
		pthread_join(pthread_ids[i], NULL);
};
Пример #3
0
void Do_PairAlign()
{
	if(param.max_snp_num>0)
		param.max_snp_num=2;	
	read_a.CheckFile(fin_a);
	read_b.CheckFile(fin_b);
	PairAlign a;
	int n1, n2;
	while(1)
	{
		n1=read_a.LoadBatchReads(fin_a);
		n2=read_b.LoadBatchReads(fin_b);
		if(!n1||(n1!=n2))
			break;
		a.ImportBatchReads(n1, read_a.mreads, read_b.mreads);
		a.Do_Batch(ref);		
		fout<<a._str_align;
		fout_unpair<<a._str_align_unpair;
		cout<<read_a._index<<" reads finished. "<<Cal_AllTime()<<" secs passed"<<endl;
	}	
	n_aligned_pairs=a.n_aligned_pairs;
	n_aligned_a=a.n_aligned_a;
	n_aligned_b=a.n_aligned_b;
};
Пример #4
0
void Do_SingleAlign()
{
	read_a.CheckFile(fin_a);
	SingleAlign a;
	a.ImportFileFormat(read_a._file_format);
	a.SetFlag('a');
	while(read_a.LoadBatchReads(fin_a))
	{
		a.ImportBatchReads(read_a.num, read_a.mreads);
		a.Do_Batch(ref);
		fout<<a._str_align;
		cout<<read_a._index<<" reads finished. "<<Cal_AllTime()<<" secs passed"<<endl;
	}
	n_aligned=a.n_aligned;	
};