code: def build(args):
      from jcvi.apps.cdhit import deduplicate
      from jcvi.apps.vecscreen import mask
      from jcvi.formats.fasta import sort
      p = OptionParser(build.__doc__)
      p.add_option("--nodedup", default=False, action="store_true",
                   help="Do not deduplicate [default: deduplicate]")
      opts, args = p.parse_args(args)
      if len(args) != 3:
          sys.exit(not p.print_help())
      fastafile, bacteria, pf = args
      dd = deduplicate([fastafile, "--pctid=100"]) \
                  if not opts.nodedup else fastafile
      screenfasta = screen([dd, bacteria])
      tidyfasta = mask([screenfasta])
      sortedfasta = sort([tidyfasta, "--sizes"])
      scaffoldfasta = pf + ".assembly.fasta"
      format([sortedfasta, scaffoldfasta, "--prefix=scaffold_", "--sequential"])
      gapsplitfasta = pf + ".gapSplit.fasta"
      cmd = "gapSplit -minGap=10 {0} {1}".format(scaffoldfasta, gapsplitfasta)
      sh(cmd)
      contigsfasta = pf + ".contigs.fasta"
      format([gapsplitfasta, contigsfasta, "--prefix=contig_", "--sequential"])