Hi,
The problem is that you are first creating a 'mouse mart', and then searching for the homology attributes in this - they don't exist there, from what I know.
If you want to map between, e.g., Chicken and Chimpanzee, then this is how we would do it (taken from my previous answer: Convert mouse gene ids to hamster gene ids):
[see further below for Mouse-to-Chicken]
Set-up
require(biomaRt)
listDatasets(useMart('ensembl'))
datasets[grep('gallus', datasets[,1]),]
dataset description version
73 ggallus_gene_ensembl Chicken genes (GRCg6a) GRCg6a
datasets[grep('troglodytes', datasets[,1]),]
dataset description version
162 ptroglodytes_gene_ensembl Chimpanzee genes (Pan_tro_3.0) Pan_tro_3.0
chicken <- useMart('ensembl', dataset = 'ggallus_gene_ensembl')
chimpz<- useMart('ensembl', dataset = 'ptroglodytes_gene_ensembl')
Create annotation lookup table
annot_table <- getLDS(
mart = chicken,
attributes = c('ensembl_gene_id','external_gene_name','chromosome_name'),
martL = chimpz,
attributesL = c('ensembl_gene_id','external_gene_name','chromosome_name','gene_biotype'))
head(annot_table)
Gene.stable.ID Gene.name Chromosome.scaffold.name Gene.stable.ID.1
1 ENSGALG00000048563 Z ENSPTRG00000016810
2 ENSGALG00000031424 SDC2 2 ENSPTRG00000020443
3 ENSGALG00000012395 PLEKHG1 3 ENSPTRG00000018709
4 ENSGALG00000029500 ND5 MT ENSPTRG00000042651
5 ENSGALG00000041163 ABHD17A 28 ENSPTRG00000042737
6 ENSGALG00000033404 RARG 33 ENSPTRG00000005007
Gene.name.1 Chromosome.scaffold.name.1 Gene.type
1 OSMR 5 protein_coding
2 SDC2 8 protein_coding
3 PLEKHG1 6 protein_coding
4 MT-ND5 MT protein_coding
5 1 protein_coding
6 RARG 12 protein_coding
Do a specific lookup
getLDS(
mart = chicken,
attributes = c('ensembl_gene_id','external_gene_name','chromosome_name'),
martL = chimpz,
attributesL = c('ensembl_gene_id','external_gene_name','chromosome_name','gene_biotype'),
filters = 'external_gene_name',
values = c('BRCA1', 'RAD21'))
Gene.stable.ID Gene.name Chromosome.scaffold.name Gene.stable.ID.1
1 ENSGALG00000029523 RAD21 2 ENSPTRG00000020522
2 ENSGALG00000002781 BRCA1 27 ENSPTRG00000009236
Gene.name.1 Chromosome.scaffold.name.1 Gene.type
1 RAD21 8 protein_coding
2 BRCA1 17 protein_coding
For Mouse and Chicken:
require(biomaRt)
chicken <- useMart('ensembl', dataset = 'ggallus_gene_ensembl')
mouse <- useMart('ensembl', dataset = 'mmusculus_gene_ensembl')
annot_table <- getLDS(
mart = mouse,
attributes = c('ensembl_gene_id','mgi_symbol','external_gene_name','chromosome_name'),
martL = chicken,
attributesL = c('ensembl_gene_id','external_gene_name','chromosome_name','gene_biotype'))
head(annot_table)
Gene.stable.ID MGI.symbol Gene.name Chromosome.scaffold.name
1 ENSMUSG00000026750 Psmb7 Psmb7 2
2 ENSMUSG00000064341 mt-Nd1 mt-Nd1 MT
3 ENSMUSG00000033075 Senp1 Senp1 15
4 ENSMUSG00000025855 Prkar1b Prkar1b 5
5 ENSMUSG00000004455 Ppp1cc Ppp1cc 5
6 ENSMUSG00000064351 mt-Co1 mt-Co1 MT
Gene.stable.ID.1 Gene.name.1 Chromosome.scaffold.name.1 Gene.type
1 ENSGALG00000001103 PSMB7 17 protein_coding
2 ENSGALG00000042750 ND1 MT protein_coding
3 ENSGALG00000034421 SENP1 33 protein_coding
4 ENSGALG00000003675 PRKAR1B 14 protein_coding
5 ENSGALG00000004571 PPP1CC 15 protein_coding
6 ENSGALG00000032142 MT-CO1 MT protein_coding
Keviin
Thanks you for the replay
I need a orthologus genes between mouse and chicken above mentioned method will it work
Based on previous similar questions and answers, I would say that, yes, this biomaRt funciton retrieves orthologues, where possible. Tagging Mike Smith , biomaRt developer, to confirm this, though
@Kevin Blighe Mike Smith Based on the previous thread 1 finding the orthologs method is different in a web based method we will get many attributes such as orthology type, similarity percentage between query, GOC in percentage option is available for filtering some genes to get more prominent ortholog so I was bit confused on above method.
Those entries should be there:
Kevin Blighe Thank you for your help but this is not the method I am looking for.
Then, I think that biomaRt may not be what you want, but you tagged it in your post (?) Take a look at the Ensembl REST APIs (in particular, final 2 of Comparative Genomics): https://rest.ensembl.org/