code: def dust(args):
      
      p = OptionParser(dust.__doc__)
      opts, args = p.parse_args(args)
  
      if len(args) != 1:
          sys.exit(not p.print_help())
  
      fastafile, = args
      dustfastafile = fastafile.rsplit(".", 1)[0] + ".dust.fasta"
      if need_update(fastafile, dustfastafile):
          cmd = "dustmasker -in {0}".format(fastafile)
          cmd += " -out {0} -outfmt fasta".format(dustfastafile)
          sh(cmd)
  
      for name, seq in parse_fasta(dustfastafile):
          nlow = sum(1 for x in seq if x in "acgtnN")
          pctlow = nlow * 100. / len(seq)
          if pctlow < 98:
              continue
          #print "{0}\t{1:.1f}".format(name, pctlow)
          print(name)
docs: %prog dust assembly.fasta
  
      Remove low-complexity contigs within assembly.