code: def allelefreqall(args):
      
      p = OptionParser(allelefreqall.__doc__)
      opts, args = p.parse_args(args)
  
      if len(args) != 1:
          sys.exit(not p.print_help())
  
      reportfile, = args
      treds, df = read_treds(reportfile)
      # Prepare 5 pages, each page with 6 distributions
      treds = sorted(treds)
      count = 6
      pdfs = []
      for page in xrange(len(treds) / count + 1):
          start = page * count
          page_treds = treds[start: start + count]
          if not page_treds:
              break
          allelefreq([",".join(page_treds), "--usereport", reportfile,
                      "--nopanels", "--figsize", "12x16"])
          outpdf = "allelefreq.{}.pdf".format(page)
          sh("mv allelefreq.pdf {}".format(outpdf))
          pdfs.append(outpdf)
  
      from jcvi.formats.pdf import cat
  
      pf = op.basename(reportfile).split(".")[0]
      finalpdf = pf + ".allelefreq.pdf"
      logging.debug("Merging pdfs into `{}`".format(finalpdf))
      cat(pdfs + ["-o", finalpdf, "--cleanup"])
docs: %prog allelefreqall HN_Platinum_Gold.20180525.tsv.report.txt
  
      Plot all 30 STR allele frequencies.