lib/genevalidator/arg_validation.rb in genevalidator-1.6.4 vs lib/genevalidator/arg_validation.rb in genevalidator-1.6.5
- old
+ new
@@ -146,23 +146,30 @@
EXIT_BLAST_NOT_COMPATIBLE = 3
EXIT_NO_BLAST_DATABASE = 4
def validate(opt)
assert_blast_installation
- warn_if_remote_database(opt[:db])
+ warn_if_remote_database(opt)
assert_local_blast_database_exists(opt[:db]) if opt[:db] !~ /remote/
end
def assert_blast_installation
# Validate BLAST installation
assert_blast_installed
assert_blast_compatible
end
- def warn_if_remote_database(db)
- return if db !~ /remote/
+ def warn_if_remote_database(opt)
+ return if opt[:db] !~ /remote/
$stderr.puts # a blank line
- $stderr.puts 'Warning: BLAST will be carried out on remote servers.'
+ if !opt[:raw_sequences] &&
+ (opt[:validations].include?('align') ||
+ opt[:validations].include?('dup'))
+ $stderr.puts 'Warning: Hit sequences will be fetched from remote' \
+ ' server.'
+ else
+ $stderr.puts 'Warning: BLAST will be carried out on remote server.'
+ end
$stderr.puts 'This may take quite a bit of time.'
$stderr.puts 'You may want to install a local BLAST database for' \
' faster analyses.'
$stderr.puts # a blank line
end