This file is indexed.

/usr/include/mash/CommandFind.h is in libmash-dev 2.0-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
85
86
87
88
89
90
91
92
93
94
95
96
97
// Copyright © 2015, Battelle National Biodefense Institute (BNBI);
// all rights reserved. Authored by: Brian Ondov, Todd Treangen,
// Sergey Koren, and Adam Phillippy
//
// See the LICENSE.txt file included with this software for license information.

#ifndef INCLUDED_CommandFind
#define INCLUDED_CommandFind

#include "Command.h"
#include "Sketch.h"
#include <string.h>
#include <queue>

namespace mash {

class CommandFind : public Command
{
public:
    
    struct FindInput
    {
        FindInput
        (
            const Sketch & sketchNew,
            const char * seqIdNew,
            const char * seqNew,
            uint32_t lengthNew,
            float thresholdNew,
            int bestNew,
            bool selfMatchesNew
        ) :
        sketch(sketchNew),
        length(lengthNew),
        threshold(thresholdNew),
        seqId(seqIdNew),
        best(bestNew),
        selfMatches(selfMatchesNew)
        {
            seq = new char[strlen(seqNew) + 1];
            strcpy(seq, seqNew);
        }
        
        ~FindInput()
        {
            delete [] seq;
        }
        
        const Sketch & sketch;
        std::string seqId;
        char * seq;
        uint32_t length;
        float threshold;
        int best;
        bool selfMatches;
    };
    
    struct FindOutput
    {
        struct Hit
        {
            Hit(uint32_t refNew, uint32_t startNew, uint32_t endNew, bool minusStrandNew, float scoreNew)
                :
                ref(refNew),
                start(startNew),
                end(endNew),
                minusStrand(minusStrandNew),
                score(scoreNew)
                {}
            
            unsigned int ref;
            unsigned int start;
            unsigned int end;
            bool minusStrand;
            float score;
        };
        
        std::string seqId;
        std::priority_queue<Hit> hits;
    };
    
    CommandFind();
    
    int run() const; // override
    
private:
    
    void writeOutput(const Sketch & sketch, FindOutput * output) const;
};

CommandFind::FindOutput * find(CommandFind::FindInput * data);
void findPerStrand(const CommandFind::FindInput * input, CommandFind::FindOutput * output, bool minusStrand);
bool operator<(const CommandFind::FindOutput::Hit & a, const CommandFind::FindOutput::Hit & b);

} // namespace mash

#endif