当前位置: 首页>>代码示例>>C++>>正文


C++ CSeq_feat::IsSetProduct方法代码示例

本文整理汇总了C++中CSeq_feat::IsSetProduct方法的典型用法代码示例。如果您正苦于以下问题:C++ CSeq_feat::IsSetProduct方法的具体用法?C++ CSeq_feat::IsSetProduct怎么用?C++ CSeq_feat::IsSetProduct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CSeq_feat的用法示例。


在下文中一共展示了CSeq_feat::IsSetProduct方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: switch


//.........这里部分代码省略.........
                            && (i != loc1_exons - 1 || rev)) {
                            if (loc1_iter.GetRange().GetTo()
                                != loc2_iter.GetRange().GetTo()) {
                                agreement_internal = false;
                                break;
                            }
                        }

                    }

                    if (!agreement_internal) {
                        loc_state |= eLocation_Complex;
                    } else if (agreement_5prime && !agreement_3prime) {
                        loc_state |= eLocation_3PrimeExtension;
                    } else if (agreement_3prime && !agreement_5prime) {
                        loc_state |= eLocation_5PrimeExtension;
                    } else {
                        // both 3' and 5' disagreement
                        loc_state |= eLocation_Complex;
                    }
                } else {
                    loc1_iter.Rewind();
                    loc2_iter.Rewind();
                    while (loc1_iter && loc2_iter) {
                        if (loc1_iter.GetRange() == loc2_iter.GetRange()) {
                            ++loc1_iter;
                            ++loc2_iter;
                        } else {
                            if (loc1_exons > loc2_exons) {
                                ++loc1_iter;
                            } else {
                                ++loc2_iter;
                            }
                        }
                    }
                    if ((loc1_exons > loc2_exons && !loc2_iter) ||
                        (loc2_exons > loc1_exons && !loc1_iter)) {
                        loc_state |= eLocation_MissingExon;
                    } else {
                        loc_state |= eLocation_Complex;
                    }
                }
            }}
            break;

        default:
        case sequence::eNoOverlap:
            loc_state |= eLocation_Missing;
            break;
        }
    }

    ///
    /// now, do a very simple sequence comparison
    ///
    CSeqVector v1(loc1, scope1);
    CSeqVector v2(loc2, scope2);
    CSeqVector_CI v1_iter = v1.begin();
    CSeqVector_CI v2_iter = v2.begin();
    TCompareFlags seq_state = 0;
    for (size_t count = 0;
         v1_iter != v1.end()  &&  v2_iter != v2.end();
         ++v1_iter, ++v2_iter, ++count) {
        if (*v1_iter != *v2_iter) {
            seq_state |= eSequence_DifferentSeq;
            break;
        }
    }
    if (v1_iter != v1.end()  ||  v2_iter != v2.end()) {
        seq_state |= eSequence_DifferentSeq;
    }
    if (seq_state) {
        loc_state |= seq_state;
    } else {
        loc_state |= eSequence_SameSeq;
    }

    ///
    /// also compare products
    ///
    if (feat1.IsSetProduct()  &&  feat2.IsSetProduct()) {
        CSeqVector v1(feat1.GetProduct(), scope1);
        CSeqVector v2(feat2.GetProduct(), scope2);
        CSeqVector_CI v1_iter = v1.begin();
        CSeqVector_CI v2_iter = v2.begin();
        for ( ;  v1_iter != v1.end()  &&  v2_iter != v2.end();  ++v1_iter, ++v2_iter) {
            if (*v1_iter != *v2_iter) {
                loc_state |= eSequence_DifferentProduct;
                break;
            }
        }
        if ((loc_state & eSequence_DifferentProduct) == 0) {
            loc_state |= eSequence_SameProduct;
        }
    } else if (feat1.IsSetProduct() != feat2.IsSetProduct()) {
        loc_state |= eSequence_DifferentProduct;
    }

    return loc_state;
}
开发者ID:jackgopack4,项目名称:pico-blast,代码行数:101,代码来源:annot_compare.cpp


注:本文中的CSeq_feat::IsSetProduct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。