<p>You can use the <code>group.by</code> argument of the <code>DimPlot()</code> function. <code>group.by</code> accepts column names present in the <code>meta.data</code> column of the Seurat objects.</p>

CC BY-SA 4.0
2020-02-05T17:26:21.903Z
How do I add the sample and cell cycle regression information to the metadata?
mmpp
CC BY-SA 4.0
2020-02-05T19:33:27.950Z
`Seurat::CellCycleScoring()` stores the cell cycle information in the `meta.data` slot. Sample information can be added with `Seurat::AddMetaData()`.
haci
CC BY-SA 4.0
2020-07-03T21:39:43.980Z
The other useful line for DimPlot (or FeaturePlot) is "split.by", which will make separate plots for each sample or whatever all side by side.
swbarnes2
CC BY-SA 4.0
2020-02-04T19:30:58.680Z
2020-02-04T19:30:58.680Z
haci
<p>I'm trying to show cell cycle regression and input sample metadata to my umap. </p>

<p>I've been following Satija Lab's tutorials and have generated my umap but now want to specify which sample corresponds to each cluster, if one sample is driving a certain cluster, etc. I also, would like yo show cell cycle regression in each cluster. I following the cell cycle regression tutorial but that only tells me the board overview of the cells in each cycle. I would want to highlight it in the umap. </p>

<p>How would I go about each of these tasks?</p>

<scrnaseq><seurat>
Seurat clusters
# Seurat clusters

(Asked by: username_0 on 2020-02-04)

I'm trying to show cell cycle regression and input sample metadata to my umap.

I've been following Satija Lab's tutorials and have generated my umap but now want to specify which sample corresponds to each cluster, if one sample is driving a certain cluster, etc. I also, would like yo show cell cycle regression in each cluster. I following the cell cycle regression tutorial but that only tells me the board overview of the cells in each cycle. I would want to highlight it in the umap.

How would I go about each of these tasks?

**Tags:** scrnaseq, seurat

---

## 1 answers

### Answer by username_1 on 2020-02-04. Score: 1

You can use the `group.by` argument of the `DimPlot()` function. `group.by` accepts column names present in the `meta.data` column of the Seurat objects.

> **Comments:**
> **username_0**: How do I add the sample and cell cycle regression information to the metadata?  
> **username_1**: `Seurat::CellCycleScoring()` stores the cell cycle information in the `meta.data` slot. Sample information can be added with `Seurat::AddMetaData()`.  
> **username_2**: The other useful line for DimPlot (or FeaturePlot) is "split.by", which will make separate plots for each sample or whatever all side by side.  

---

