Error in measuring percentage of mit.genes
JHY_pbmc[["percent.mt"]] <- PercentageFeatureSet(JHY_pbmc,
features = c("gene-nad5","gene-nad1",
"gene-nad2","gene-nad4",
"gene-nad7","gene-cox1",
"gene-cox2","gene-ccmFc2"),
assay = 'RNA')
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'colSums': invalid character indexing
• 1,390 views
•
link
1 answer
I had the same error and following what jared.andrews07 suggested, I only passed present gene_ids as features and it worked fine. Here is how I did it:
data <- PercentageFeatureSet(data, features = mito_genes[mito_genes %in% rownames(data)], col.name = "percent_mito", assay = 'RNA')
• 0 views
•
link
Log in to answer this question.
What does the following return?