本文整理汇总了C++中Genome::getRecombinantType方法的典型用法代码示例。如果您正苦于以下问题:C++ Genome::getRecombinantType方法的具体用法?C++ Genome::getRecombinantType怎么用?C++ Genome::getRecombinantType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Genome
的用法示例。
在下文中一共展示了Genome::getRecombinantType方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: displayResult
void FullRun::displayResult(void) {
unsigned long numRecombinant = 0;
unsigned long numLongRec = 0;
for (unsigned long i = 0; i < childDataset->getSize(); i++) {
Genome* child = childDataset->getGenome(i);
if (child->getRecombinantType() != Genome::Na_REC) {
numRecombinant++;
}
if (child->getRecombinantType() == Genome::LONG_REC) {
numLongRec++;
if (fileLongRecombinants != NULL) {
fileLongRecombinants->writeLine(child->getAccession());
}
}
}
Interface::instance()
<< "Number of triples tested : " << getNumTotalTriplets() << "\n"
<< "Number of p-values computed exactly : " << numComputedExactly << "\n"
<< "Number of p-values approximated (HS) : " << numApproximated << "\n"
<< "Number of p-values not computed : " << numSkipped << "\n"
<< endl
<< "Number of recombinant triplets : \t" << numRecombinantTriplets << "\n"
<< "Number of distinct recombinant sequences : \t" << numRecombinant << "\n";
if (cloStopAtFirstRecombinant) {
Interface::instance() << "[[ search stopped when first one found ]]\n" << endl;
}
if (!cloNoBpCalculated) {
Interface::instance()
<< "Number of distinct recombinant sequences at least "
<< cloMinLongRecombinantLength << "nt long : \t" << numLongRec << "\n"
<< "Longest of short recombinant segments : \t"
<< longestRecombinantSegment << "nt\n";
}
Interface::instance().showOutput(true);
Interface::instance() << Interface::SEPARATOR << endl;
Interface::instance().showLog(true);
char formatedPVal[20];
sprintf(formatedPVal,
"%1.3e",
static_cast<double> (stats::correction::dunnSidak(minPVal, getNumTripletsForCorrection()))
);
Interface::instance()
<< "Rejection of the null hypothesis of clonal evolution at p = "
<< stats::correction::dunnSidak(minPVal, getNumTripletsForCorrection()) << "\n"
<< " p = " << formatedPVal << "\n"
<< " Uncorrected p = " << minPVal << "\n"
<< " Bonferroni p = "
<< stats::correction::bonferroni(minPVal, getNumTripletsForCorrection()) << "\n";
Interface::instance().showOutput(true);
}
示例2: progress
//.........这里部分代码省略.........
Genome* mum = NULL;
Triplet* triplet = NULL;
for (unsigned long childIndex = 0; !isStoped && childIndex < childDataset->getSize(); childIndex++) {
child = childDataset->getGenome(childIndex);
if (child->isActive()) {
activeChildCounter++;
} else {
continue;
}
activeDadCounter = 0;
for (unsigned long dadIndex = 0; !isStoped && dadIndex < parentDataset->getSize(); dadIndex++) {
dad = parentDataset->getGenome(dadIndex);
if (dad->isActive()) {
activeDadCounter++;
}
if (!dad->isActive() || dad == child) {
continue;
}
/* Show progress counter */
double currentLoop = static_cast<double> (activeChildCounter - 1)
* static_cast<double> (activeParentNum)
+ static_cast<double> (activeDadCounter - 1);
showProgress(currentLoop, false);
for (unsigned long mumIndex = 0; !isStoped && mumIndex < parentDataset->getSize(); mumIndex++) {
mum = parentDataset->getGenome(mumIndex);
if (!mum->isActive() || mum == child || mum == dad) continue;
triplet = new Triplet(dad, mum, child);
/* Let's see if we can calculate the exact P-value */
bool hasPValue = triplet->calculatePVal(cloUseSiegmundApprox);
if (!hasPValue) {
if (fileSkippedTriplets) {
/* No need to open file, writeLine() will do that automatically */
fileSkippedTriplets->writeLine(triplet->toString());
}
delete triplet;
continue;
}
numSkipped -= 1.0;
if (triplet->isPValApproximated()) {
numApproximated += 1.0;
} else {
numComputedExactly += 1.0;
}
double pValue = triplet->getPVal();
addPValIntoHistogram(pValue);
if (pValue < minPVal)
minPVal = pValue;
/* Let's see if the P-value is significant */
if (stats::correction::dunnSidak(pValue, getNumTripletsForCorrection()) < cloRejectThreshold) {
numRecombinantTriplets += 1.0;
if (child->getRecombinantType() == Genome::Na_REC) {
child->setRecombinantType(Genome::SHORT_REC);
}
/* Go into this loop either if we're doing ALL breakpoint or
* NO breakpoint if we are doing no breakpoint, then the
* breakpoint calculations is skipped. */
if (cloAllBpCalculated || cloNoBpCalculated) {
recordRecombinantTriplet(triplet);
}
/* Now check if this is the *best* recombinant (meaning lowest p-value)
* and if it is, record it */
if (child->getBestRecombinantTriplet() == NULL
|| pValue < child->getBestRecombinantTriplet()->getPVal()) {
child->setBestRecombinantTriplet(triplet);
} else {
delete triplet;
}
if (cloStopAtFirstRecombinant) {
/* Finish progressing early */
isStoped = true;
}
} else {
delete triplet;
}
}
}
}
/* Progressing finished */
showProgress(0.0, true);
if (numRecombinantTriplets > 0) {
recombinationSensitivity++;
}
}
}