diff --git a/lib/genevalidator/blast.rb b/lib/genevalidator/blast.rb index a92f1a7b..82b79922 100644 --- a/lib/genevalidator/blast.rb +++ b/lib/genevalidator/blast.rb @@ -137,7 +137,7 @@ def print_blast_info_text(remote) if remote warn '==> BLAST search and subsequent analysis will be done on a remote' warn ' database. Please use a local database for larger analysis.' - else + else warn '==> Running BLAST. This may take a while.' end warn '' # a blank line diff --git a/lib/genevalidator/exceptions.rb b/lib/genevalidator/exceptions.rb index 92d3514a..d590f999 100644 --- a/lib/genevalidator/exceptions.rb +++ b/lib/genevalidator/exceptions.rb @@ -3,15 +3,6 @@ module GeneValidator class ClasspathError < RuntimeError end - # Exception raised when the command line type argument - # does not corrsepond to the type of the sequences in the fasta file - class SequenceTypeError < RuntimeError - def to_s - "\nSequence Type error: Possible cause include that the blast output" \ - " was not obtained against a protein database.\n" - end - end - # Exception raised when an unexisting file is accessed class FileNotFoundException < RuntimeError end diff --git a/lib/genevalidator/hsp.rb b/lib/genevalidator/hsp.rb index 301f5b76..b72792d8 100644 --- a/lib/genevalidator/hsp.rb +++ b/lib/genevalidator/hsp.rb @@ -78,12 +78,11 @@ def init_tabular_attribute(hash) def assert_seq_type(query) seq_type = BlastUtils.guess_sequence_type(query) - raise SequenceTypeError if seq_type != :protein - rescue SequenceTypeError - warn '*** A BLAST Hit failed the sequence-type validation (i.e. the BLAST' - warn ' hit sequence seems to be a nucleotide sequence).' - warn ' Ensure that the BLAST database used is a protein database.' - warn ' Ignoring and continuing with analysis.' + return if seq_type == :protein + warn '*** A BLAST hit looks like a nucleotide sequence. Continuing' \ + ' with the analysis anyway.' + warn ' Make sure that you used a protein database or the analysis' \ + ' results will be incorrect!' end end end