本文整理汇总了C++中Scan::getScanNumber方法的典型用法代码示例。如果您正苦于以下问题:C++ Scan::getScanNumber方法的具体用法?C++ Scan::getScanNumber怎么用?C++ Scan::getScanNumber使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Scan
的用法示例。
在下文中一共展示了Scan::getScanNumber方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: findBestFragmentScan
int ScanUtils::findBestFragmentScan(RawDataFile dataFile, boost::numeric::interval<double> rtRange, boost::numeric::interval<double> mzRange) {
int bestFragmentScan = -1;
double topBasePeak = 0;
std::vector<int> fragmentScanNumbers = dataFile.getScanNumbers(2, rtRange);
for (int number : fragmentScanNumbers) {
Scan scan = dataFile.getScan(number);
double lb = mzRange.lower, up = mzRange.upper, ppp = scan.getPrecursorMz;
if (lb < ppp && up > ppp)
{
//if (mzRange.lower() < scan.getPrecursorMz() && mzRange.upper() > scan.getPrecursorMz) {
DataPoint basePeak = scan.getHighestDataPoint();
// If there is no peak in the scan, basePeak can be null
if (DataPoint* v = dynamic_cast<DataPoint*>(&basePeak))
continue;
if (basePeak.getIntensity() > topBasePeak) {
bestFragmentScan = scan.getScanNumber();
topBasePeak = basePeak.getIntensity();
}
}
}
return bestFragmentScan;
}