Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-26T22:14:45.360Z
Answers.Text: Didn't work for me. I don't know what I did wrong.
Answers.UserDisplayName: ROCIO DIAZ
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-12-27T22:01:19.093Z
Answers.Text: 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
Answers.UserDisplayName: Chris S.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-04T21:31:07.393Z
Answers.LastActivityDate: 2020-12-04T21:31:07.393Z
Answers.UserDisplayName: TimStuart
Body: <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>
  
Tags: <seurat><single-cell>
Title: How do I change the identity of a sample from spatial 'Visium' data preprocessing in Seurat v3?
ThreadText: # 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!!
  
  [![Plot output showing the "SeuratProject" Identity](https://i.sstatic.net/wAfo2.png)](https://i.sstatic.net/wAfo2.png)
  
  **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:
  
  ```r
  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  
  
  ---
  
  