Exemple #1
0
bool CPacked_seqpnt::IsPartialStop(ESeqLocExtremes ext) const
{
    CInt_fuzz::TLim lim = (ext == eExtreme_Biological  &&  x_IsMinusStrand()) ?
        CInt_fuzz::eLim_lt : CInt_fuzz::eLim_gt;

    return IsSetFuzz()  &&  GetFuzz().IsLim()  &&  GetFuzz().GetLim() == lim;
}
Exemple #2
0
bool CPacked_seqpnt::IsTruncatedStart(ESeqLocExtremes ext) const
{
    CInt_fuzz::TLim lim = (ext == eExtreme_Biological  &&  x_IsMinusStrand()) ?
        CInt_fuzz::eLim_tr : CInt_fuzz::eLim_tl;

    return IsSetFuzz()  &&  GetFuzz().IsLim()  &&  GetFuzz().GetLim() == lim;
}
Exemple #3
0
TSeqPos CPacked_seqpnt::GetStop(ESeqLocExtremes ext) const
{
    if (!GetPoints().empty()) {
        return (ext == eExtreme_Positional  &&  x_IsMinusStrand()) ?
            GetPoints().front() : GetPoints().back();
    }
    return kInvalidSeqPos;
}
Exemple #4
0
void CSeq_interval::SetTruncatedStop(bool val, ESeqLocExtremes ext)
{
    if (val != IsTruncatedStop(ext)) {
        if (val) {
            if (ext == eExtreme_Biological  &&  x_IsMinusStrand()) {
                SetFuzz_from().SetLim(CInt_fuzz::eLim_tl);
            } else {
                SetFuzz_to().SetLim(CInt_fuzz::eLim_tr);
            }
        } else {
            if (ext == eExtreme_Biological  &&  x_IsMinusStrand()) {
                ResetFuzz_from();
            } else {
                ResetFuzz_to();
            }
        }
    }
    _ASSERT(val == IsTruncatedStop(ext));
}
Exemple #5
0
// set / remove e_Lim fuzz on left (5') or right (3') end
void CSeq_interval::SetPartialStart(bool val, ESeqLocExtremes ext)
{
    if (val != IsPartialStart(ext)) {
        if (val) {
            if (ext == eExtreme_Biological  &&  x_IsMinusStrand()) {
                SetFuzz_to().SetLim(CInt_fuzz::eLim_gt);
            } else {
                SetFuzz_from().SetLim(CInt_fuzz::eLim_lt);
            }
        } else {
            if (ext == eExtreme_Biological  &&  x_IsMinusStrand()) {
                ResetFuzz_to();
            } else {
                ResetFuzz_from();
            }
        }
    }
    _ASSERT(val == IsPartialStart(ext));
}
Exemple #6
0
// set / remove e_Lim fuzz on start or stop end
void CPacked_seqpnt::SetPartialStart(bool val, ESeqLocExtremes ext)
{
    if (val == IsPartialStart(ext)) {
        return;
    }

    if (val) {
        CInt_fuzz::TLim lim = 
            (ext == eExtreme_Biological  &&  x_IsMinusStrand()) ?
                CInt_fuzz::eLim_gt : CInt_fuzz::eLim_lt;

        SetFuzz().SetLim(lim);
    } else {
        ResetFuzz();
    }
}
Exemple #7
0
void CPacked_seqpnt::SetTruncatedStop(bool val, ESeqLocExtremes ext)
{
    if (val == IsTruncatedStop(ext)) {
        return;
    }

    if (val) {
        CInt_fuzz::TLim lim = 
            (ext == eExtreme_Biological  &&  x_IsMinusStrand()) ?
                CInt_fuzz::eLim_tl : CInt_fuzz::eLim_tr;

        SetFuzz().SetLim(lim);
    } else {
        ResetFuzz();
    }
}
Exemple #8
0
bool CSeq_interval::IsPartialStop(ESeqLocExtremes ext) const
{
    if (ext == eExtreme_Biological  &&  x_IsMinusStrand()) {
        if (IsSetFuzz_from()) {
            const CInt_fuzz& ifp = GetFuzz_from();
            if (ifp.IsLim()  &&  ifp.GetLim() == CInt_fuzz::eLim_lt) {
                return true;
            }
        }
    } else {
        if (IsSetFuzz_to()) {
            const CInt_fuzz& ifp = GetFuzz_to();
            if (ifp.IsLim()  &&  ifp.GetLim() == CInt_fuzz::eLim_gt) {
                return true;
            }
        }
    }
    return false;
}
Exemple #9
0
TSeqPos CSeq_interval::GetStop (ESeqLocExtremes ext) const
{
    return ext == eExtreme_Biological  &&  x_IsMinusStrand()?
        GetFrom(): GetTo();
}