<p>Just posted the question and found out why the error was happening. I had two datasets: raw, and filtered one with half of the rows as raw. I did normalization on the filtered one. Then I calculated <code>is.mito</code> using the unfiltered, raw dataset. So, it produced indexes that were outside of the range of the dataset. </p>

CC BY-SA 3.0
2018-01-05T18:11:05.347Z
2018-01-05T18:11:05.347Z
Nikita Vlasenko
<p>After normalization the way it is described here: </p>

<p><a href="https://bioconductor.org/packages/3.7/bioc/vignettes/scran/inst/doc/scran.html" rel="nofollow noreferrer">https://bioconductor.org/packages/3.7/bioc/vignettes/scran/inst/doc/scran.html</a></p>

<p>Using <code>quickCluster()</code> function and running <code>computeSumFactors()</code> I am trying to run <code>calculateQCMetrics()</code> the way it is described here:</p>

<p><a href="https://f1000research.com/articles/5-2122/v2" rel="nofollow noreferrer">https://f1000research.com/articles/5-2122/v2</a></p>

<pre><code>sce &lt;- calculateQCMetrics(sce, feature_controls=list(Mt=is.mito))
</code></pre>

<p>And I am getting an error:</p>

<blockquote>
  <p>Error in .checkedCall(cxx_colsum_subset, exprs_mat, is_feature_control) : 
    subset indices out of range</p>
</blockquote>

<p>Does anybody know how to correct it? What is going wrong here?</p>

<r><scrnaseq><scran>
Error in .checkedCall : subset indices out of range
# Error in .checkedCall : subset indices out of range

(Asked by: username_0 on 2018-01-05)

After normalization the way it is described here: 
https://bioconductor.org/packages/3.7/bioc/vignettes/scran/inst/doc/scran.html
Using quickCluster() function and running computeSumFactors() I am trying to run calculateQCMetrics() the way it is described here:
https://f1000research.com/articles/5-2122/v2
sce <- calculateQCMetrics(sce, feature_controls=list(Mt=is.mito))

And I am getting an error:

Error in .checkedCall(cxx_colsum_subset, exprs_mat, is_feature_control) : 
    subset indices out of range

Does anybody know how to correct it? What is going wrong here?

**Tags:** r, scrnaseq, scran

---

## 1 answers

### Answer by username_0 on 2018-01-05. Score: 2 | Accepted answer

Just posted the question and found out why the error was happening. I had two datasets: raw, and filtered one with half of the rows as raw. I did normalization on the filtered one. Then I calculated `is.mito` using the unfiltered, raw dataset. So, it produced indexes that were outside of the range of the dataset.


---

