本文整理汇总了C++中SamFileHeader::getNextRGRecord方法的典型用法代码示例。如果您正苦于以下问题:C++ SamFileHeader::getNextRGRecord方法的具体用法?C++ SamFileHeader::getNextRGRecord怎么用?C++ SamFileHeader::getNextRGRecord使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SamFileHeader
的用法示例。
在下文中一共展示了SamFileHeader::getNextRGRecord方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: buildReadGroupLibraryMap
// build the read group library map
void Dedup_LowMem::buildReadGroupLibraryMap(SamFileHeader& header) {
rgidLibMap.clear();
numLibraries = 0;
std::map<std::string,uint32_t> libNameMap;
SamHeaderRecord * headerRecord = header.getNextRGRecord();
while(headerRecord != NULL) {
std::string ID = headerRecord->getTagValue("ID");
std::string LB = headerRecord->getTagValue("LB");
if ( ID.empty() ) {
std::string headerRecordString;
headerRecord->appendString(headerRecordString);
Logger::gLogger->error("Cannot find readGroup ID information in the header line %s",
headerRecordString.c_str());
}
if ( rgidLibMap.find(ID) != rgidLibMap.end() ) {
Logger::gLogger->error("The readGroup ID %s is not a unique identifier",ID.c_str());
}
if ( LB.empty() ) {
std::string headerRecordString;
headerRecord->appendString(headerRecordString);
Logger::gLogger->warning("Cannot find library information in the header line %s. Using empty string for library name",
headerRecordString.c_str());
}
if ( libNameMap.find( LB ) != libNameMap.end() ) {
rgidLibMap[ID] = libNameMap[LB];
}
else {
numLibraries = libNameMap.size()+1;
libNameMap[LB] = numLibraries;
rgidLibMap[ID] = numLibraries;
}
headerRecord = header.getNextRGRecord();
}
if (numLibraries > 0xff) {
Logger::gLogger->error("More than 255 library names are identified. Dedup_LowMem currently only allows up to 255 library names");
}
}