人与小鼠基因名称互相转换

在R中,如需对人和小鼠的基因名进行互相转换,可以使用biomaRt程序包。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
> library(biomaRt)
> human <- useMart("ensembl",dataset="hsapiens_gene_ensembl")
> mouse <- useMart("ensembl",dataset="mmusculus_gene_ensembl")
# 可以查看Attributes
> head(listAttributes(mouse),100)[,1]
[1] "ensembl_gene_id" "ensembl_gene_id_version"
[3] "ensembl_transcript_id" "ensembl_transcript_id_version"
[5] "ensembl_peptide_id" "ensembl_peptide_id_version"
[7] "ensembl_exon_id" "description"
[9] "chromosome_name" "start_position"
[11] "end_position" "strand"
[13] "band" "transcript_start"
[15] "transcript_end" "transcription_start_site"
[17] "transcript_length" "transcript_tsl"
[19] "transcript_gencode_basic" "transcript_appris"
[21] "external_gene_name" "external_gene_source"
[23] "external_transcript_name" "external_transcript_source_name"
[25] "transcript_count" "percentage_gene_gc_content"
[27] "gene_biotype" "transcript_biotype"
[29] "source" "transcript_source"
[31] "version" "transcript_version"
[33] "peptide_version" "external_synonym"
[35] "phenotype_description" "source_name"
[37] "study_external_id" "strain_name"
[39] "strain_gender" "p_value"
[41] "go_id" "name_1006"
[43] "definition_1006" "go_linkage_type"
[45] "namespace_1003" "goslim_goa_accession"
[47] "goslim_goa_description" "ccds"
[49] "chembl" "clone_based_ensembl_gene"
[51] "clone_based_ensembl_transcript" "entrezgene_trans_name"
[53] "embl" "arrayexpress"
[55] "genedb" "ottg"
[57] "ottt" "ottp"
[59] "hgnc_id" "hgnc_symbol"
[61] "protein_id" "kegg_enzyme"
[63] "merops" "mgi_description"
[65] "mgi_symbol" "mgi_id"
[67] "mgi_trans_name" "mirbase_accession"
[69] "mirbase_id" "entrezgene_description"
[71] "entrezgene_accession" "entrezgene_id"
[73] "pdb" "reactome"
[75] "reactome_gene" "refseq_mrna"
[77] "refseq_mrna_predicted" "refseq_ncrna"
[79] "refseq_ncrna_predicted" "refseq_peptide"
[81] "refseq_peptide_predicted" "rfam"
[83] "rnacentral" "hgnc_trans_name"
[85] "ucsc" "uniparc"
[87] "uniprot_gn_symbol" "uniprot_gn_id"
[89] "uniprotswissprot" "uniprotsptrembl"
[91] "vega_gene" "vega_transcript"
[93] "vega_translation" "wikigene_description"
[95] "wikigene_name" "wikigene_id"
[97] "affy_mg_u74a" "affy_mg_u74av2"
[99] "affy_mg_u74b" "affy_mg_u74bv2"
# 基因名称对应的Attributes在小鼠中是"mgi_symbol",在人中是"hgnc_symbol"
> geneHs = c("TP53","TSC1")
# 上面是人的三个基因名称,如需转换成小鼠基因,使用如下语法:
> geneMm <- getLDS(attributes = "hgnc_symbol",filters="hgnc_symbol",values=geneHs,mart=human,attributesL = "mgi_symbol",martL=mouse,uniqueRows = TRUE)
> geneMm
HGNC.symbol MGI.symbol
1 TSC1 Tsc1
2 TP53 Trp53
# 同理,如需将小鼠基因转成人的基因,不举例子
> geneHs <- getLDS(attributes = "mgi_symbol",filters="mgi_symbol",values=genes,mart=mouse,attributesL = "hgnc_symbol",martL=human,uniqueRows = TRUE)
  • 本文作者:括囊无誉
  • 本文链接: R/gene-symbol-trans/
  • 版权声明: 本博客所有文章均为原创作品,转载请注明出处!
------ 本文结束 ------
坚持原创文章分享,您的支持将鼓励我继续创作!