📄 hit_matrix_ds.hpp
字号:
/* * =========================================================================== * PRODUCTION $Log: hit_matrix_ds.hpp,v $ * PRODUCTION Revision 1000.2 2004/04/12 18:16:43 gouriano * PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.6 * PRODUCTION * =========================================================================== */#ifndef GUI_WIDGETS_HIT_MATRIX___HIT_MATRIX_DS__HPP#define GUI_WIDGETS_HIT_MATRIX___HIT_MATRIX_DS__HPP/* $Id: hit_matrix_ds.hpp,v 1000.2 2004/04/12 18:16:43 gouriano Exp $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government Work" under the * terms of the United States Copyright Act. It was written as part of * the author's official duties as a United States Government employee and * thus cannot be copyrighted. This software/database is freely available * to the public for use. The National Library of Medicine and the U.S. * Government have not placed any restriction on its use or reproduction. * * Although all reasonable efforts have been taken to ensure the accuracy * and reliability of the software and data, the NLM and the U.S. * Government do not and cannot warrant the performance or results that * may be obtained by using this software or data. The NLM and the U.S. * Government disclaim all warranties, express or implied, including * warranties of performance, merchantability or fitness for any particular * purpose. * * Please cite the author in any work or product based on this material. * * =========================================================================== * * Authors: Andrey Yazhuk * * File Description: * */#include <corelib/ncbistd.hpp>#include <objects/seq/Seq_annot.hpp>#include <objmgr/scope.hpp>#include <objects/seqloc/Seq_id.hpp>#include <objmgr/bioseq_handle.hpp>#include <objects/seqalign/Seq_align_set.hpp>#include <objects/seqalign/Dense_seg.hpp>#include <objects/seqloc/Seq_id.hpp>#include <objects/seqalign/Score.hpp>#include <serial/iterator.hpp>#include <gui/widgets/hit_matrix/hit_data_adapter.hpp>BEGIN_NCBI_SCOPEUSING_SCOPE(objects);/// CHitMatrixDataSource implements Adapter design pattern. It adapts given /// CSeq_annot ot CSeq_align_set object by providing standard interface /// representing data as plain list of pair-wise alignments.class NCBI_GUIWIDGETS_HIT_MATRIX_EXPORT CHitMatrixDataSource : public CObject{public: typedef CConstRef<CSeq_id> TIdRef; typedef vector<TIdRef> TIdRefCont; typedef deque<CHitDataAdapter> THitAdapterCont; CHitMatrixDataSource(const CSeq_align_set& aset, CScope& scope); CHitMatrixDataSource(const CSeq_annot& annot, CScope& scope); virtual ~CHitMatrixDataSource(); /// returns list of all seq ids in the Data Source const TIdRefCont& GetSeqIDs(); /// selects query and subject from the set of available sequences bool SelectIds(const TIdRef& q_id, const TIdRef& s_id); CScope& GetScope(); TIdRef GetQueryId() const; TIdRef GetSubjectId() const; CBioseq_Handle GetQueryHandle(); CBioseq_Handle GetSubjectHandle(); int GetScoresCount() const; const CObject_id& GetScoreId(size_t index) const; const THitAdapterCont& GetHits() const; TSeqRange GetQueryHitsRange(); TSeqRange GetSubjectHitsRange();protected: void x_Init(CTypeConstIterator<CSeq_align>& it);protected: typedef vector<const CObject_id*> TObjectIdVector; CConstRef<CSeq_annot> m_Annot; CConstRef<CSeq_align_set> m_Set; CRef<CScope> m_Scope; TIdRefCont m_SeqIds; /// list of Ids for all sequences TObjectIdVector m_ScoreIds; TIdRef m_QueryID; TIdRef m_SubjectID; THitAdapterCont m_HitAdapters; TSeqRange m_QueryHitsRange; TSeqRange m_SubjectHitsRange;};END_NCBI_SCOPE/* * =========================================================================== * $Log: hit_matrix_ds.hpp,v $ * Revision 1000.2 2004/04/12 18:16:43 gouriano * PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.6 * * Revision 1.6 2004/02/12 21:02:06 yazhuk * Added data members for storing hit ranges and functions for accessing them * * Revision 1.5 2003/12/05 17:36:58 yazhuk * Added construction from CSeq_Annot, changed API to use const refs instead of CRefs * * Revision 1.4 2003/12/01 17:01:52 yazhuk * Seriously redesigned CHitMatrixDataSource * * Revision 1.3 2003/11/18 17:56:06 yazhuk * Fixed GCC warnings * * Revision 1.2 2003/11/18 00:06:42 yazhuk * GCC compilation fixes * * Revision 1.1 2003/11/17 21:00:13 yazhuk * Initial revision * * =========================================================================== */#endif // GUI_WIDGETS_HIT_MATRIX___HIT_MATRIX_DS__HPP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -