include/objmgr/impl/seq_align_mapper.hpp

Go to the documentation of this file.
00001 #ifndef SEQ_ALIGN_MAPPER__HPP
00002 #define SEQ_ALIGN_MAPPER__HPP
00003 
00004 /*  $Id: seq_align_mapper.hpp 175292 2009-11-05 15:50:05Z grichenk $
00005 * ===========================================================================
00006 *
00007 *                            PUBLIC DOMAIN NOTICE
00008 *               National Center for Biotechnology Information
00009 *
00010 *  This software/database is a "United States Government Work" under the
00011 *  terms of the United States Copyright Act.  It was written as part of
00012 *  the author's official duties as a United States Government employee and
00013 *  thus cannot be copyrighted.  This software/database is freely available
00014 *  to the public for use. The National Library of Medicine and the U.S.
00015 *  Government have not placed any restriction on its use or reproduction.
00016 *
00017 *  Although all reasonable efforts have been taken to ensure the accuracy
00018 *  and reliability of the software and data, the NLM and the U.S.
00019 *  Government do not and cannot warrant the performance or results that
00020 *  may be obtained by using this software or data. The NLM and the U.S.
00021 *  Government disclaim all warranties, express or implied, including
00022 *  warranties of performance, merchantability or fitness for any particular
00023 *  purpose.
00024 *
00025 *  Please cite the author in any work or product based on this material.
00026 *
00027 * ===========================================================================
00028 *
00029 * Author: Aleksey Grichenko
00030 *
00031 * File Description:
00032 *   Alignment mapper
00033 *
00034 */
00035 
00036 #include <objects/seq/seq_id_handle.hpp>
00037 #include <objmgr/impl/seq_loc_cvt.hpp>
00038 #include <objects/seqloc/Na_strand.hpp>
00039 #include <objects/seqalign/Seq_align.hpp>
00040 #include <objects/seqalign/Score.hpp>
00041 #include <objects/seq/seq_align_mapper_base.hpp>
00042 #include <objmgr/scope.hpp>
00043 
00044 BEGIN_NCBI_SCOPE
00045 BEGIN_SCOPE(objects)
00046 
00047 
00048 class  CSeq_align_Mapper : public CSeq_align_Mapper_Base
00049 {
00050 public:
00051     CSeq_align_Mapper(const CSeq_align&     align,
00052                       CSeq_loc_Mapper_Base& loc_mapper);
00053 
00054     ~CSeq_align_Mapper(void);
00055 
00056 protected:
00057     virtual CSeq_align_Mapper_Base* CreateSubAlign(const CSeq_align& align);
00058     virtual CSeq_align_Mapper_Base* CreateSubAlign(const CSpliced_seg& spliced,
00059                                                    const CSpliced_exon& exon);
00060 
00061 private:
00062     typedef CSeq_loc_Conversion_Set::TRange       TRange;
00063     typedef CSeq_loc_Conversion_Set::TRangeMap    TRangeMap;
00064     typedef CSeq_loc_Conversion_Set::TIdMap       TIdMap;
00065     typedef CSeq_loc_Conversion_Set::TConvByIndex TConvByIndex;
00066 
00067     friend class CSeq_loc_Conversion_Set;
00068 
00069     // Used only to create sub-aligns
00070     CSeq_align_Mapper(CSeq_loc_Mapper_Base& loc_mapper);
00071 
00072     void Convert(CSeq_loc_Conversion_Set& cvts);
00073 
00074     // Mapping through CSeq_loc_Conversion
00075     void x_ConvertAlignCvt(CSeq_loc_Conversion_Set& cvts);
00076     void x_ConvertRowCvt(CSeq_loc_Conversion& cvt,
00077                          size_t row);
00078     void x_ConvertRowCvt(TIdMap& cvts,
00079                          size_t row);
00080     CSeq_id_Handle x_ConvertSegmentCvt(TSegments::iterator& seg_it,
00081                                        CSeq_loc_Conversion& cvt,
00082                                        size_t row);
00083     CSeq_id_Handle x_ConvertSegmentCvt(TSegments::iterator& seg_it,
00084                                        TIdMap& id_map,
00085                                        size_t row);
00086 };
00087 
00088 
00089 END_SCOPE(objects)
00090 END_NCBI_SCOPE
00091 
00092 #endif  // SEQ_ALIGN_MAPPER__HPP
00093 
00094 

Generated on Sun Dec 6 22:12:31 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:20:46 2009 by modify_doxy.py rev. 173732