Closed Sophia409 closed 3 years ago
Hi Sophia,
1) The reason that getLDS()
fails with mmc57bl6nj_gene_ensembl
is because you're trying to use two different Marts (think of each Mart as a collection of datasets) and you can only use getLDS()
to run joint queries on datasets that are in the same Mart.
Notice that in the query that works you use useMart("ensembl", ...)
both times, but for the C57BL6 strain you have to use useMart("ENSEMBL_MART_MOUSE", ...)
. This first argument is the mart, and it needs to be the same if you want to run getLDS()
. You can check the available datasets in a Mart with listDatasets()
. Here we can see the "ENSEMBL_MART_MOUSE" only contains information on mice, and so it's not possible to query between macaque and a specific mouse strain:
mouse = useMart("ENSEMBL_MART_MOUSE", dataset = "mmc57bl6nj_gene_ensembl")
listDatasets(mouse)
#> dataset description
#> 1 mm129s1svimj_gene_ensembl Mouse 129S1/SvImJ genes (129S1_SvImJ_v1)
#> 2 mmaj_gene_ensembl Mouse A/J genes (A_J_v1)
#> 3 mmakrj_gene_ensembl Mouse AKR/J genes (AKR_J_v1)
#> 4 mmbalbcj_gene_ensembl Mouse BALB/cJ genes (BALB_cJ_v1)
#> 5 mmc3hhej_gene_ensembl Mouse C3H/HeJ genes (C3H_HeJ_v1)
#> 6 mmc57bl6nj_gene_ensembl Mouse C57BL/6NJ genes (C57BL_6NJ_v1)
#> 7 mmcasteij_gene_ensembl Mouse CAST/EiJ genes (CAST_EiJ_v1)
#> 8 mmcbaj_gene_ensembl Mouse CBA/J genes (CBA_J_v1)
#> 9 mmdba2j_gene_ensembl Mouse DBA/2J genes (DBA_2J_v1)
#> 10 mmfvbnj_gene_ensembl Mouse FVB/NJ genes (FVB_NJ_v1)
#> 11 mmlpj_gene_ensembl Mouse LP/J genes (LP_J_v1)
#> 12 mmnodshiltj_gene_ensembl Mouse NOD/ShiLtJ genes (NOD_ShiLtJ_v1)
#> 13 mmnzohlltj_gene_ensembl Mouse NZO/HlLtJ genes (NZO_HlLtJ_v1)
#> 14 mmpwkphj_gene_ensembl Mouse PWK/PhJ genes (PWK_PhJ_v1)
#> 15 mmwsbeij_gene_ensembl Mouse WSB/EiJ genes (WSB_EiJ_v1)
2) The mmusculus_gene_ensembl
dataset is a generic 'mouse' genome, where as the mmc57bl6nj_gene_ensembl
is specifically for that strain of mice. If you were working with and comparing data from multiple mice strains you might want to use the Ensembl dataset specific to those strains, as the genetic differences between strains is presumably quite small and you may miss things if relying on the 'average' mouse dataset. However, it looks like you're comparing mouse with macaque and I would have thought that the standard mouse genome would be sufficient to find a mapping between those two.
3) I think the issue with Fabp7 being dropped is probably related to using the hgnc_symbol
attribute for Macaque. Typically HGNC symbols related to the Human Genome in the same way that MGI symbols are Mouse Genome. I don't know how/why Ensembl assigned some HGNC symbols to Macque genes, but it looks like it's not a comprehensive assignment. You might have more luck if you use the external_gene_name
attribute instead e.g.
library(biomaRt)
mouse = useMart("ensembl", dataset = "mmusculus_gene_ensembl")
macaque = useMart("ensembl", dataset = "mfascicularis_gene_ensembl")
x <- c("Fabp7", "Tlx3", "Gzmb")
genesV2 = getLDS(attributes = c("mgi_symbol"), filters = "mgi_symbol", values = x , mart = mouse,
attributesL = c("external_gene_name"), martL = macaque, uniqueRows=T)
genesV2
#> MGI.symbol Gene.name
#> 1 Tlx3 TLX3
#> 2 Fabp7 FABP7
#> 3 Gzmb GZMB
Hello,
Thank you for your work in this package.
I wanted to find a gene ortholog table between mouse and Macaca fascicularis. Unfortunately, I met some difficulties and could't find the solution.
First, I'm wondering why getLDS function failed when I changed biomart database from mmusculus_gene_ensembl to mmc57bl6nj_gene_ensembl. I searched the attributes list of mmc57bl6nj_gene_ensembl and confirmed the existence of mgi_symbol.
Second, what is the difference between database mmusculus_gene_ensembl and mmc57bl6nj_gene_ensembl? My sc-RNAseq data derived from C57BL6 mice. So in my view, mmc57bl6nj_gene_ensembl should be suitable for my analysis though most of code I searched on the internet chose mmc57bl6nj_gene_ensembl for analysis. What's your advice on it?
Third, mouse gene Fabp7 could't be translated to macaque ortholog genes. This really troubled me because I'm sure this gene (FABP7) was expressed in my macaque sc-RNAseq data. What's the reason?
I'm looking forward to your reply. Sophia