def deseqPlotGeneHeatmap(outfile,
                         data,
                         Rowv=False,
                         Colv=False):
    '''plot a heatmap of all genes

    Use variance stabilized data in object vsd.
    Should be 'blind', as then the transform is
    not informed by the experimental design.
    '''
    if len(data) == 0:
        return

    # do not print if not enough values in one
    # direction (single row or column)
    if 2 < min(R.dim(data)):
        return

    R.png(outfile, width=500, height=2000)
    hmcol = R.colorRampPalette(R['brewer.pal'](9, "GnBu"))(100)

    R['heatmap.2'](
        data,
        col=hmcol,
        trace="none",
        dendrogram="none",
        Rowv=Rowv,
        Colv=Colv,
        labRow=False,
        margin=ro.IntVector((5, 5)),
        lhei=ro.IntVector((1, 10)),
        key=False)

    R['dev.off']()
dataset/ETHPy150Open CGATOxford/cgat/CGAT/Expression.py/deseqPlotGeneHeatmap/swapped operands of `<`