title: How to reorder cells in DoHeatmap plot in Seurat (ggplot2)
body: <p>I'm plotting a heatmap with Seurat in R</p>
  
  <pre><code>require(Seurat)
  data &lt;- data.frame(cell1=c(-0.5, 0.5), cell2=c(-0.8, 0.3), cell3=c(2.0, 0.1), cell4=c(1.0, 1.0))
  rownames(data) &lt;- c("gene1", "gene2")
  test &lt;- CreateSeuratObject(data)
  test@scale.data &lt;- data
  DoHeatmap(test)
  </code></pre>
  
  <p>And this is what I get</p>
  
  <p><a href="https://i.stack.imgur.com/ZxX9L.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZxX9L.png" alt="heatmap result"></a></p>
  
  <p>I want to reorder cells here with custom order.
  I have tried <code>DoHeatmap(test, data.use=&lt;reordered data&gt;)</code> and <code>p &lt;- DoHeatmap(…, plot=FALSE)</code> and then reordering <code>p$data</code>, but to no avail</p>