本文整理汇总了C++中BigFloat::ToDouble方法的典型用法代码示例。如果您正苦于以下问题:C++ BigFloat::ToDouble方法的具体用法?C++ BigFloat::ToDouble怎么用?C++ BigFloat::ToDouble使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BigFloat
的用法示例。
在下文中一共展示了BigFloat::ToDouble方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
SampleDataLikelihoods allSampleDataLikelihoods;
for (map<string, SampleDataLikelihoods>::iterator p = sampleDataLikelihoodsByPopulation.begin(); p != sampleDataLikelihoodsByPopulation.end(); ++p) {
SampleDataLikelihoods& sdls = p->second;
allSampleDataLikelihoods.reserve(allSampleDataLikelihoods.size() + distance(sdls.begin(), sdls.end()));
allSampleDataLikelihoods.insert(allSampleDataLikelihoods.end(), sdls.begin(), sdls.end());
}
// calculate the marginal likelihoods for this population
marginalGenotypeLikelihoods(genotypeCombos, allSampleDataLikelihoods);
// store the marginal data likelihoods in the results, for easy parsing
// like a vector -> map conversion...
results.update(allSampleDataLikelihoods);
}
map<string, int> repeats;
if (parameters.showReferenceRepeats) {
repeats = parser->repeatCounts(parser->currentSequencePosition(), parser->currentSequence, 12);
}
vector<Allele> alts;
if (parameters.onlyUseInputAlleles
|| parameters.reportAllHaplotypeAlleles
|| parameters.pooledContinuous) {
//alts = genotypeAlleles;
for (vector<Allele>::iterator a = genotypeAlleles.begin(); a != genotypeAlleles.end(); ++a) {
if (!a->isReference()) {
alts.push_back(*a);
}
}
} else {
// get the unique alternate alleles in this combo, sorted by frequency in the combo
vector<pair<Allele, int> > alternates = alternateAlleles(bestCombo, referenceBase);
for (vector<pair<Allele, int> >::iterator a = alternates.begin(); a != alternates.end(); ++a) {
Allele& alt = a->first;
if (!alt.isNull() && !alt.isReference())
alts.push_back(alt);
}
// if there are no alternate alleles in the best combo, use the genotype alleles
// XXX ...
if (alts.empty()) {
for (vector<Allele>::iterator a = genotypeAlleles.begin(); a != genotypeAlleles.end(); ++a) {
if (!a->isReference()) {
alts.push_back(*a);
}
}
}
}
//if (alts.empty()) alts = genotypeAlleles;
if (!alts.empty() && (1 - pHom.ToDouble()) >= parameters.PVL || parameters.PVL == 0) {
vcf::Variant var(parser->variantCallFile);
out << results.vcf(
var,
pHom,
bestComboOddsRatio,
samples,
referenceBase,
alts,
repeats,
genotypingTotalIterations,
parser->sampleList,
coverage,
bestCombo,
alleleGroups,
partialObservationGroups,
partialObservationSupport,
genotypesByPloidy,
parser->sequencingTechnologies,
parser)
<< endl;
} else if (!parameters.failedFile.empty()) {
// get the unique alternate alleles in this combo, sorted by frequency in the combo
long unsigned int position = parser->currentPosition;
for (vector<Allele>::iterator ga = genotypeAlleles.begin(); ga != genotypeAlleles.end(); ++ga) {
if (ga->type == ALLELE_REFERENCE)
continue;
parser->failedFile
<< parser->currentSequenceName << "\t"
<< position << "\t"
<< position + ga->length << "\t"
<< *ga << endl;
}
// BED format
}
DEBUG2("finished position");
}
DEBUG("total sites: " << total_sites << endl
<< "processed sites: " << processed_sites << endl
<< "ratio: " << (float) processed_sites / (float) total_sites);
delete parser;
return 0;
}