/usr/bin/crb-blast is in ruby-crb-blast 0.6.8-1.
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 77 78 79 80 81 82 83 84 85 86 87 88 89 | #!/usr/bin/ruby
#
# run crb-blast from the cli
#
require 'trollop'
require 'crb-blast'
opts = Trollop::options do
version CRB_Blast::VERSION::STRING.dup
banner <<-EOS
CRB-Blast v#{CRB_Blast::VERSION::STRING.dup} by Chris Boursnell <cmb211@cam.ac.uk>
Conditional Reciprocal Best BLAST
USAGE:
crb-blast <options>
OPTIONS:
EOS
opt :query,
"query fasta file",
:required => true,
:type => String
opt :target,
"target fasta file",
:required => true,
:type => String
opt :evalue,
"e-value cut off for BLAST. Format 1e-5",
:default => 1e-5,
:type => :float
opt :threads,
"number of threads to run BLAST with",
:default => 1,
:type => :int
opt :output,
"output file as tsv",
:required => true,
:type => String
opt :split,
"split the fasta files into chunks and run multiple blast jobs and then"+
" combine them."
opt :verbose,
"be verbose"
end
Trollop::die :query, "must exist" if !File.exist?(opts[:query])
Trollop::die :target, "must exist" if !File.exist?(opts[:target])
blaster = CRB_Blast::CRB_Blast.new(opts.query, opts.target)
print "Making blast databases..." if opts.verbose
dbs = blaster.makedb
puts " Done" if opts.verbose
print "Blasting..." if opts.verbose
run = blaster.run_blast(opts.evalue, opts.threads, opts.split)
puts " Done" if opts.verbose
print "Loading..." if opts.verbose
load = blaster.load_outputs
puts " Done" if opts.verbose
print "Finding reciprocals..." if opts.verbose
recips = blaster.find_reciprocals
puts " Done" if opts.verbose
print "Fitting curve..." if opts.verbose
secondaries = blaster.find_secondaries
puts " Done" if opts.verbose
print "Writing output..." if opts.verbose
File.open("#{opts.output}", 'w') do |out|
blaster.reciprocals.each_pair do |query_id, hits|
hits.each do |hit|
out.write "#{hit}\n"
end
end
end
puts " Done" if opts.verbose
|