text: user2005: 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?
  
  user2005: 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. 
  
original_text: 2005: <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>
   2005: <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>
  