original_docstring: Draw ANIb/ANIm/TETRA results
  
      - results - tuple of dataframes from ANIb analysis
      
docstring: Draw ANIb/ANIm/TETRA results
  results - tuple of dataframes from ANIb analysis
docstring_tokens: Draw ANIb / ANIm / TETRA results results - tuple of dataframes from ANIb analysis
code: def draw(results, filestems, gformat):
      """Draw ANIb/ANIm/TETRA results
  
      - results - tuple of dataframes from ANIb analysis
      """
      # Draw heatmaps
      for df, filestem in zip(results, filestems):
          fullstem = os.path.join(args.outdirname, filestem)
          outfilename = fullstem + '.%s' % gformat
          infilename = fullstem + '.tab'
          logger.info("Writing heatmap to %s" % outfilename)
          if args.gmethod == "mpl":
              pyani_graphics.heatmap_mpl(df, outfilename=outfilename,
                                         title=filestem,
                                         cmap=params_mpl(df)[filestem][0],
                                         vmin=params_mpl(df)[filestem][1],
                                         vmax=params_mpl(df)[filestem][2],
                                         labels=get_labels(args.labels),
                                         classes=get_labels(args.classes))
          elif args.gmethod == "R":
              rstr = pyani_graphics.heatmap_r(infilename, outfilename,
                                              gformat=gformat.lower(),
                                              title=filestem,
                                              cmap=params_r(df)[filestem][0],
                                              vmin=params_r(df)[filestem][1],
                                              vmax=params_r(df)[filestem][2],
                                              labels=get_labels(args.labels),
                                              classes=get_labels(args.classes))
              logger.info("Executed R code:\n%s" % rstr)
code_tokens: def draw ( results , filestems , gformat ) : for df , filestem in zip ( results , filestems ) : fullstem = os . path . join ( args . outdirname , filestem ) outfilename = fullstem + '.%s' % gformat infilename = fullstem + '.tab' logger . info ( "Writing heatmap to %s" % outfilename ) if args . gmethod == "mpl" : pyani_graphics . heatmap_mpl ( df , outfilename = outfilename , title = filestem , cmap = params_mpl ( df ) [ filestem ] [ 0 ] , vmin = params_mpl ( df ) [ filestem ] [ 1 ] , vmax = params_mpl ( df ) [ filestem ] [ 2 ] , labels = get_labels ( args . labels ) , classes = get_labels ( args . classes ) ) elif args . gmethod == "R" : rstr = pyani_graphics . heatmap_r ( infilename , outfilename , gformat = gformat . lower ( ) , title = filestem , cmap = params_r ( df ) [ filestem ] [ 0 ] , vmin = params_r ( df ) [ filestem ] [ 1 ] , vmax = params_r ( df ) [ filestem ] [ 2 ] , labels = get_labels ( args . labels ) , classes = get_labels ( args . classes ) ) logger . info ( "Executed R code:\n%s" % rstr )
short_docstring: Draw ANIb/ANIm/TETRA results
   results - tuple of dataframes from ANIb analysis
short_docstring_tokens: Draw ANIb / ANIm / TETRA results results - tuple of dataframes from ANIb analysis
comment: """Draw ANIb/ANIm/TETRA results
  
      - results - tuple of dataframes from ANIb analysis
      """$SEP$# Draw heatmaps