def build_blast_db(blastdb)
      Dir.glob(File.expand_path(blastdb) + "/*").each do |d|
        if File.directory?(d)
          contigs  = File.join(d, "contigs.fa")
          peptides = File.join(d, "peptides.fa")

          found = false

          if File.exists?(contigs) && File.readable?(contigs)
            execute_makeblastdb("nucl", d, contigs)
            found = true
          end
          if File.exists?(peptides) && File.readable?(peptides)
            execute_makeblastdb("prot", d, peptides)
            found = true
          end

          unless found
            raise "Extracted data not found for #{contigs} or #{peptides}. " <<
            "Make sure you supplied the correct data directory and file names."
          end
        end
      end
    end
def build_blast_db(blastdb)
      Dir.glob(File.expand_path(blastdb) + "/*").each do |d|
        if File.directory?(d)
          contigs  = File.join(d, "contigs.fa")
          peptides = File.join(d, "peptides.fa")

          found = false

          if File.exists?(contigs) && File.readable?(contigs)
            execute_makeblastdb("nucl", d, contigs)
            found = true
          end
          if File.exists?(peptides) && File.readable?(peptides)
            execute_makeblastdb("prot", d, peptides)
            found = true
          end

          unless found
            raise "Extracted data not found for #{contigs} or #{peptides}. " <<
            "Make sure you supplied the correct data directory and file names."
          end
        end
      end
    end
Builds a Blast database from parse_blast_db_data.