This file is indexed.

/usr/include/pbseq/alignment/datastructures/alignmentset/AlignmentSetToCmpH5Adapter.hpp is in libblasr-dev 0~20161219-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
#ifndef _BLASR_ALIGNMENT_SET_TO_CMPH5_ADAPTER_HPP_
#define _BLASR_ALIGNMENT_SET_TO_CMPH5_ADAPTER_HPP_

#include <utils/SMRTReadUtils.hpp> // pbdata
#include "../../../pbdata/sam/AlignmentSet.hpp"
#include <HDFCmpFile.hpp> // hdf
#include "datastructures/alignment/AlignmentCandidate.hpp"
#include "datastructures/alignment/ByteAlignment.h"
#include "../../algorithms/alignment/DistanceMatrixScoreFunction.hpp"

class RefGroupNameId {
 public:
  std::string name;
  unsigned int id;
  RefGroupNameId() {
    id = 0;
    name = "";
  }

  RefGroupNameId(std::string n, unsigned int i) {
    name = n; id = i;
  }

  RefGroupNameId(const RefGroupNameId &rhs) {
    name = rhs.name;
    id   = rhs.id;
  }
};

// number of zmws per SMRTCell for springfield: 163482
const unsigned int numZMWsPerMovieSpringField = 163482; 

template<typename T_CmpFile>
class AlignmentSetToCmpH5Adapter {
public:
  // Map reference name to reference group (/RefGroup) name and ID.
  std::map<std::string, RefGroupNameId> refNameToRefGroupNameandId;
  std::map<std::string, unsigned int> knownMovies;
  std::map<std::string, unsigned int> knownPaths;
  unsigned int numAlignments;
  std::map<std::string, int> refNameToRefInfoIndex;
 
  void Initialize() {
      numAlignments = 0;
  }

  template<typename T_Reference>
  void StoreReferenceInfo(std::vector<T_Reference> &references,
                          T_CmpFile &cmpFile);

  unsigned int StoreMovieInfo(std::string movieName, T_CmpFile &cmpFile);


  // Given a reference name, find whether there exists a refGroup 
  // (e.g. /ref000001) associated with it. 
  // If not, create a refGroup and update refNameToRefGroupNameandId. 
  // Finally, return its associated refGroup ID.
  unsigned int StoreRefGroup(std::string refName, T_CmpFile & cmpFile);

  unsigned int StorePath(std::string & path, T_CmpFile &cmpFile);

  void RemoveGapsAtEndOfAlignment(AlignmentCandidate<> &alignment);

  void StoreAlignmentCandidate(AlignmentCandidate<> &alignment, 
                               int alnSegment,
                               T_CmpFile &cmpFile,
                               int moleculeNumber = -1,
                               bool copyQVs=false);

  void StoreAlignmentCandidateList(std::vector<AlignmentCandidate<> > &alignments,
                                   T_CmpFile &cmpFile,
                                   int moleculeNumber=-1,
                                   bool copyQVs=false);

  void StoreAlignmentCandidate(AlignmentCandidate<> alignment, 
                               T_CmpFile &cmpFile) {
    StoreAlignmentCandidate(alignment, 0, cmpFile);
  }

};

#include "AlignmentSetToCmpH5AdapterImpl.hpp"

#endif