NCBI C++ ToolKit
cav_alignset.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: cav_alignset.hpp 44773 2010-02-12 17:50:55Z thiessen $
2 * ===========================================================================
3 *
4 * PUBLIC DOMAIN NOTICE
5 * National Center for Biotechnology Information
6 *
7 * This software/database is a "United States Government Work" under the
8 * terms of the United States Copyright Act. It was written as part of
9 * the author's official duties as a United States Government employee and
10 * thus cannot be copyrighted. This software/database is freely available
11 * to the public for use. The National Library of Medicine and the U.S.
12 * Government have not placed any restriction on its use or reproduction.
13 *
14 * Although all reasonable efforts have been taken to ensure the accuracy
15 * and reliability of the software and data, the NLM and the U.S.
16 * Government do not and cannot warrant the performance or results that
17 * may be obtained by using this software or data. The NLM and the U.S.
18 * Government disclaim all warranties, express or implied, including
19 * warranties of performance, merchantability or fitness for any particular
20 * purpose.
21 *
22 * Please cite the author in any work or product based on this material.
23 *
24 * ===========================================================================
25 *
26 * Authors: Paul Thiessen
27 *
28 * File Description:
29 * Classes to hold sets of master/slave pairwise alignments
30 *
31 * ===========================================================================
32 */
33 
34 #ifndef CAV_ALIGNMENT_SET__HPP
35 #define CAV_ALIGNMENT_SET__HPP
36 
37 #include <corelib/ncbistl.hpp>
38 
39 #include <list>
40 #include <vector>
41 
43 
44 
46 
48 class Seq_align;
50 
51 typedef list < CRef < objects::CSeq_annot > > SeqAnnotList;
52 
54 class Sequence;
55 class SequenceSet;
56 
58 {
59 private:
60  int status;
61 
62 public:
63  AlignmentSet(SequenceSet *seqSet, const SeqAnnotList& seqAnnots, bool ignoreBadPairwiseAlignments = false);
64  ~AlignmentSet(void);
65 
66  typedef vector < const MasterSlaveAlignment * > AlignmentList;
68 
69  int Status(void) const { return status; }
70 
71  // pointer to the master sequence for each pairwise master/slave alignment in this set
72  const Sequence *master;
73 };
74 
76 {
77 private:
78  int status;
79 
80 public:
81  MasterSlaveAlignment(const SequenceSet *sequenceSet, const Sequence *masterSequence,
82  const objects::CSeq_align& seqAlign);
83 
84  // pointers to the sequences in this pairwise alignment
85  const Sequence *master, *slave;
86 
87  // this vector maps slave residues onto the master - e.g., masterToSlave[10] = 5
88  // means that residue #10 in the master is aligned to residue #5 of the slave.
89  // Residues are numbered from zero. masterToSlave[n] = -1 means that master
90  // residue n is unaligned.
91  typedef vector < int > ResidueVector;
93 
94  int Status(void) const { return status; }
95 };
96 
98 
99 
100 #endif // CAV_ALIGNMENT_SET__HPP
list< CRef< objects::CSeq_annot > > SeqAnnotList
AlignmentList alignments
vector< const MasterSlaveAlignment * > AlignmentList
int Status(void) const
std::list< ncbi::CRef< ncbi::objects::CSeq_annot > > SeqAnnotList
const Sequence * master
CRef –.
Definition: ncbiobj.hpp:618
int Status(void) const
const Sequence * slave
MasterSlaveAlignment(const SequenceSet *sequenceSet, const Sequence *masterSequence, const objects::CSeq_align &seqAlign)
vector< int > ResidueVector
const Sequence * master
ResidueVector masterToSlave
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
The NCBI C++/STL use hints.
Modified on Mon Jun 17 05:07:13 2024 by modify_doxy.py rev. 669887