本文整理汇总了C++中Allele::getBase方法的典型用法代码示例。如果您正苦于以下问题:C++ Allele::getBase方法的具体用法?C++ Allele::getBase怎么用?C++ Allele::getBase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Allele
的用法示例。
在下文中一共展示了Allele::getBase方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
std::vector<Location> Caller::callPoissonDist( double poissonLambda, int minQScore)
{
std::vector<Location> newCandidateLocations;
std::unordered_map<std::string, Location>::iterator iter;
std::string altBase;
for( iter = locationTable.begin(); iter != locationTable.end(); ++iter)
{
Location newLocation = iter->second;
// Clear the Sample list of the copy of the location
newLocation.clearSamples();
bool keepLocation = false;
std::vector<Sample> sampleList = ( iter->second).getSamples();
for( int i = 0; i < sampleList.size(); i++)
{
ReadcountEntry readcountEntry = sampleList[i].getReadcountEntry();
Allele mostFreqVariantAllele = readcountEntry.getMostFreqVariantAllele();
int mostFreqNonRefCount = mostFreqVariantAllele.getCount();
double lambda = readcountEntry.getReadDepth() * poissonLambda;
// call illuminaPoissonFilter
double pValue = Filter::illuminaPoissonFilter( mostFreqNonRefCount, lambda);
double qScore = -10 * std::log10( pValue);
// if at least one Sample passes through the filter, keep the location
if( qScore > minQScore)
{
//mostFreqVariantAllele.setPValue( pValue);
//mostFreqVariantAllele.setQScore( qScore);
// Add only the called Samples to the emptied list
newLocation.addSample( sampleList[i]);
keepLocation = true;
}
}
std::vector<Sample> newSamples = newLocation.getSamples();
double highestVAP = -1;
for( int i = 0; i < newSamples.size(); i++)
{
ReadcountEntry readcountEntry = newSamples[i].getReadcountEntry();
Allele variantAllele = readcountEntry.getMostFreqVariantAllele();
if( variantAllele.getPercentage() > highestVAP)
{
highestVAP = variantAllele.getPercentage();
altBase = variantAllele.getBase();
}
}
( iter->second).setMutatedBase( altBase);
if( keepLocation)
{
newCandidateLocations.push_back( newLocation);
}
}
return newCandidateLocations;
}