calculateQCMetrics defunct, how to calculate the quality metrics by perCellQCMetrics
1
0
Entering edit mode
otieno43 • 0
@aa5bab85
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:
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.

Erick
sessionInfo( )
scRNAseq • 179 views
ADD COMMENT
0
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.

ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
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
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6