本文整理汇总了C++中CConstRef::GetId方法的典型用法代码示例。如果您正苦于以下问题:C++ CConstRef::GetId方法的具体用法?C++ CConstRef::GetId怎么用?C++ CConstRef::GetId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CConstRef
的用法示例。
在下文中一共展示了CConstRef::GetId方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
CCmdLineBlastXML2ReportData::x_InitSubjects(CConstRef<IBlastSeqInfoSrc> subjectsInfo)
{
if(subjectsInfo->Size() == 0) {
NCBI_THROW(CException, eUnknown, "blastxml2: Empty seq info src");
}
for(unsigned int i =0; i < subjectsInfo->Size(); i++) {
list<CRef<objects::CSeq_id> > ids = subjectsInfo->GetId(i);
m_SubjectIds.push_back(CAlignFormatUtil::GetSeqIdString(ids, true));
}
}
示例2: xWriteAnnotSeqTable
// ----------------------------------------------------------------------------
bool CBedGraphWriter::xWriteAnnotSeqTable(
const CBedTrackRecord& trackdata,
const CSeq_annot& annot)
// ----------------------------------------------------------------------------
{
if (!annot.IsSeq_table()) {
return false;
}
CBedGraphRecord bedRecord;
const CSeq_table& table = annot.GetData().GetSeq_table();
int numRows = table.GetNum_rows();
for (int row=0; row < numRows; ++row) {
string chromId;
{{
const vector<CRef<CSeqTable_column> > columns = table.GetColumns();
for (size_t col = 0; col < columns.size(); ++col) {
const CSeqTable_column_info& header = columns[col]->GetHeader();
if (header.IsSetField_name()) {
string fieldName = header.GetField_name();
if (fieldName == "Seq-table location") {
CConstRef< CSeq_loc > pLoc = columns[col]->GetSeq_loc(row);
pLoc->GetId()->GetLabel(&chromId, CSeq_id::eContent);
break;
}
}
if (header.IsSetField_id()) {
int fieldId = header.GetField_id();
if (fieldId == CSeqTable_column_info::eField_id_location_id) {
CConstRef< CSeq_id > pId = columns[col]->GetSeq_id(row);
pId->GetLabel(&chromId, CSeq_id::eContent);
break;
}
}
}
}}
if (chromId.empty()) {
chromId = "unknown";
}
bedRecord.SetChromId(chromId);
int chromStart(0);
{{
const vector<CRef<CSeqTable_column> > columns = table.GetColumns();
for (size_t col = 0; col < columns.size(); ++col) {
const CSeqTable_column_info& header = columns[col]->GetHeader();
if (header.IsSetField_id()) {
int fieldId = header.GetField_id();
if (fieldId == CSeqTable_column_info::eField_id_location_from) {
if (columns[col]->TryGetInt(row, chromStart)) {
break;
}
}
}
}
}}
bedRecord.SetChromStart(chromStart);
int chromEnd(0);
{{
const vector<CRef<CSeqTable_column> > columns = table.GetColumns();
for (size_t col = 0; col < columns.size(); ++col) {
const CSeqTable_column_info& header = columns[col]->GetHeader();
if (header.IsSetField_name()) {
string fieldName = header.GetField_name();
if (fieldName == "span") {
if (columns[col]->TryGetInt(row, chromEnd)) {
chromEnd += chromStart;
break;
}
}
}
if (header.IsSetField_id()) {
int fieldId = header.GetField_id();
if (fieldId == CSeqTable_column_info::eField_id_location_to) {
if (columns[col]->TryGetInt(row, chromEnd)) {
break;
}
}
}
}
}}
bedRecord.SetChromEnd(chromEnd);
double chromValue(0);
{{
const vector<CRef<CSeqTable_column> > columns = table.GetColumns();
for (size_t col = 0; col < columns.size(); ++col) {
const CSeqTable_column_info& header = columns[col]->GetHeader();
if (header.IsSetField_name()) {
string fieldName = header.GetField_name();
if (fieldName == "values") {
if (columns[col]->TryGetReal(row, chromValue)) {
break;
}
int intValue(0);
if (columns[col]->TryGetInt(row, intValue)) {
chromValue = intValue;
break;
//.........这里部分代码省略.........