本文整理汇总了C++中Population::SamplePop方法的典型用法代码示例。如果您正苦于以下问题:C++ Population::SamplePop方法的具体用法?C++ Population::SamplePop怎么用?C++ Population::SamplePop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Population
的用法示例。
在下文中一共展示了Population::SamplePop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
new_within_chrom_dprime[c] = new_within_chrom_dprime[c] / 100;
}
mean_dp_ldistchrom = mean_dp_ldistchrom / (Pop.NumChrom * 100);
Pop.AvgLD = Pop.AvgLD / (Pop.NumChrom * Pop.NumMarkers);
Pop.avg_pairwise_d = Pop.avg_pairwise_d / (Pop.NumChrom * Pop.NumMarkers);
ld << reps << '\t' << g << '\t' << mean_dp_ldistchrom << '\t' << Pop.avg_pairwise_d << '\t' << Pop.AvgLD
<< '\t' << mean_new_longdist_d << '\t' << mean_new_longdist_dprime;
for (int c = 0; c < Pop.NumChrom; c++)
{
ld << '\t' << Pop.avg_d[c] << '\t' << new_within_chrom_dprime[c];
}
ld << '\n';
if ((g + 1) % 100 == 0)
cout << "Generation " << g + 1 << " complete. ";
}//end of generations
cout << '\n';
if (!Pop.popExtinct)
{
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;