File: MovieAlnIndexLookupTable.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 (111 lines) | stat: -rw-r--r-- 4,431 bytes parent folder | download | duplicates (4)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
/*
 * =====================================================================================
 *
 *       Filename:  MovieAlnIndexLookupTable.h
 *
 *    Description:  For cpp/pbihdfutils/LoadPulses.cpp use only.
 *                  Cache all the information required for loading metric from pls/bas
 *                  to cmp file.
 *                  mapping movieAlignmentIndex in movieIndexSets[movieIndex] to:
 *                  alignmentIndex: index of this alignment in cmpFile.alnInfo.alignments
 *                  refGroupIndex : index of this alignment in cmpReader.refAlignGroups
 *                  readGroupIndex: index of this alignment in cmpReader.refAlignGroups\
 *                                  [refGroupIndex]->readGroupds[readGroupIndex]
 *                  offsetBegin   : offset begin for this alignment in cmpFile
 *                                  dataset /ref/movie/AlnArray
 *                  offsetEnd     : offset enda
 *                  queryStart    : start position of query of this alignment
 *                  queryEnd      : end position of query of this alignment
 *                  readIndex     : index of this alignment in baseFile.readStartPositions
 *                  readStart     : start position of this alignment in baseFile
 *                  readLength    : read length of this alignment in baseFile
 *                  plsReadIndex  : index of this alignment in pulseFile.pulseStartPositions
 *                  alignedSequence
 *                                : aligned sequence of this alignment
 *
 *        Version:  1.0
 *        Created:  12/19/2012 03:50:21 PM
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Yuan Li (yli), yli@pacificbiosciences.com
 *        Company:  Pacific Biosciences
 *
 * =====================================================================================
 */

#ifndef _LOADPULSES_MovieAlnIndexLookupTable_HPP_
#define _LOADPULSES_MovieAlnIndexLookupTable_HPP_

#include <iostream>
#include <string>

#include <pbdata/Types.h>

class MovieAlnIndexLookupTable
{
public:
    bool skip;
    // as movies may split into multiple parts, skip=true if
    // this alignment is not found in the movie

    size_t movieAlignmentIndex;
    // movieIndexSets[movieIndex][toFrom[movieAlignmentIndex]]

    UInt alignmentIndex;
    // cmpFile.alnInfo.alignments[alignmentIndex]

    UInt holeNumber;
    // holeNumber corresponding to this alignment in baseFile

    size_t refGroupIndex;
    // cmpReader.refAlignGroups[refGroupIndex]

    size_t readGroupIndex;
    // cmpReader.refAlignGroups[refGroupIndex]->readGroups[readGroupIndex]

    UInt offsetBegin, offsetEnd;
    // offset begin and end for this alignment in /ref/movie/AlnArray
    // = cmpFile.alnInfo.alignments[alignmentIndex].GetOffsetBegin/End()

    UInt queryStart, queryEnd;
    // start/end for this read = cmpFile.alnInfo.
    // alignments[alignmentIndex].GetQueryStart/End()

    size_t readIndex;
    // index of this alignment in baseFile.readStartPositions
    // = index of this hole number in BaseCalls/ZMW/HoleNumber
    // baseFile.LookupReadIndexByHoleNumber(holeNumber, out=readIndex)

    size_t readStart;
    // start pos of this alignment in baseFile
    // = baseFile.readStartPositions[readIndex]

    int readLength;
    // read length of this alignment in baseFile
    // = baseFile.readStartPositions[readIndex+1] - readStart

    size_t plsReadIndex;
    // index of this alignment in pulseFile.pulseStartPositions
    // = index of this hole number in PulseCalls/ZMW/HoleNumbers
    // = pulseFile.LookupReadIndexByHoleNumber(holeNumber, out=plsReadIndex)

    // std::vector<int> baseToAlignmentMap;
    // keep all the baseToAlignmentMap in memory for now
    // Note that baseToAlignmentMap is not initialized when
    // BuildLookupTable is called.

    std::string alignedSequence;

    MovieAlnIndexLookupTable();

    void SetValue(const bool& skipP, const size_t& movieAlignmentIndexP,
                  const UInt& alignmentIndexP, const size_t& refGroupIndexP,
                  const size_t& readGroupIndexP, const UInt& holeNumberP, const UInt& offsetBeginP,
                  const UInt& offsetEndP, const UInt& queryStartP, const UInt& queryEndP,
                  const size_t& readIndexP, const size_t& readStartP, const int& readLengthP,
                  const size_t& plsReadIndexP);

    void print();
};
#endif