code: def cut(args):
      
      from jcvi.formats.base import SetFile
  
      p = OptionParser(cut.__doc__)
      p.add_option("-s", dest="shredafter", default=False, action="store_true",
                   help="Shred fragments after the given fragID [default: %default]")
      p.add_option("--notest", default=False, action="store_true",
                   help="Do not test the unitigfile after edits [default: %default]")
      p.add_option("--blacklist",
                   help="File that contains blacklisted fragments to be popped "
                        "[default: %default]")
      opts, args = p.parse_args(args)
  
      if len(args) != 2:
          sys.exit(not p.print_help())
  
      s, fragID = args
      u = UnitigLayout(s)
      blacklist = opts.blacklist
      black = SetFile(blacklist) if blacklist else None
  
      if opts.shredafter:
          u.shredafter(fragID)
      elif black:
          assert fragID == "0", "Must set fragID to 0 when --blacklist is on"
          u.pop(black)
      else:
          u.cut(fragID)
      u.print_to_file(inplace=True)
  
      if not opts.notest:
          test([s])
docs: %prog cut unitigfile fragID
  
      Cut the unitig at a given fragment. Run `%prog trace unitigfile` first to
      see which fragment breaks the unitig.