NCBI C++ ToolKit
|
#include <ncbi_pch.hpp>
#include <objects/general/general__.hpp>
#include <objects/seqloc/seqloc__.hpp>
#include <objects/seq/seq__.hpp>
#include <algo/align/prosplign/compartments.hpp>
#include <algo/align/prosplign/prosplign_exception.hpp>
#include <algo/align/util/hit_comparator.hpp>
#include <algo/align/util/compartment_finder.hpp>
Go to the source code of this file.
Go to the SVN repository for this file.
Definition at line 49 of file compartments.cpp.
References _ASSERT, ITERATE, len, and max().
Referenced by CreateCompartmentAccessor(), and MakeCompartment().
unique_ptr<CCompartmentAccessor<THit> > CreateCompartmentAccessor | ( | const THitRefs & | orig_hitrefs, |
CCompartOptions | compart_options, | ||
const vector< pair< THit::TCoord, THit::TCoord > > * | gaps = NULL |
||
) |
Selects compartments.
Hits should be for a single query-subject pair. Pass precalculated non-bridgeable gaps to prohibit compartment to go over it
Definition at line 237 of file compartments.cpp.
References CountQueryCoverage(), CCompartOptions::eAminoAcid, CCompartOptions::eCoverage, CCompartOptions::eGuess, CCompartOptions::eScore, CCompartmentAccessor< THit >::GetFirst(), CCompartmentAccessor< THit >::GetNext(), CAlignShadow::GetQuerySpan(), CAlignShadow::GetSubjSpan(), ITERATE, len, CCompartOptions::m_CompartmentPenalty, CCompartOptions::m_Maximizing, CCompartOptions::m_MaxIntron, CCompartOptions::m_MaxOverlap, CCompartOptions::m_MinCompartmentIdty, CCompartOptions::m_MinSingleCompartmentIdty, CCompartOptions::m_SubjectMol, max(), NCBI_THROW, NULL, RemoveOverlaps(), RestoreOriginalHits(), CCompartmentAccessor< THit >::Run(), CCompartmentAccessor< THit >::SetMaxIntron(), and CCompartmentAccessor< THit >::SetMaxOverlap().
Referenced by DoCompartments(), and SelectCompartmentsHits().
TCompartments FormatAsAsn | ( | CCompartmentAccessor< THit > * | comps_ptr, |
CCompartOptions | compart_options, | ||
const vector< pair< THit::TCoord, THit::TCoord > > * | gaps | ||
) |
Definition at line 313 of file compartments.cpp.
References _ASSERT, eExtreme_Positional, CCompartmentAccessor< THit >::GetBox(), CCompartmentAccessor< THit >::GetFirst(), CSeq_loc::GetId(), CCompartmentAccessor< THit >::GetNext(), CSeq_loc::GetStop(), CSeq_loc::GetStrand(), i, CCompartOptions::m_MaxExtent, MakeCompartment(), CSeq_id::Match(), CRef< C, Locker >::NotEmpty(), NULL, results, CSeq_annot_Base::SetDesc(), and CSeq_loc::SetInt().
Referenced by DoCompartments(), and SelectCompartmentsHits().
Definition at line 139 of file compartments.cpp.
References result, and rapidjson::value.
Referenced by MakeCompartment().
CRef<CSeq_annot> MakeCompartment | ( | THitRefs & | hitrefs | ) |
Definition at line 155 of file compartments.cpp.
References _ASSERT, CUser_object::AddField(), CSeq_id::Assign(), CountQueryCoverage(), CAlign_def_Base::eAlign_type_ref, eNa_strand_minus, eNa_strand_plus, CSeq_align_Base::eType_partial, IntScore(), ITERATE, max(), min(), RealScore(), result, CAnnotdesc_Base::SetAlign(), CAlign_def_Base::SetAlign_type(), CAlign_def_Base::SetIds(), CAnnotdesc_Base::SetRegion(), CSeq_align_Base::SetSegs(), CUser_object_Base::SetType(), CSeq_align_Base::SetType(), TotalRawScore(), and TotalScore().
Referenced by FormatAsAsn().
TCompartmentStructs MakeCompartments | ( | const CSplign::THitRefs & | hitrefs, |
CCompartOptions | compart_options | ||
) |
Composition of all three functions.
Definition at line 427 of file compartments.cpp.
References MakeCompartments(), and SelectCompartmentsHits().
TCompartmentStructs MakeCompartments | ( | const TCompartments & | compartments, |
CCompartOptions | compart_options | ||
) |
Definition at line 392 of file compartments.cpp.
References eExtreme_Positional, eNa_strand_minus, CAnnot_descr_Base::Get(), CUser_field_Base::GetData(), CSeq_annot_Base::GetDesc(), CUser_object::GetField(), CUser_field_Base::C_Data::GetInt(), CUser_field_Base::C_Data::GetReal(), CAnnotdesc_Base::GetRegion(), CSeq_loc::GetStart(), CSeq_loc::GetStop(), CObject_id_Base::GetStr(), CSeq_loc::GetStrand(), CUser_object_Base::GetType(), CAnnotdesc_Base::GetUser(), i, int, CAnnotdesc_Base::IsRegion(), CObject_id_Base::IsStr(), CAnnotdesc_Base::IsUser(), ITERATE, NULL, results, and ct::sort().
Referenced by DoCompartments(), and MakeCompartments().
Definition at line 147 of file compartments.cpp.
References result, and rapidjson::value.
Referenced by MakeCompartment().
void RemoveOverlaps | ( | THitRefs & | hitrefs | ) |
Definition at line 111 of file compartments.cpp.
References copy(), remove_if(), and CHitFilter< THit >::s_RunGreedy().
Referenced by CreateCompartmentAccessor().
void RestoreOriginalHits | ( | THitRefs & | hitrefs, |
const THitRefs & | orig_hitrefs, | ||
bool | is_protein_subject | ||
) |
Definition at line 75 of file compartments.cpp.
References ITERATE, and NON_CONST_ITERATE.
Referenced by CreateCompartmentAccessor().
TCompartments SelectCompartmentsHits | ( | const THitRefs & | orig_hitrefs, |
CCompartOptions | compart_options, | ||
const vector< pair< THit::TCoord, THit::TCoord > > * | gaps | ||
) |
Composition of first two functions.
Definition at line 303 of file compartments.cpp.
References CreateCompartmentAccessor(), FormatAsAsn(), and results.
Referenced by CAdvancedAlignCleanup::GetProsplignCompartments(), MakeCompartments(), and CProSplignJob::x_GenerateCompartments().
Definition at line 130 of file compartments.cpp.
References i, ITERATE, and result.
Referenced by MakeCompartment().
double TotalScore | ( | THitRefs & | hitrefs | ) |
Definition at line 121 of file compartments.cpp.
References i, ITERATE, and result.
Referenced by MakeCompartment().
USING_SCOPE | ( | ncbi::objects | ) |