当前位置: 首页>>代码示例>>C++>>正文


C++ Population::WeightedFst方法代码示例

本文整理汇总了C++中Population::WeightedFst方法的典型用法代码示例。如果您正苦于以下问题:C++ Population::WeightedFst方法的具体用法?C++ Population::WeightedFst怎么用?C++ Population::WeightedFst使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Population的用法示例。


在下文中一共展示了Population::WeightedFst方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: main


//.........这里部分代码省略.........
			int Q;
			for (g = 0; g < Pop.NumSelGen; g++)
			{
				Pop.PopulationSize = Pop.DeterminePopSize();
				if (Pop.PopulationSize == 0)
					Pop.popExtinct = true;
				else
				{
					cout << "Sample Gen " << g + 1 << ", ";
					Pop.StandardizeGenotypes();
					Pop.Mating(ss_sampled);//mate choice
					Pop.Mutation();
					//Sample the new population
					Pop.SamplePop();
					//calculate stats
					//Pop.SampleFsts();
					Pop.POFst();
					Pop.CalcFstChiSq(Pop.F_Marker);
					Pop.BenjaminiHochbergFDR(Pop.Psig);
					Pop.CalcLD();
					for (int c = 0; c < Pop.NumChrom; c++)
					{
						for (int cc = 0; cc < Pop.NumMarkers - 1; cc++)
						{//Pairwise
							returned_data = Pop.AdultPopLD(c, c, cc, cc + 1);
							Pop.avg_pairwise_d = Pop.avg_pairwise_d + returned_data.d;
							Pop.AvgLD = Pop.AvgLD + returned_data.dprime;
						}
					}
					Pop.AvgLD = Pop.AvgLD / (Pop.NumChrom * Pop.NumMarkers);
					//Pop.LongDistLD();
					Pop.QTLFstCalcs();
					Pop.GeneticVariance();
					Pop.WeightedFst(Pop.F_Marker, 0);
					Pop.CalculateFstCIs(Pop.F_Marker);
					Pop.bootstrap_resampling(Pop.F_Marker);
					Pop.PeakDetector();
					ci95d_m = ci95d_m + Pop.ci_detected95;
					ci95s_m = ci95s_m + Pop.ci_spurious95;
					ci99d_m = ci99d_m + Pop.ci_detected;
					ci99s_m = ci99s_m + Pop.ci_spurious;
					bs95d_m = bs95d_m + Pop.bs_detected95;
					bs95s_m = bs95s_m + Pop.bs_spurious95;
					bs99d_m = bs99d_m + Pop.bs_detected;
					bs99s_m = bs99s_m + Pop.bs_spurious;
					fdr_m = fdr_m + Pop.fdr_det;
					fdrs_m = fdrs_m + Pop.fdr_spur;
					ci95_det.push_back(Pop.ci_detected95);
					ci95_spu.push_back(Pop.ci_spurious95);
					ci99_det.push_back(Pop.ci_detected);
					ci99_spu.push_back(Pop.ci_spurious);
					bs95_det.push_back(Pop.bs_detected95);
					bs95_spu.push_back(Pop.bs_spurious95);
					bs99_det.push_back(Pop.bs_spurious);
					bs99_spu.push_back(Pop.bs_detected);
					fdr_det.push_back(Pop.fdr_det);
					fdr_spu.push_back(Pop.fdr_spur);
					sig_thresh << '\n' << reps << '\t' << g << '\t' << Pop.fdr_det << '\t' << Pop.fdr_spur << '\t' << Pop.ci_detected << '\t' << Pop.ci_spurious << '\t'
						<< Pop.ci_detected95 << '\t' << Pop.ci_spurious95 << '\t' << Pop.bs_detected << '\t' << Pop.bs_spurious << '\t' << Pop.bs_detected95 << '\t'
						<< Pop.bs_spurious95;
					peak_n++;
					if (g == 0 && reps == 0)
					{
						Fsts << "TotalNumPolymorphicLoci:" << Pop.NumPolymorphicLoci << '\n';
						Fsts << "NumSampledAdults:" << Pop.pAdultSample << '\n';
						Fsts << "NumSampledOffspring:" << Pop.ProgSample << '\n';
开发者ID:spflanagan,项目名称:gwsca_simulation_model,代码行数:67,代码来源:life_cycle.cpp


注:本文中的Population::WeightedFst方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。