align_ds.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:5k
- /*
- * ===========================================================================
- * PRODUCTION $Log: align_ds.hpp,v $
- * PRODUCTION Revision 1000.1 2004/04/12 18:15:37 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.6
- * PRODUCTION
- * ===========================================================================
- */
- #ifndef GUI_WIDGETS___ALIGN_DS__HPP
- #define GUI_WIDGETS___ALIGN_DS__HPP
- /* $Id: align_ds.hpp,v 1000.1 2004/04/12 18:15:37 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: Mike DiCuccio
- *
- * File Description:
- *
- */
- #include <corelib/ncbiobj.hpp>
- #include <objtools/alnmgr/alnvec.hpp>
- #include <objmgr/bioseq_handle.hpp>
- BEGIN_NCBI_SCOPE
- BEGIN_SCOPE(objects)
- class CAlign_CI;
- class CAlnMix;
- class CDense_seg;
- class CSeq_annot;
- class CSeq_align;
- class CBioseq_Handle;
- END_SCOPE(objects)
- //
- // class CAlignDataSource defines the API required of a data source object
- // for CAlnVec-based alignment widgets.
- //
- // This is a bridge interface to the alignment manager and to Genome
- // Workbench's data storage mechanism.
- class NCBI_GUIWIDGETS_ALNCROSSALN_EXPORT CAlignDataSource : public CObject
- {
- public:
- CAlignDataSource();
- // create a data source around an existing alignment manager
- virtual void Init(objects::CAlnVec& vec);
- // create a new data source around an alignment iterator
- virtual void Init(objects::CAlign_CI& iter, objects::CScope& scope);
- // create a new data source around a seq-align
- virtual void Init(const objects::CSeq_align& align, objects::CScope& scope);
- // create a new data source around a seq-annot
- virtual void Init(const objects::CSeq_annot& annot, objects::CScope& scope);
- // create a new data source around a dense-seg
- virtual void Init(const objects::CDense_seg& seg, objects::CScope& scope);
- virtual void Init(const objects::CBioseq_Handle& handle, objects::CScope& scope);
- objects::CAlnVec& SetAlnMgr(void);
- const objects::CAlnVec& GetAlnMgr(void) const;
- // recreates m_AlnMgr adding a row representing consensus
- void CreateConsensus();
- // new interface
- typedef objects::CAlnVec::TNumrow TNumrow;
- protected:
- // the alignment manager is stored as an alignment vector
- CRef<objects::CAlnVec> m_AlnMgr;
- int m_ConsRowIndex;
- protected:
- void x_Init(objects::CAlnMix& mix);
- virtual void x_ClearHandles();
- virtual void x_CreateHandles();
- // returns index of the consensus row or -1 if it doesn't exist
- int x_GetConsensusRow() const;
- };
- END_NCBI_SCOPE
- /*
- * ===========================================================================
- * $Log: align_ds.hpp,v $
- * Revision 1000.1 2004/04/12 18:15:37 gouriano
- * PRODUCTION: UPGRADED [CATCHUP_003] Dev-tree R1.6
- *
- * Revision 1.6 2004/02/11 15:08:49 yazhuk
- * Replaced constructors with Init() functions; removed x_Init()
- *
- * Revision 1.5 2003/10/29 23:13:57 yazhuk
- * Moved IAlignRowHandle, CAlnVecRowHandle to widgets/aln)multiple. Moved implementation of interface for CAlnMultiWidget to CAlnVecMutliDataSource
- *
- * Revision 1.4 2003/10/20 15:44:03 yazhuk
- * Clean-up.
- *
- * Revision 1.3 2003/10/15 21:17:31 yazhuk
- * Add to CAlignDataSource functions for providing API to "generic" alignments.
- * Added IAlignRowHandle and CAlnVecRowHandle classes.
- *
- * Revision 1.2 2003/09/25 20:51:29 yazhuk
- * Added support for consensus row
- *
- * Revision 1.1 2003/09/23 20:15:06 dicuccio
- * Initial revision
- *
- * ===========================================================================
- */
- #endif // GUI_WIDGETS___ALIGN_DS__HPP