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

Go to the SVN repository for this file.

1 /* $Id: bed_feature_record.hpp 93574 2021-04-30 16:19:19Z stakhovv $
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: Frank Ludwig
27  *
28  * File Description: Write bed file
29  *
30  */
31 
32 #ifndef OBJTOOLS_WRITERS___BED_FEATURE_RECORD__HPP
33 #define OBJTOOLS_WRITERS___BED_FEATURE_RECORD__HPP
34 
36 BEGIN_objects_SCOPE
37 
38 // ============================================================================
39 /// Encapsulation of the BED feature record. That's columnar data with at least
40 /// three and at most twelve columns. Each column has a fixed, well defined
41 /// meaning, and all records of the same track must have the same number of
42 /// columns.
43 ///
45 // ============================================================================
46 {
47 public:
49 
51 
52  bool AssignLocation(CScope&, const CSeq_interval&);
53  bool AssignDisplayData(const CMappedFeat&, bool);
54  bool AssignName(const CMappedFeat&);
55 
56  bool Write(CNcbiOstream&, unsigned int);
57 
58  bool SetLocation(const CSeq_loc&);
59  bool SetName(const CSeqFeatData&);
60  bool SetScore(int);
61  bool SetThick(const CSeq_loc&);
62  bool SetNoThick(const CSeq_loc&);
63  bool SetRgb(const string&);
64  bool SetBlocks(const CSeq_loc&, const CSeq_loc&);
65 
66  const string& Chrom() const { return m_strChrom; };
67  const string& ChromStart() const { return m_strChromStart; };
68  const string& ChromEnd() const { return m_strChromEnd; };
69  const string& Name() const { return m_strName; };
70  const string& Score() const { return m_strScore; };
71  const string& Strand() const { return m_strStrand; };
72  const string& ThickStart() const { return m_strThickStart; };
73  const string& ThickEnd() const { return m_strThickEnd; };
74  const string& ItemRgb() const { return m_strItemRgb; };
75  const string& BlockCount() const { return m_strBlockCount; };
76  const string& BlockSizes() const { return m_strBlockSizes; };
77  const string& BlockStarts() const { return m_strBlockStarts; };
78 
79  size_t ColumnCount() const { return m_uColumnCount; };
80 
81 protected:
83  string m_strChrom;
85  string m_strChromEnd;
86  string m_strName;
87  string m_strScore;
88  string m_strStrand;
90  string m_strThickEnd;
91  string m_strItemRgb;
95 };
96 
97 END_objects_SCOPE
99 
100 #endif // OBJTOOLS_WRITERS___BED_FEATURE_RECORD__HPP
Encapsulation of the BED feature record.
bool AssignName(const CMappedFeat &)
bool SetThick(const CSeq_loc &)
const string & BlockCount() const
bool SetLocation(const CSeq_loc &)
const string & Chrom() const
bool SetBlocks(const CSeq_loc &, const CSeq_loc &)
const string & ChromEnd() const
bool SetName(const CSeqFeatData &)
const string & ItemRgb() const
const string & ChromStart() const
bool Write(CNcbiOstream &, unsigned int)
const string & Strand() const
bool AssignLocation(CScope &, const CSeq_interval &)
bool AssignDisplayData(const CMappedFeat &, bool)
const string & BlockStarts() const
const string & BlockSizes() const
bool SetRgb(const string &)
const string & ThickEnd() const
const string & Name() const
const string & Score() const
size_t ColumnCount() const
const string & ThickStart() const
bool SetNoThick(const CSeq_loc &)
CMappedFeat –.
Definition: mapped_feat.hpp:59
CScope –.
Definition: scope.hpp:92
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
Definition: ncbistre.hpp:149
Modified on Sun May 19 04:39:59 2024 by modify_doxy.py rev. 669887