Beispiel #1
0
    bool operator()(const CRef<CSeq_align>& al_ref1,
                    const CRef<CSeq_align>& al_ref2) const
    {
		double scores[2] = {0.0, 0.0};
		al_ref1->GetNamedScore(CSeq_align::eScore_PercentIdentity_Ungapped, scores[0]);
		al_ref2->GetNamedScore(CSeq_align::eScore_PercentIdentity_Ungapped, scores[1]);
        if(scores[0] == scores[1]) {
        	return al_ref1->GetAlignLength() > al_ref2->GetAlignLength();
		}
		return scores[0] > scores[1];
    };
Beispiel #2
0
    bool operator()(const CRef<CSeq_align>& al_ref1,
                    const CRef<CSeq_align>& al_ref2) const
    {
        TSeqPos al1_len = al_ref1->GetAlignLength();
        TSeqPos al2_len = al_ref2->GetAlignLength();
        if (al1_len > al2_len) {
            return true;
        }
        if (al2_len > al1_len) {
            return false;
        }

        TSeqRange r1_0 = al_ref1->GetSeqRange(0);
        TSeqRange r2_0 = al_ref2->GetSeqRange(0);
        if (r1_0 < r2_0) {
            return true;
        }
        if (r2_0 < r1_0) {
            return false;
        }

        return al_ref1->GetSeqRange(1) < al_ref2->GetSeqRange(1);
    };