<pre><code>your_new_object &lt;- subset(your_object, subset = mapping.score &gt; 0.5)
</code></pre>

CC BY-SA 4.0
2021-07-16T10:56:42.823Z
2021-07-16T10:56:42.823Z
haci
<p>I metadata slot of Seurat object I have mapping score of each cell to a reference PBMC data like</p>
<pre><code>pbmc &lt;- subset(object, subset = object@meta.data$mapping.score &gt; 0.5)
Error in FetchData(object = object, vars = unique(x = expr.char[vars.use]),  : 
  None of the requested variables were found: 
&gt; 
&gt; 
&gt; 
</code></pre>
<p>I want to only keep cells with mapping score &gt; 0.5</p>
<p>Any help please?</p>

<scrnaseq><seurat><10x-genomics>
Filtering cells from values in metadata
# Filtering cells from values in metadata

(Asked by: username_0 on 2021-07-16)

I metadata slot of Seurat object I have mapping score of each cell to a reference PBMC data like
pbmc <- subset(object, subset = object@meta.data$mapping.score > 0.5)
Error in FetchData(object = object, vars = unique(x = expr.char[vars.use]),  : 
  None of the requested variables were found: 
> 
> 
> 

I want to only keep cells with mapping score > 0.5
Any help please?

**Tags:** scrnaseq, seurat, 10x-genomics

---

## 1 answers

### Answer by username_1 on 2021-07-16. Score: 1

your_new_object <- subset(your_object, subset = mapping.score > 0.5)


---

