This file is indexed.

/usr/share/logol/tools/suffixSearch.rb is in logol 1.7.0-2.

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

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
#!/usr/bin/ruby
require 'open3'

DIR=File.expand_path(File.dirname(__FILE__))


args = ""

nbErrors = ARGV[0]
minStart = ARGV[1].to_i
sequenceIndex = ARGV[2]
motifFileName = ARGV[3]
muteOnly = ARGV[4].to_i
maxStart = ARGV[5].to_i

mode = 0
if nbErrors.to_i == 0
  mode = 0
else
  if muteOnly == 1
    mode = 1
  else
    mode = 2
  end
end

cmd = "${vmatch_path}vmatch "

case mode
when 0
  cmd += "-q "+motifFileName+"  -complete -absolute -nodist -noevalue -noscore -noidentity "+sequenceIndex
when 1
  cmd += "-q "+motifFileName+" -h "+nbErrors.to_s+" -complete -absolute  -noevalue -noscore -noidentity  "+sequenceIndex
when 2
  cmd += "-q "+motifFileName+" -e "+nbErrors.to_s+" -complete -absolute  -noevalue -noscore -noidentity "+sequenceIndex
end

Open3.popen3(cmd) do |stdin,stdout,stderr, wait_thr|

  while line=stdout.gets
    if line[/^#/]
	next
    end
    line.strip!
    vals = line.split(/\s+/)
    case mode
    when 0
      if vals[1].to_i >= minStart and (vals[1].to_i <= maxStart or maxStart=0)
        $stdout.puts vals[1]
        $stdout.puts vals[0]
        $stdout.puts "0"
      end
    when 1
      if vals[1].to_i >= minStart and (vals[1].to_i <= maxStart or maxStart=0)
        $stdout.puts vals[1]
        $stdout.puts vals[0]
        if vals[5].to_i == 0
          $stdout.puts "0"
        else
          errs = vals[5].to_i * -1
          $stdout.puts errs.to_s
        end
      end
    when 2
      if vals[1].to_i >= minStart and (vals[1].to_i <= maxStart or maxStart=0)
        $stdout.puts vals[1]
        $stdout.puts vals[0]
        $stdout.puts vals[5]
      end
    end

    $stdout.flush

  end

end