This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## initially based on orthologsBioMART::findOrthologs from https://github.com/vitkl/orthologsBioMART | |
## boiled down to essentially reproduce and extend this table: ProjecTILs::Hs2Mm.convert.table | |
features <- c() # select human features to find orthologs for; e.g. rownames(Seurat::GetAssayData(SO, slot = "data", assay = "RNA")) | |
# use biomart to map orthologs | |
hs_mart <- biomaRt::useMart("ensembl", dataset="hsapiens_gene_ensembl") | |
#mm_mart <- biomaRt::useMart("ensembl", dataset="mmusculus_gene_ensembl") # not needed | |
hs_ids <- biomaRt::getBM(attributes = unique(c("hgnc_symbol", "ensembl_gene_id")), |