include/algo/align/ngalign/sequence_set.hpp

Go to the documentation of this file.
00001 #ifndef NGALIGN_SEQUENCE_SET__HPP
00002 #define NGALIGN_SEQUENCE_SET__HPP
00003 
00004 /*  $Id: sequence_set.hpp 172952 2009-10-13 15:35:55Z boukn $
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  * Authors:  Nathan Bouk
00030  *
00031  * File Description:
00032  *
00033  */
00034 
00035 #include <corelib/ncbistd.hpp>
00036 #include <corelib/ncbiobj.hpp>
00037 #include <objects/seqloc/Na_strand.hpp>
00038 
00039 #include <objects/seqloc/Seq_loc.hpp>
00040 #include <objects/seqloc/Seq_id.hpp>
00041 #include <objmgr/scope.hpp>
00042 #include <objects/seqalign/Seq_align.hpp>
00043 #include <objects/seqalign/Seq_align_set.hpp>
00044 #include <objects/seqalign/Dense_seg.hpp>
00045 
00046 #include <algo/winmask/seq_masker.hpp>
00047 
00048 #include <algo/blast/api/blast_types.hpp>
00049 #include <algo/blast/api/blast_options_handle.hpp>
00050 #include <algo/blast/api/sseqloc.hpp>
00051 #include <algo/blast/api/query_data.hpp>
00052 #include <algo/blast/api/uniform_search.hpp>
00053 #include <algo/blast/api/local_db_adapter.hpp>
00054 #include <algo/blast/api/objmgr_query_data.hpp>
00055 
00056 #include <algo/align/ngalign/ngalign_interface.hpp>
00057 
00058 
00059 BEGIN_NCBI_SCOPE
00060 
00061 BEGIN_SCOPE(objects)
00062     class CScope;
00063     class CSeq_align;
00064     class CSeq_align_set;
00065     class CSeq_id;
00066 END_SCOPE(objects)
00067 
00068 BEGIN_SCOPE(blast)
00069     class SSeqLoc;
00070     class IQueryFactory;
00071     class CLocalDbAdapter;
00072     class CSearchDatabase;
00073 END_SCOPE(blast)
00074 
00075 
00076 class CBlastDbSet : public ISequenceSet
00077 {
00078 public:
00079     CBlastDbSet(const string& BlastDb);
00080 
00081     enum {
00082         eNoSoftFiltering = -1
00083     };
00084 
00085     void SetSoftFiltering(int Filter) { m_Filter = Filter; }
00086 
00087     CRef<blast::IQueryFactory> CreateQueryFactory(
00088             objects::CScope& Scope,
00089             const blast::CBlastOptionsHandle& BlastOpts);
00090     CRef<blast::IQueryFactory> CreateQueryFactory(
00091             objects::CScope& Scope,
00092             const blast::CBlastOptionsHandle& BlastOpts,
00093             const CAlignResultsSet& Alignments, int Threshold);
00094     CRef<blast::CLocalDbAdapter> CreateLocalDbAdapter(
00095             objects::CScope& Scope,
00096             const blast::CBlastOptionsHandle& BlastOpts);
00097 
00098 protected:
00099     string m_BlastDb;
00100     int m_Filter;
00101 };
00102 
00103 
00104 class CSeqIdListSet : public ISequenceSet
00105 {
00106 public:
00107     CSeqIdListSet();
00108 
00109     list<CRef<objects::CSeq_id> >& SetIdList();
00110     void SetSeqMasker(CSeqMasker* SeqMasker);
00111 
00112     CRef<blast::IQueryFactory> CreateQueryFactory(
00113             objects::CScope& Scope, const blast::CBlastOptionsHandle& BlastOpts);
00114     CRef<blast::IQueryFactory> CreateQueryFactory(
00115             objects::CScope& Scope, const blast::CBlastOptionsHandle& BlastOpts,
00116             const CAlignResultsSet& Alignments, int Threshold);
00117     CRef<blast::CLocalDbAdapter> CreateLocalDbAdapter(
00118             objects::CScope& Scope, const blast::CBlastOptionsHandle& BlastOpts);
00119 
00120 protected:
00121     list<CRef<objects::CSeq_id> > m_SeqIdList;
00122     CSeqMasker* m_SeqMasker;
00123 };
00124 
00125 
00126 
00127 class CFastaFileSet : public ISequenceSet
00128 {
00129 public:
00130     CFastaFileSet(CNcbiIstream* FastaStream);
00131 
00132     void EnableLowerCaseMasking(bool LowerCaseMasking);
00133 
00134     CRef<blast::IQueryFactory> CreateQueryFactory(
00135             objects::CScope& Scope, const blast::CBlastOptionsHandle& BlastOpts);
00136     CRef<blast::IQueryFactory> CreateQueryFactory(
00137             objects::CScope& Scope,
00138             const blast::CBlastOptionsHandle& BlastOpts,
00139             const CAlignResultsSet& Alignments, int Threshold);
00140     CRef<blast::CLocalDbAdapter> CreateLocalDbAdapter(
00141             objects::CScope& Scope, const blast::CBlastOptionsHandle& BlastOpts);
00142 
00143 protected:
00144     CNcbiIstream* m_FastaStream;
00145     bool m_LowerCaseMasking;
00146 };
00147 
00148 
00149 
00150 
00151 
00152 END_NCBI_SCOPE
00153 
00154 #endif
00155 
00156 

Generated on Sun Dec 6 21:55:28 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:20:32 2009 by modify_doxy.py rev. 173732