code: def bed(args):
      
      from jcvi.formats.blast import BlastLine
      p = OptionParser(bed.__doc__)
  
      opts, args = p.parse_args(args)
  
      if len(args) != 1:
          sys.exit(not p.print_help())
  
      btabfile, = args
      btab = Btab(btabfile)
      for b in btab:
          Bline = BlastLine(b.blastline)
          print(Bline.bedline)
docs: %prog bed btabfile
  
      Convert btab to bed format.