備忘録 a record of inner life

やったことや考えたこと・本・論文・音楽の備忘録。 特に環境科学・生態毒性に関して。

オルソログを教えてくれるRパッケージorthogene

異なる生物種間のオルソログを検索して紐づけてくれるRパッケージです。GitHubページはここ

使いやすくて非常に助かりました。1.5年前からBioconductorにあるみたいですが、5年くらい前にあればめちゃめちゃ使ってましたね…、

マニュアルに大抵のことは書いていますが、少しメモ。

 

 

例えば、1,637個のzebrafishの遺伝子を、メダカのオルソログに変換したい場合。

gene_medaka <- convert_orthologs(gene_df = gene_zebra,
                  gene_input = "Ensembl.Gene.ID", 
                  gene_output = "dict", 
                  input_species = "drerio",
                  output_species = "olatipes",    # medakaのこと
                  non121_strategy = "drop_both_species",
                  method="gprofiler") 

# gene_zebraはdata.frameで、"Ensembl.Gene.ID"の列にzebrafishのEnsemblのGene IDが16,37個入っている

返ってくるgene_medakaは以下。gene_outputオプションでdictを選択したため、ベクター形式で返ってきます。

head(gene_medaka)
  ENSDARG00000055504   ENSDARG00000068493   ENSDARG00000068493   ENSDARG00000069105   ENSDARG00000021838   ENSDARG00000061255 
"ENSORLG00000023573" "ENSORLG00000001225" "ENSORLG00000001238"              "fgfr4"              "rps23"             "dusp3a" 

gene_outputオプションでcolnamesを選択すると、dplyrのmutateのようにortholog_geneという新しい列にメダカのGene nameを入れて返してくれます。

返ってくるオルソログは通称名なので、Ensembl Gene IDなどに変換したければ、map_genes関数を使用します。

 

 

convert_orthologs関数のnon121_strategyオプションが微妙に迷うところ。公式のコピペは以下。

  1. "drop_both_species" : Drop genes that have duplicate mappings in either the input_species or output_species, (DEFAULT).
  2. "drop_input_species" : Only drop genes that have duplicate mappings in input_species.
  3. "drop_output_species" : Only drop genes that have duplicate mappings in the output_species.
  4. "keep_both_species" : Keep all genes regardless of whether they have duplicate mappings in either species.
  5. "keep_popular" : Return only the most “popular” interspecies ortholog mappings. This procedure tends to yield a greater number of returned genes but at the cost of many of them not being true biological 1:1 orthologs.

なおゼブラフィッシュとメダカの例では、1,637個のゼブラ遺伝子はそれぞれのオプションで (1) 1,254個、(2) 1,270個、(3)1,341個、 (4)1,400個、(5) 1,334個のメダカ遺伝子になりました。目的によって使い分ける感じでしょうか。