本文整理汇总了C++中CSeq_feat::IsSetPseudo方法的典型用法代码示例。如果您正苦于以下问题:C++ CSeq_feat::IsSetPseudo方法的具体用法?C++ CSeq_feat::IsSetPseudo怎么用?C++ CSeq_feat::IsSetPseudo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSeq_feat
的用法示例。
在下文中一共展示了CSeq_feat::IsSetPseudo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: xMapRna
// ----------------------------------------------------------------------------
bool CSoMap::xMapRna(
const CSeq_feat& feature,
string& so_type)
// ----------------------------------------------------------------------------
{
static const map<CSeqFeatData::ESubtype, string> mapSubtypeStraight = {
{CSeqFeatData::eSubtype_misc_RNA, "transcript"},
{CSeqFeatData::eSubtype_rRNA, "rRNA"},
{CSeqFeatData::eSubtype_tRNA, "tRNA"},
};
static const map<CSeqFeatData::ESubtype, string> mapSubtypePseudo = {
{CSeqFeatData::eSubtype_misc_RNA, "pseudogenic_transcript"},
{CSeqFeatData::eSubtype_rRNA, "pseudogenic_rRNA"},
{CSeqFeatData::eSubtype_tRNA, "pseudogenic_tRNA"},
};
auto subtype = feature.GetData().GetSubtype();
if (feature.IsSetPseudo() && feature.GetPseudo()) {
auto cit = mapSubtypePseudo.find(subtype);
if (cit == mapSubtypePseudo.end()) {
return false;
}
so_type = cit->second;
return true;
}
if (feature.IsSetPseudo() && !feature.GetPseudo()) {
auto cit = mapSubtypeStraight.find(subtype);
if (cit == mapSubtypeStraight.end()) {
return false;
}
so_type = cit->second;
return true;
}
for (auto qual: feature.GetQual()) {
if (qual->GetQual() == "pseudo" || qual->GetQual() == "pseudogene") {
auto cit = mapSubtypePseudo.find(subtype);
if (cit == mapSubtypePseudo.end()) {
return false;
}
so_type = cit->second;
return true;
}
}
auto cit = mapSubtypeStraight.find(subtype);
if (cit == mapSubtypeStraight.end()) {
return false;
}
so_type = cit->second;
return true;
}
示例2: xMapGene
// ----------------------------------------------------------------------------
bool CSoMap::xMapGene(
const CSeq_feat& feature,
string& so_type)
// ----------------------------------------------------------------------------
{
if (feature.IsSetPseudo() && feature.GetPseudo()) {
so_type = "pseudogene";
return true;
}
for (auto qual: feature.GetQual()) {
if (qual->GetQual() == "pseudo" || qual->GetQual() == "pseudogene") {
so_type = "pseudogene";
return true;
}
}
so_type = "gene";
return true;
}