Search Toolkit Book for CAlignFilter
CAlignFilter exposes a query language for inspecting properties and scores placed on Seq-align objects. More...
#include <algo/align/util/align_filter.hpp>
CAlignFilter exposes a query language for inspecting properties and scores placed on Seq-align objects.
The query language supports a wide variety of parameters and language structures.
Basic syntax ------------
Current Accepted Tokens -----------------------
Example queries: ----------------
Definition at line 158 of file align_filter.hpp.
◆ TQuerySubjCompartments ◆ TRegionMap ◆ TRegionMapCache ◆ TSubjCompartmentsRange restriction infrastructure For some query/subject pairs, we will restrict the alignments to lie within a specified range.
Definition at line 293 of file align_filter.hpp.
◆ TUniqueAligns ◆ CAlignFilter() [1/2] ◆ CAlignFilter() [2/2] CAlignFilter::CAlignFilter ( const string & filter_string ) ◆ AddBlacklistQueryId() void CAlignFilter::AddBlacklistQueryId ( const objects::CSeq_id_Handle & idh )Add a sequence to a blacklist.
Blacklisted sequences are excluded always; if an alignment contains a query or subject that matches a blacklisted alignment, then that alignment will be excluded.
NOTE: this is only triggered if the alignments are pairwise!
Definition at line 215 of file align_filter.cpp.
References set< Key, Compare >::insert(), and m_QueryBlacklist.
◆ AddBlacklistSubjectId() void CAlignFilter::AddBlacklistSubjectId ( const objects::CSeq_id_Handle & idh ) ◆ AddExcludeNotInQueryId() void CAlignFilter::AddExcludeNotInQueryId ( const objects::CSeq_id_Handle & idh ) ◆ AddExcludeNotInSubjectId() void CAlignFilter::AddExcludeNotInSubjectId ( const objects::CSeq_id_Handle & idh ) ◆ AddQSRangeRestriction() void CAlignFilter::AddQSRangeRestriction ( const objects::CSeq_id_Handle & qid, const objects::CSeq_id_Handle & sid, TSeqRange subj_range ) ◆ AddWhitelistQueryId() void CAlignFilter::AddWhitelistQueryId ( const objects::CSeq_id_Handle & idh ) ◆ AddWhitelistSubjectId() void CAlignFilter::AddWhitelistSubjectId ( const objects::CSeq_id_Handle & idh ) ◆ DryRun() ◆ Filter() [1/3] void CAlignFilter::Filter ( const list< CRef< objects::CSeq_align > > & aligns_in, list< CRef< objects::CSeq_align > > & aligns_out ) ◆ Filter() [2/3] void CAlignFilter::Filter ( const objects::CSeq_align_set & aligns_in, objects::CSeq_align_set & aligns_out )Filter a set of alignments, iteratively applying Match() to each alignment and emitting all matched alignments in the output set.
◆ Filter() [3/3] void CAlignFilter::Filter ( const objects::CSeq_annot & aligns_in, objects::CSeq_annot & aligns_out )Filter a set of alignments, iteratively applying Match() to each alignment and emitting all matched alignments in the output seq-annot.
◆ Match() bool CAlignFilter::Match ( const objects::CSeq_align & align )Match a single alignment.
Definition at line 310 of file align_filter.cpp.
References CSeq_align::CheckNumRows(), eGetId_Canonical, map_checker< Container >::empty(), map_checker< Container >::end(), set< Key, Compare >::end(), map_checker< Container >::find(), set< Key, Compare >::find(), CSeq_id_Handle::GetHandle(), GetId(), CSeq_align::GetSeq_id(), CSeq_align::GetSeqRange(), COpenRange< Position >::IntersectingWith(), m_ParseTree, m_QSComparts, m_QueryBlacklist, m_QueryExcludeNotIn, m_QueryWhitelist, m_RemoveDuplicates, m_Scope, m_ScoreLookup, m_SubjectBlacklist, m_SubjectExcludeNotIn, m_SubjectWhitelist, match(), query, r(), set< Key, Compare >::size(), subject, x_IsUnique(), and x_Match().
Referenced by BOOST_AUTO_TEST_CASE(), CAlignSort::MergeSortedFiles(), s_GetCDSLoc(), and CAlignSort::SortAlignments().
◆ PrintDictionary() ◆ SetFilter() void CAlignFilter::SetFilter ( const string & filter_string )Set the query to be used.
Definition at line 159 of file align_filter.cpp.
References DryRun(), CQueryParseTree::eCaseInsensitive, CQueryParseTree::eSyntaxCheck, CObjectManager::GetInstance(), m_ParseTree, m_Query, m_Scope, NULL, CRef< C, Locker >::Reset(), and x_ParseTree_Flatten().
Referenced by CAlignFilter().
◆ SetRemoveDuplicates() ◆ SetScope() [1/2] objects::CScope& CAlignFilter::SetScope ( ) ◆ SetScope() [2/2] void CAlignFilter::SetScope ( objects::CScope & scope ) ◆ x_Complexity() ◆ x_FuncCall()Definition at line 517 of file align_filter.cpp.
References CSeqdesc_Base::e_Embl, CSeqdesc_Base::e_Genbank, CSeqdesc_Base::e_Pir, CSeqdesc_Base::e_Prf, CSeqdesc_Base::e_Sp, eGetId_Best, CRangeCollection< Position >::Empty(), NStr::EqualNocase(), CQueryParseNode::eString, eUnknown, map_checker< Container >::find(), CSeq_align::GetAlignedBases(), CSeq_id_Handle::GetHandle(), GetId(), CSeq_align_Base::GetSegs(), CSeq_align::GetSeq_id(), CTreeNode< TValue, TKeyGetterP >::GetValue(), CRangeCollection< Position >::IntersectWith(), CSeq_align_Base::C_Segs::IsDendiag(), CSeq_align_Base::C_Segs::IsDenseg(), CSeq_align_Base::C_Segs::IsDisc(), CSeq_align_Base::C_Segs::IsPacked(), CSeq_align_Base::C_Segs::IsSparse(), CSeq_align_Base::C_Segs::IsSpliced(), CSeq_align_Base::C_Segs::IsStd(), ITERATE, m_IsDryRun, m_Scope, NCBI_THROW, NULL, NStr::NumericToString(), round(), row, CTreeNode< TValue, TKeyGetterP >::SubNodeBegin(), CTreeNode< TValue, TKeyGetterP >::SubNodeEnd(), v2, x_GetRegionMap(), and x_TermValue().
Referenced by x_TermValue().
◆ x_GetAlignmentScore() double CAlignFilter::x_GetAlignmentScore ( const string & score_name, const objects::CSeq_align & align, bool throw_if_not_found =false
) private ◆ x_GetRegionMap()
Definition at line 881 of file align_filter.cpp.
References CFormatGuess::eBinaryASN, map_checker< Container >::empty(), eSerial_AsnBinary, eSerial_AsnText, CFormatGuess::eTextASN, eUnknown, format, CSeq_annot_Base::GetData(), CSeq_annot_Base::C_Data::GetFtable(), CSeq_id_Handle::GetHandle(), CFormatGuess::GuessFormat(), CSeq_annot::IsFtable(), m_RegionMapCache, NCBI_THROW, NStr::NumericToString(), and CObjectIStream::Open().
Referenced by x_FuncCall().
◆ x_IsUnique() bool CAlignFilter::x_IsUnique ( const objects::CSeq_align & align ) private ◆ x_Match()Definition at line 1238 of file align_filter.cpp.
References CQueryParseNode::eAnd, CQueryParseNode::eBetween, CQueryParseNode::eEQ, CQueryParseNode::eGE, CQueryParseNode::eGT, CQueryParseNode::eLE, CQueryParseNode::eLT, CQueryParseNode::eNot, CQueryParseNode::eOr, CQueryParseNode::eString, eUnknown, CTreeNode< TValue, TKeyGetterP >::GetValue(), m_IsDryRun, NCBI_THROW, CTreeNode< TValue, TKeyGetterP >::SubNodeBegin(), CTreeNode< TValue, TKeyGetterP >::SubNodeEnd(), x_Query_Op(), x_Query_Range(), and x_TermValue().
Referenced by DryRun(), and Match().
◆ x_ParseTree_Flatten()Definition at line 74 of file align_filter.cpp.
References CTreeNode< TValue, TKeyGetterP >::AddNode(), CTreeNode< TValue, TKeyGetterP >::DetachNode(), CQueryParseNode::eAnd, CScoreLookup::IScore::eEasy, CScoreLookup::IScore::eHard, CQueryParseNode::eOr, ITERATE, CTreeNode< TValue, TKeyGetterP >::RemoveNode(), CTreeNode< TValue, TKeyGetterP >::SubNodeBegin(), CTreeNode< TValue, TKeyGetterP >::SubNodeEnd(), and x_Complexity().
Referenced by SetFilter().
◆ x_Query_Op()Definition at line 966 of file align_filter.cpp.
References CSeq_id_Handle::AsString(), CSeqdesc_Base::e_User, CQueryParseNode::eEQ, CQueryParseNode::eGE, eGetId_Best, CQueryParseNode::eGT, CQueryParseNode::eLE, CQueryParseNode::eLT, eNa_strand_both, eNa_strand_minus, eNa_strand_plus, eNa_strand_unknown, NStr::EqualNocase(), ERR_POST, CQueryParseNode::eString, eUnknown, CUser_field_Base::GetData(), CUser_object::GetField(), CSeq_id_Handle::GetHandle(), GetId(), CSeq_align::GetSeq_id(), CSynonymsSet::GetSeq_id_Handle(), CSeq_id_Handle::GetSeqId(), CSeq_align::GetSeqStrand(), CObject_id_Base::GetStr(), CUser_field_Base::C_Data::GetStr(), CUser_object_Base::GetType(), CTreeNode< TValue, TKeyGetterP >::GetValue(), isnan, CSeq_id_Base::IsOther(), CObject_id_Base::IsStr(), ITERATE, m_IsDryRun, m_Scope, NCBI_ASSERT, NCBI_THROW, val, Warning(), and x_TermValue().
Referenced by x_Match().
◆ x_Query_Range() ◆ x_TermValue()Definition at line 931 of file align_filter.cpp.
References CQueryParseNode::eFloatConst, CQueryParseNode::eFunction, CQueryParseNode::eIntConst, CQueryParseNode::eString, eUnknown, CTreeNode< TValue, TKeyGetterP >::GetValue(), NCBI_THROW, s_IsDouble(), str(), NStr::StringToDouble(), val, x_FuncCall(), and x_GetAlignmentScore().
Referenced by x_FuncCall(), x_Match(), x_Query_Op(), and x_Query_Range().
◆ m_DryRunOutput ◆ m_IsDryRun bool CAlignFilter::m_IsDryRun private ◆ m_ParseTree ◆ m_QSComparts ◆ m_Query ◆ m_QueryBlacklist set<objects::CSeq_id_Handle> CAlignFilter::m_QueryBlacklist private ◆ m_QueryExcludeNotIn set<objects::CSeq_id_Handle> CAlignFilter::m_QueryExcludeNotIn private ◆ m_QueryWhitelist set<objects::CSeq_id_Handle> CAlignFilter::m_QueryWhitelist private ◆ m_RegionMapCache ◆ m_RemoveDuplicates bool CAlignFilter::m_RemoveDuplicates private ◆ m_Scope CRef<objects::CScope> CAlignFilter::m_Scope private ◆ m_ScoreLookup objects::CScoreLookup CAlignFilter::m_ScoreLookup private ◆ m_SubjectBlacklist set<objects::CSeq_id_Handle> CAlignFilter::m_SubjectBlacklist private ◆ m_SubjectExcludeNotIn set<objects::CSeq_id_Handle> CAlignFilter::m_SubjectExcludeNotIn private ◆ m_SubjectWhitelist set<objects::CSeq_id_Handle> CAlignFilter::m_SubjectWhitelist private ◆ m_UniqueAlignsThe documentation for this class was generated from the following files:
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4