Is that possible that the percent.mito level is zero? I have done vlnplot and it shows that its percent.mito level is zero. Does that mean my mitochondrial gene didn't detect?
I've just come across a similar issue. It seems the mouse and human mitochondrial genes use mixed capitalizations. See the following PR for details:
Bottom line is, if you ignore the case in the grep pattern it might work (assuming you use human/mouse):
mito.genes <- grep("^mt-", rownames(shox2crepos_mtmg@data), value=TRUE, ignore.case=TRUE)
The simplest answer is that the bit of code you copied from the Seurat vignette is not working on the gene names you have. Look at the code. If none of your gene names begin with "MT-", none will be identified as mitochondrial.