How to refer to gene names in Seurat::PercentageFeatureSet()?
1
0
Entering edit mode
2.3 years ago
fifty_fifty ▴ 60

I have 10x scRNA-seq data for a dog. The genes are in ensembl id format. I converted them to gene symbols using biomaRt and added to the Seurat features metadata like this:

HCC1@assays$RNA@meta.features <- merge(HCC1@assays$RNA@meta.features, gfile, by=0, all.x=TRUE)

So my HCC1@assays$RNA@meta.features looks like this

enter image description here

The reason why I do not want to convert features into gene symbols right away is that there are many duplicate gene symbols after conversion. That is why I want to use gene symbols in the end for annotation only.

However, for quality control purposes I need gene names (to find percentages of mitochondrial and ribosomal genes).

Is there a way to refer to the gene names when using PercentageFeatureSet? For example in this line:

HCC1[["percent.rb"]] <- PercentageFeatureSet(HCC1, pattern="^MT-")
r seurat scRNA-seq • 1.6k views
ADD COMMENT
1
Entering edit mode
2.3 years ago

You can provide the features to use directly via the features parameter of PercentageFeatureSet. So grab whatever gene names match your pattern, get the row name, and feed those in. See ?PercentageFeatureSet for details.

ADD COMMENT

Login before adding your answer.

Traffic: 2722 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