code: def rdotplot(args):
      
      p = OptionParser(rdotplot.__doc__)
      opts, args = p.parse_args(args)
  
      if len(args) != 1:
          sys.exit(not p.print_help())
  
      dotplot_template = """
      dots <- read.table('$rdotplotfile', header=T)
      png('$pngfile')
      plot(dots, type='l')
      dev.off()
      """
  
      rdotplotfile, = args
      assert rdotplotfile.endswith(".rdotplot")
      pngfile = rdotplotfile.replace(".rdotplot", ".png")
  
      rtemplate = RTemplate(dotplot_template, locals())
      rtemplate.run()
docs: %prog rdotplotfile
  
      Dot plot to visualize relationship between two sequences, by plotting
      .rdotplot file (often generated by LASTZ)