/usr/include/pbseq/alignment/tuples/DNATupleList.h 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 | #ifndef TUPLES_DNA_TUPLE_LIST_H_
#define TUPLES_DNA_TUPLE_LIST_H_
#include <vector>
#include "DNATuple.h"
template<typename Sequence>
DNALength StoreTuplePosList(Sequence seq, TupleMetrics &tm, vector<PositionDNATuple> &tupleList) {
//
// Do this faster later on with a suffix tree -- faster than n log n construction time.
//
DNALength s;
PositionDNATuple tempTuple;
for (s = 0; s < seq.length - tm.tupleSize + 1; s++) {
if (tempTuple.FromStringLR(&(seq.seq[s]), tm)) {
tempTuple.pos = s;
tupleList.push_back(tempTuple);
}
}
std::sort(tupleList.begin(), tupleList.end());
//
// Be nice and leave the pos list in ascending sorted order,
// even though the top of this function does not specify it.
//
return tupleList.size();
}
void WriteTuplePosList(vector<PositionDNATuple> &tupleList, int tupleSize, ofstream &out) {
DNALength tupleListLength = tupleList.size();
out.write((char*) &tupleSize, sizeof(tupleSize));
out.write((char*) &tupleListLength, sizeof(DNALength));
out.write((char*) &tupleList[0], sizeof(PositionDNATuple) * tupleList.size());
}
void ReadTuplePosList(ifstream &in, vector<PositionDNATuple> &tupleList, int &tupleSize) {
DNALength tupleListLength;
in.read((char*) &tupleSize, sizeof(int));
in.read((char*) &tupleListLength, sizeof(DNALength));
tupleList.resize(tupleListLength);
in.read((char*) &tupleList[0], sizeof(PositionDNATuple) * tupleListLength);
}
#endif
|