This file is indexed.

/usr/include/pbseq/alignment/algorithms/alignment/IDSScoreFunction.hpp is in libblasr-dev 0~20161219-1.

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
 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#ifndef _BLASR_IDS_SCORE_FUNCTION_HPP_
#define _BLASR_IDS_SCORE_FUNCTION_HPP_

#include <string>
#include <cmath>
#include "ScoreMatrices.hpp"
#include "BaseScoreFunction.hpp"
#include "../../utils/LogUtils.hpp"
// pbdata
#include "../../../pbdata/FASTASequence.hpp"
#include "../../../pbdata/FASTQSequence.hpp"

float SumAsValidPhred(float v1, float v2, float v3); 

template<typename T_RefSequence, typename T_QuerySequence>
class IDSScoreFunction : public BaseScoreFunction {
    public:
        int scoreMatrix[5][5];

        IDSScoreFunction(int scoreMatrixP[5][5], int insertionP, int deletionP, int globalInsertionPriorP,
                int globalDeletionPriorP) : BaseScoreFunction(insertionP, deletionP, globalInsertionPriorP, globalDeletionPriorP) {
            InitializeScoreMatrix(scoreMatrixP);
        }


        IDSScoreFunction() {
            substitutionPrior = 20;
            globalDeletionPrior = 13;
        }

        void InitializeScoreMatrix(int scoreMatrixP[5][5]) {
            int i, j;
            for (i = 0; i < 5; i++ ){ 
                for (j = 0; j < 5; j++ ){
                    scoreMatrix[i][j] = scoreMatrixP[i][j];
                }
            }
        }


        int Deletion(T_QuerySequence &seq, DNALength pos) {
            PB_UNUSED(seq);
            PB_UNUSED(pos);
            std::cout << "IDS. For now, deletion must be specialized with FASTQ or FASTA Sequences. " << std::endl;
            exit(1);
            return 0;
        }
        int Deletion(T_RefSequence &refSeq, DNALength refPos, T_QuerySequence &querySeq, DNALength queryPos) {
            PB_UNUSED(refSeq);
            PB_UNUSED(refPos);
            PB_UNUSED(querySeq);
            PB_UNUSED(queryPos);
            std::cout << "IDS. For now, this function must be specialized with either FASTQ or FASTA sequences"<<std::endl;
            exit(1);
        }
        int Match(T_RefSequence &ref, DNALength refPos, T_QuerySequence &query, DNALength queryPos) {
            PB_UNUSED(ref);
            PB_UNUSED(refPos);
            PB_UNUSED(query);
            PB_UNUSED(queryPos);
            std::cout << "IDS. For now, this function must be specialized with either FASTQ or FASTA sequences" << std::endl;
            return 0;
            exit(1);
        }
        int Insertion(T_RefSequence &refSeq, DNALength refPos, T_QuerySequence &querySeq, DNALength queryPos) {
            PB_UNUSED(refSeq);
            PB_UNUSED(refPos);
            PB_UNUSED(querySeq);
            PB_UNUSED(queryPos);
            std::cout << "IDS. For now, this function must be specialized with either FASTQ or FASTA sequences"<<std::endl;
            exit(1);
        }	
        int Insertion(T_QuerySequence &seq, DNALength pos) {
            PB_UNUSED(seq);
            PB_UNUSED(pos);
            std::cout << "IDS. For now, this function must be specialized with either FASTQ or FASTA sequences" << std::endl;
            return 0;
            exit(1);
        }

        float NormalizedMatch(T_RefSequence &ref, DNALength refPos, T_QuerySequence &query, DNALength queryPos);
        float NormalizedInsertion(T_RefSequence &ref, DNALength refPos, T_QuerySequence &query, DNALength queryPos);
        float NormalizedDeletion(T_RefSequence &ref, DNALength refPos, T_QuerySequence &query, DNALength queryPos);
};

/*
 * Define all specializations for a FASTA reference and FASTQSequence for the query, or FASTA sequence for query.
 */

template<>
int IDSScoreFunction<DNASequence,FASTQSequence>::Deletion(DNASequence &ref, 
        DNALength refPos, FASTQSequence &query, DNALength queryPos); 

template<>
int IDSScoreFunction<DNASequence, FASTQSequence>::Deletion(FASTQSequence &query, 
        DNALength queryPos); 

template<>
int IDSScoreFunction<DNASequence, DNASequence>::Deletion(DNASequence &query, 
        DNALength pos); 

template<>
int IDSScoreFunction<DNASequence, FASTQSequence>::Insertion(DNASequence &refSeq, 
        DNALength refPos, FASTQSequence &query, DNALength pos);

template<>
int IDSScoreFunction<DNASequence, FASTQSequence>::Insertion(FASTQSequence &query, 
        DNALength pos); 

template<>
int IDSScoreFunction<DNASequence, FASTQSequence>::Match(DNASequence &ref, 
        DNALength refPos, FASTQSequence &query, DNALength queryPos); 

template<>
float IDSScoreFunction<DNASequence, FASTQSequence>::NormalizedMatch(
        DNASequence &ref, DNALength refPos, FASTQSequence &query, DNALength queryPos); 

template<>
float IDSScoreFunction<DNASequence, FASTQSequence>::NormalizedInsertion(
        DNASequence &ref, DNALength refPos, FASTQSequence &query, DNALength queryPos); 

template<>
float IDSScoreFunction<DNASequence, FASTQSequence>::NormalizedDeletion(
        DNASequence &ref, DNALength refPos, FASTQSequence &query, DNALength queryPos); 

#endif // _BLASR_IDS_SCORE_FUNCTION_HPP_