lib/macroape/cli/preprocess_collection.rb in macroape-4.0.0 vs lib/macroape/cli/preprocess_collection.rb in macroape-4.0.1
- old
+ new
@@ -24,11 +24,11 @@
Example:
#{run_tool_cmd} ./motifs collection.yaml -p 0.001,0.0005,0.0001 -d 1,10 -b 0.2,0.3,0.3,0.2
EOS
if argv.empty? || ['-h', '--h', '-help', '--help'].any?{|help_option| argv.include?(help_option)}
- STDERR.puts doc
+ $stderr.puts doc
exit
end
data_model = argv.delete('--pcm') ? Bioinform::PCM : Bioinform::PWM
@@ -97,11 +97,11 @@
end
pwms = motifs.map(&:to_pwm)
pwms.each_with_index do |pwm,index|
- STDERR.puts "Motif #{pwm.name}, length: #{pwm.length} (#{index+1} of #{pwms.size}, #{index*100/pwms.size}% complete)" unless silent
+ $stderr.puts "Motif #{pwm.name}, length: #{pwm.length} (#{index+1} of #{pwms.size}, #{index*100/pwms.size}% complete)" unless silent
# When support of onefile collections is introduced - then here should be check if name exists.
# Otherwise it should skip motif and tell you about this
# Also two command line options to fail on skipping or to skip silently should be included
@@ -138,11 +138,11 @@
else
pwm.discrete(precise_discretization).weak_thresholds(*pvalues,&fill_precise_infos)
end
collection.add_pm(pwm, info) unless skip_motif
end
- STDERR.puts "100% complete. Saving results" unless silent
+ $stderr.puts "100% complete. Saving results" unless silent
File.open(output_file, 'w') do |f|
f.puts(collection.to_yaml)
end
puts OutputInformation.new{|infos|
infos.add_parameter('P', 'P-value list', pvalues.join(','))
@@ -150,10 +150,10 @@
infos.add_parameter('VP', 'discretization value, precise', precise_discretization)
infos.add_parameter('PB', 'P-value boundary', pvalue_boundary)
infos.background_parameter('B', 'background', background)
}.result
rescue => err
- STDERR.puts "\n#{err}\n#{err.backtrace.first(5).join("\n")}\n\nUse --help option for help\n\n#{doc}"
+ $stderr.puts "\n#{err}\n#{err.backtrace.first(5).join("\n")}\n\nUse --help option for help\n\n#{doc}"
end
end
end
end
\ No newline at end of file