/usr/include/pbseq/alignment/bwt/Pos.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 | #ifndef _BLASR_POS_HPP_
#define _BLASR_POS_HPP_
#include <fstream>
#include <vector>
#include "PackedHash.hpp"
#include "../../pbdata/DNASequence.hpp"
#include "../../pbdata/Types.h"
#include "../../pbdata/utils/BitUtils.hpp"
template< typename T_BWT_Sequence>
class Pos {
public:
static const unsigned int stride=8;
PackedHash packedHash;
std::vector<int> hashCount;
std::vector<int> fullPos;
int hasDebugInformation;
void Write(std::ostream &out) {
packedHash.Write(out);
}
void Read(std::istream &in) {
packedHash.Read(in);
}
void InitializeFromSuffixArray(DNALength suffixArray[], DNALength suffixArrayLength) {
DNALength p;
packedHash.Allocate(suffixArrayLength);
std::fill(hashCount.begin(), hashCount.end(), 0);
for (p = 0; p < suffixArrayLength; p++ ){
if (suffixArray[p] % stride==0){
packedHash.AddValue(p,suffixArray[p]);
}
}
}
int Lookup(DNALength bwtPos, DNALength &seqPos) {
return packedHash.LookupValue(bwtPos-1, seqPos);
}
};
#endif // _BLASR_POS_HPP_
|