File: BaseFile.hpp

package info (click to toggle)
pbseqlib 5.3.5%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,020 kB
  • sloc: cpp: 77,250; python: 331; sh: 103; makefile: 41
file content (51 lines) | stat: -rw-r--r-- 1,493 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
#ifndef _BLASR_BASE_FILE_HPP_
#define _BLASR_BASE_FILE_HPP_

#include <cstdint>
#include <vector>

#include <pbdata/Enumerations.h>
#include <pbdata/SMRTSequence.hpp>
#include <pbdata/reads/HoleXY.hpp>
#include <pbdata/reads/PulseBaseCommon.hpp>
#include <pbdata/reads/ScanData.hpp>

class CompareHoleXY
{
public:
    bool operator()(const HoleXY &lhs, const HoleXY &rhs) const;
};

class BaseFile : public PulseBaseCommon
{
public:
    std::vector<unsigned char> baseCalls;
    std::vector<uint8_t> holeStatus;
    std::vector<HoleXY> holeXY;
    std::vector<uint16_t> basWidthInFrames;
    std::vector<uint16_t> preBaseFrames;
    std::vector<int> pulseIndex;
    std::vector<unsigned char> qualityValues;
    std::vector<unsigned char> deletionQV;
    std::vector<unsigned char> deletionTag;
    std::vector<unsigned char> insertionQV;
    std::vector<unsigned char> substitutionQV;
    std::vector<unsigned char> substitutionTag;
    std::vector<unsigned char> mergeQV;
    std::vector<DNALength> readLengths;
    std::vector<DSLength> readStartPositions;
    UInt nReads;
    DSLength nBases;

    bool LookupReadIndexByXY(uint16_t x, uint16_t y, UInt &index);

    void CopyReadAt(UInt readIndex, SMRTSequence &read);

    // Copy array from fullArray starting from position pos with length length to dest.
    template <typename T>
    void CopyArray(std::vector<T> &fullArray, DSLength pos, DNALength length, T *dest);
};

#include "BaseFileImpl.hpp"

#endif  // _BLASR_BASE_FILE_HPP_