code: def scaffold(args):
      
      p = OptionParser(scaffold.__doc__)
      p.set_aligner(aligner="bwa")
      p.set_home("sspace")
      p.set_cpus()
      opts, args = p.parse_args(args)
  
      if len(args) < 1:
          sys.exit(not p.print_help())
  
      contigs = args[0]
      libtxt = write_libraries(args[1:], aligner=opts.aligner)
      # Requires getopts.pl which may be missing
      download("http://web.vims.edu/bridge/bridge2/aw/lib/getopts.pl")
  
      cmd = "perl " + op.join(opts.sspace_home, "SSPACE_Standard_v3.0.pl")
      cmd += " -l {0} -s {1} -T {2}".format(libtxt, contigs, opts.cpus)
      runsh = "run.sh"
      write_file(runsh, cmd)
docs: %prog scaffold contigs.fasta MP*.fastq
  
      Run SSPACE scaffolding.