/usr/share/logol/tools/logolSearch.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 | #!/usr/bin/ruby
require 'open3'
# args: Err,Min,Sequence,MotifFileName,Mute,Max
#$1 = nb error
#minStart=$2
# If maxStart is equal to 0, do not take it into account
#maxStart=$6
#muteOnly=$5
#motifFileName=$4
#$3 sequence , add .index to name
nbError = ARGV[0]
minStart = ARGV[1]
sequence = ARGV[2]
motifFileName = ARGV[3]
muteOnly = ARGV[4]
maxStart = ARGV[5]
DIR=File.expand_path(File.dirname(__FILE__))
if muteOnly.to_i == 1
cmd = "ruby "+DIR+"/logolIndex.rb --search "+sequence+".index --min "+minStart+" --max "+maxStart+" --pattern "+motifFileName+" --error "+nbError+" --hamming"
else
cmd = "ruby "+DIR+"/logolIndex.rb --search "+sequence+".index --min "+minStart+" --max "+maxStart+" --pattern "+motifFileName+" --error "+nbError
end
Open3.popen3(cmd) do |stdin,stdout,stderr, wait_thr|
while line=stdout.gets
$stdout.puts line
$stdout.flush
end
end
|