本文整理汇总了C++中CSeq_feat::CanGetData方法的典型用法代码示例。如果您正苦于以下问题:C++ CSeq_feat::CanGetData方法的具体用法?C++ CSeq_feat::CanGetData怎么用?C++ CSeq_feat::CanGetData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSeq_feat
的用法示例。
在下文中一共展示了CSeq_feat::CanGetData方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AssignPhase
// ----------------------------------------------------------------------------
bool CGffRecord::AssignPhase(
const CSeq_feat& feature )
// ----------------------------------------------------------------------------
{
m_strPhase = ".";
if ( ! feature.CanGetData() ) {
return true;
}
const CSeq_feat::TData& data = feature.GetData();
if ( data.GetSubtype() != CSeq_feat::TData::eSubtype_cdregion ) {
return true;
}
const CCdregion& cdr = data.GetCdregion();
CCdregion::TFrame frame = cdr.GetFrame();
switch ( frame ) {
default:
break;
case CCdregion::eFrame_one:
m_strPhase = "0";
break;
case CCdregion::eFrame_two:
m_strPhase = "1";
break;
case CCdregion::eFrame_three:
m_strPhase = "2";
break;
}
return true;
}
示例2: AssignType
// ----------------------------------------------------------------------------
bool CGffRecord::AssignType(
const CSeq_feat& feature )
// ----------------------------------------------------------------------------
{
m_strType = "region";
if ( feature.CanGetQual() ) {
const vector< CRef< CGb_qual > >& quals = feature.GetQual();
vector< CRef< CGb_qual > >::const_iterator it = quals.begin();
while ( it != quals.end() ) {
if ( (*it)->CanGetQual() && (*it)->CanGetVal() ) {
if ( (*it)->GetQual() == "standard_name" ) {
m_strType = (*it)->GetVal();
return true;
}
}
++it;
}
}
if ( ! feature.CanGetData() ) {
return true;
}
switch ( feature.GetData().GetSubtype() ) {
default:
m_strType = feature.GetData().GetKey();
break;
case CSeq_feat::TData::eSubtype_gene:
m_strType = "gene";
break;
case CSeq_feat::TData::eSubtype_cdregion:
m_strType = "CDS";
break;
case CSeq_feat::TData::eSubtype_mRNA:
m_strType = "mRNA";
break;
case CSeq_feat::TData::eSubtype_scRNA:
m_strType = "scRNA";
break;
case CSeq_feat::TData::eSubtype_exon:
m_strType = "exon";
break;
}
return true;
}