<p>You can re-assign <code>orig.ident</code> after creating the object. For example:</p>
<pre class="lang-r prettyprint-override"><code>brain1 &lt;-Load10X_Spatial(data.dir = &quot;~/xxx&quot;, filename = &quot;filtered_feature_bc_matrix.h5&quot;, assay = &quot;Spatial&quot;, slice = &quot;slice1&quot;, filter.matrix = TRUE, to.upper = FALSE)
brain1$orig.ident &lt;- &quot;Visium&quot;
</code></pre>

CC BY-SA 4.0
2021-08-26T22:14:45.360Z
Didn't work for me. I don't know what I did wrong.
ROCIO DIAZ
CC BY-SA 4.0
2023-12-27T22:01:19.093Z
The active.ident is still "SeuratProject", so also add Idents(brain1) <- "Visium".  There should be a "project" option in Load_10X_Spatial to change the "SeuratProject" default
Chris S.
CC BY-SA 4.0
2020-12-04T21:31:07.393Z
2020-12-04T21:31:07.393Z
TimStuart
<p>I'm wanting to create a merged object in Seurat using 2 10x Visium 'slices'. However, when I create an object, Seurat assigns an identity &quot;SeuratProject&quot; to the objects (by default I'm guessing; see attached plot). This will be problematic when I attempt to merge the objects as there will be unintended duplicates of the objects.</p>
<p>Here's what I'm attempting to use to create the 10x Spatial Object:</p>
<pre><code>brain1 &lt;- Load10X_Spatial(data.dir = &quot;~/xxx&quot;, filename = &quot;filtered_feature_bc_matrix.h5&quot;, assay = &quot;Spatial&quot;, slice = &quot;slice1&quot;, filter.matrix = TRUE, to.upper = FALSE)
</code></pre>
<p>I'd need the ability to assign unique ident to each of these (and any subsequent) slices/data.</p>
<p>Thank you!!</p>
<p><a href="https://i.sstatic.net/wAfo2.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/wAfo2.png" alt="Plot output showing the &quot;SeuratProject&quot; Identity" /></a></p>

<seurat><single-cell>
How do I change the identity of a sample from spatial 'Visium' data preprocessing in Seurat v3?
# How do I change the identity of a sample from spatial 'Visium' data preprocessing in Seurat v3?

(Asked by: username_0 on 2020-12-03)

I'm wanting to create a merged object in Seurat using 2 10x Visium 'slices'. However, when I create an object, Seurat assigns an identity "SeuratProject" to the objects (by default I'm guessing; see attached plot). This will be problematic when I attempt to merge the objects as there will be unintended duplicates of the objects.
Here's what I'm attempting to use to create the 10x Spatial Object:
brain1 <- Load10X_Spatial(data.dir = "~/xxx", filename = "filtered_feature_bc_matrix.h5", assay = "Spatial", slice = "slice1", filter.matrix = TRUE, to.upper = FALSE)

I'd need the ability to assign unique ident to each of these (and any subsequent) slices/data.
Thank you!!

**Tags:** seurat, single-cell

---

## 1 answers

### Answer by username_1 on 2020-12-04. Score: 1 | Accepted answer

You can re-assign orig.ident after creating the object. For example:
brain1 <-Load10X_Spatial(data.dir = "~/xxx", filename = "filtered_feature_bc_matrix.h5", assay = "Spatial", slice = "slice1", filter.matrix = TRUE, to.upper = FALSE)
brain1$orig.ident <- "Visium"

> **Comments:**
> **username_2**: Didn't work for me. I don't know what I did wrong.  
> **username_3**: The active.ident is still "SeuratProject", so also add Idents(brain1) <- "Visium".  There should be a "project" option in Load_10X_Spatial to change the "SeuratProject" default  

---

