code: def split(args):
      
      p = OptionParser(split.__doc__)
  
      opts, args = p.parse_args(args)
  
      if len(args) != 2:
          sys.exit(not p.print_help())
  
      gffile, outdir = args
      mkdir(outdir)
  
      g = Gff(gffile)
      seqids = g.seqids
  
      for s in seqids:
          outfile = op.join(outdir, s + ".gff")
          extract([gffile, "--contigs=" + s, "--outfile=" + outfile])
docs: %prog split gffile outdir
  
      Split the gff into one contig per file. Will also take sequences if the file
      contains FASTA sequences.