File: ReferenceSequence.hpp

package info (click to toggle)
pbseqlib 5.3.5%2Bdfsg-10
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 7,148 kB
  • sloc: cpp: 77,259; python: 331; sh: 103; makefile: 41
file content (62 lines) | stat: -rw-r--r-- 1,639 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef _BLASR_SAM_REFERENCE_SEQUENCE_HPP_
#define _BLASR_SAM_REFERENCE_SEQUENCE_HPP_

#include <string>

#include <pbdata/sam/SAMKeywordValuePair.hpp>

class SAMReferenceSequence
{
public:
    std::string sequenceName;
    uint64_t length;
    std::string GetSequenceName() { return sequenceName; }
    //
    // By definining accessor functions here but no data, we can
    // economize on the amount of space used for each element.   This is
    // no big deal for references, but for pairwise alignments, it is
    // big.
    //
    std::string GetMD5() { return ""; }
    uint64_t GetLength() { return length; }
    std::string GetGenomeAssembly() { return ""; }
    std::string GetSpecies() { return ""; }
    std::string GetURI() { return ""; }

    enum SAMReferenceSequenceRequiredFields
    {
        SQ_SN,
        SQ_LN
    };

    static const char* SAMReferenceSequenceFieldNames[];

    void StoreValues(std::vector<SAMKeywordValuePair>& kvPairs, uint64_t lineNumber = 0);
};

class SAMFullReferenceSequence : public SAMReferenceSequence
{
public:
    std::string md5;
    std::string species;
    std::string uri;
    std::string genomeAssembly;
    std::string GetMD5() { return md5; }
    std::string GetSpecies() { return species; }
    std::string GetURI() { return uri; }
    std::string GetGenomeAssembly() { return genomeAssembly; }

    enum FullReferenceSequenceRequiredFields
    {
        SQ_AS,
        SQ_M5,
        SQ_SP,
        SQ_UR
    };

    static const char* SAMFullReferenceSequenceFieldNames[];

    void StoreValues(std::vector<SAMKeywordValuePair>& kvPairs, uint64_t lineNumber = 0);
};

#endif