File: CCSSequence.cpp

package info (click to toggle)
pbseqlib 0~20161219-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 5,924 kB
  • ctags: 5,123
  • sloc: cpp: 82,727; makefile: 305; python: 239; sh: 8
file content (36 lines) | stat: -rw-r--r-- 1,072 bytes parent folder | download | duplicates (3)
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
#include "CCSSequence.hpp"

void CCSSequence::Free() {
    numPasses = 0;
    numConsensusBases = 0;
    SMRTSequence::Free();
    unrolledRead.Free();
}

int CCSSequence::GetStorageSize() {
    return SMRTSequence::GetStorageSize() + unrolledRead.GetStorageSize();
}

UInt CCSSequence::HoleNumber(void) const {
    return SMRTSequence::HoleNumber();
}

CCSSequence & CCSSequence::HoleNumber(const UInt holeNumber) {
    SMRTSequence::HoleNumber(holeNumber);
    unrolledRead.HoleNumber(holeNumber);
    return *this;
}

//
// In the first iteration, Explode simply pulls the subreads out
// that are used in the ccs.   Eventually, it will pull out all
// high-quality subreads.
// 
void CCSSequence::Explode(std::vector<SMRTSequence> &subreads) {
    subreads.resize(numPasses);
    int subreadIndex;
    for (subreadIndex = 0; subreadIndex < numPasses; subreadIndex++) {
        subreads[subreadIndex].ReferenceSubstring(this->unrolledRead, passStartBase[subreadIndex], passNumBases[subreadIndex]);
        subreads[subreadIndex].zmwData = unrolledRead.zmwData;
    }
}