How to label several different mitochondrial genes with non conventional names #4114
-
Hi, My species doesn't have the same labelling of mitochondrial genes as mouse or human does. So I'm trying to set the names of them. I have the list of the the mitochondrial gene names here. I've tried running ap2[["percent.mt"]] <- PercentageFeatureSet(ap2, pattern = "COX1,COX2,COX3,ND1,ND2,ND3,ND4L,ND4,ND5,ND6,CYTB,ATP6,ATP8") ap2[["percent.mt"]] <- PercentageFeatureSet(ap2, pattern = c("COX1,COX2,COX3,ND1,ND2,ND3,ND4L,ND4,ND5,ND6,CYTB,ATP6,ATP8")) ap2[["percent.mt"]] <- PercentageFeatureSet(ap2, pattern = c("COX1","COX2","COX3","ND1","ND2","ND3","ND4L","ND4","ND5","ND6","CYTB","ATP6","ATP8")) But I either get errors or it doesn't count them. I can get the above code to work if I only run one of the genes ap2[["percent.mt"]] <- PercentageFeatureSet(ap2, pattern = "COX1") But I need to be able to count all of them. Could someone point out what I'm doing wrong? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
To give a list of gene names, you need to use the |
Beta Was this translation helpful? Give feedback.
To give a list of gene names, you need to use the
features
parameter rather than thepattern
parameter.pattern
specifies a regular expression used to match feature names.