code: def link(args):
      
      from jcvi.apps.base import mkdir
  
      p = OptionParser(link.__doc__)
      p.add_option("--dir",
                   help="Place links in a subdirectory [default: %default]")
      opts, args = p.parse_args(args)
  
      if len(args) != 1:
          sys.exit(not p.print_help())
  
      meta, = args
      d = opts.dir
      if d:
          mkdir(d)
  
      fp = open(meta)
      cwd = op.dirname(get_abs_path(meta))
      for row in fp:
          source, target = row.split()
          source = op.join(cwd, source)
          if d:
              target = op.join(d, target)
          lnsf(source, target, log=True)
docs: %prog link metafile
  
      Link source to target based on a tabular file.