1
$\begingroup$

I'm trying to convert mouse genes from PTX data to human genes in order to do a comparison with patient data to see what genes are being conserved. I'm using this file for the orthologs. http://www.informatics.jax.org/downloads/reports/HOM_MouseHumanSequence.rpt

I read the table with:

gene_conversion <- read.table("HOM_MouseHumanSequence.rpt.txt", sep="\t", header=T, fill=T)

I have subsetted the mouse genes from the PTX seurat object to only include the mouse genes with:

mouse_only <- subset(scData, features = mouse_1)
head(rownames(mouse_only))
[1] "Xkr4"    "Gm37180" "Gm37363" "Gm19938" "Sox17"   "Gm6085" 

Now I'm not sure how to convert the mouse genes in my mouse-only seurat object to match the human genes in the file.

Any help would be greatly appreciated.

$\endgroup$
4
  • $\begingroup$ Just checking / confirming... shouldn't that be a double equals in the subset command? are you using features == mouse_1? $\endgroup$
    – gringer
    Aug 5 at 8:49
  • 1
    $\begingroup$ No, just a single equals. When I run the command with double I get an error. subset(scData, features == mouse_1) Error in FetchData(object = object, vars = unique(x = expr.char[vars.use]), : None of the requested variables were found: $\endgroup$
    – mmpp
    Aug 5 at 14:00
  • $\begingroup$ Oh, I see now! Thanks. This seems to be an undocumented / new feature of subset that I haven't encountered before. $\endgroup$
    – gringer
    Aug 5 at 20:52
  • $\begingroup$ Any suggestions on how to continue? $\endgroup$
    – mmpp
    Aug 5 at 21:08
1
$\begingroup$

Mice genes are usually the same as the human ones, but lower case with only the first character as upper (Sox17 -> SOX17). toupper(rownames(mouse_only)) will do the trick.

Unfortunately, there are exceptions, and it is always better to relay on information from databases. The function bellow takes a vector of human genes, and uses biomaRt to return the corresponding genes in mouse.

# from Human to Mouse
convertHumanGeneList <- function(x){

   library("biomaRt")
   human <- useMart("ensembl", dataset = "hsapiens_gene_ensembl")
   mouse <- useMart("ensembl", dataset = "mmusculus_gene_ensembl")

   genesV2 <- getLDS(attributes = c("hgnc_symbol"), filters = "hgnc_symbol", 
                 values = x , mart = human, attributesL = c("mgi_symbol"), martL = mouse, uniqueRows=T)

   humanx <- unique(genesV2[, 2])

   return(humanx)
}

You simply need to invert the 2 and you should be able to convert your vector rownames(mouse_only)

#---- Update using SOX17 as example enter image description here

$\endgroup$
4
  • $\begingroup$ That didn't work. genesV2 is empty. $\endgroup$
    – mmpp
    Aug 5 at 21:07
  • $\begingroup$ Works for me. I added a figure in my answer to show you the output I get $\endgroup$
    – fra
    Aug 5 at 21:30
  • $\begingroup$ Figured out the issue, I didn't assign x a value. Now that I have the human genes, how can I do a correlation between the mouse genes from the PTX data vs the genes from patient data? $\endgroup$
    – mmpp
    Aug 5 at 21:59
  • $\begingroup$ That's probably a topic for another question :D. You should accept the answer (if you managed to convert the genes name), and open a different topic. $\endgroup$
    – fra
    Aug 6 at 18:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.