code: def blastdb(fasta, maxfile = 10000000):
      
      db = fasta.rsplit('.', 1)[0]
      type = check_type(fasta)
      if type == 'nucl':
          type = ['nhr', type]
      else:
          type = ['phr', type]
      if os.path.exists('%s.%s' % (db, type[0])) is False \
              and os.path.exists('%s.00.%s' % (db, type[0])) is False:
          print('# ... making blastdb for: %s' % (fasta), file=sys.stderr)
          os.system('makeblastdb \
                  -in %s -out %s -dbtype %s -max_file_sz %s >> log.txt' \
                  % (fasta, db, type[1], maxfile))
      else:
          print('# ... database found for: %s' % (fasta), file=sys.stderr)
      return db
docs: make blast db