calculateQCMetrics defunct, how to calculate the quality metrics by perCellQCMetrics
Entering edit mode
otieno43 • 0
Last seen 11 days ago
United States

Hello, I am trying to follow a tutorial from Sanger institute (from May 2019) on analysis of single cell RNA Seq data. They use calculateQCMetric function to calculate the quality metrics, but when I tried the same command, I am getting an error message that calculateQCMetric is a deprecated:

sce <- calculateQCMetrics(sce, feature_controls=list(Mito=which(location=="MT")))

Error: 'calculateQCMetrics' is defunct.
Use 'perCellQCMetrics' instead.
See help("Defunct")

I tried the perCellQCMetrics instead of calculateQCMetrics, I also ended up with an error.

sce <- perCellQCMetrics(sce, feature_controls=list(Mito=which(location=="MT")))

Error in .per_cell_qc_metrics(assay(x, assay.type), subsets = subsets,  : 
  unused argument (feature_controls = list(33653:33665))

Any help on how to resolve this error, please.

sessionInfo( )
scRNAseq • 179 views
Entering edit mode

Replace feature_controls with subsets. As said below, type ?calculateQCMetrics to see the help with avaialble arguments and example code at the bottom.

Entering edit mode
Last seen 1 day ago
United States

When a function is deprecated, that usually doesn't mean that the author/maintainer just changed the name of a function. That's always possible, I suppose, but it's not really something people do. Usually what happens is the author/maintainer decides the existing function could be improved in some substantial fashion, and rather than keeping the name of the function but having it do something else (which would be confusing), the old function is deprecated with a stub to point to the new function.

But the new function is a new function! You should not think that anything about the new function is the same, and you shouldn't expect that you could simply call the new function with the old arguments. Anyway, the error you are getting is because you are calling the new function using arguments from the old function, and the new function is politely telling you that the arguments you are using (like feature_controls) aren't arguments for the new function.

See ?perCellQCMetrics

Login before adding your answer.

Traffic: 206 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6