This package is used to get 1:1 orthologs based on MGI homology data from http://www.informatics.jax.org/homology.shtml

The data is processed within the package but for key species comparisons is also stored in the data

Get the homolog data

library(One2One)

# Download and format the homolog data from MGI
allHomologs = load.homologs()

# Get data on orthology between the two species
species1="human"
species2="mouse"
ortholog_data = analyse.orthology(species1,species2,allHomologs)

# Check the 1:1 homologs
print(ortholog_data$orthologs_one2one[1:10,])

Analyse differences in orthology using EWCE

# Load EWCE package
#install.packages("devtools")
#library(devtools)
#install_github("nathanskene/ewce")
library(EWCE)
data(ctd)



homoIDs_bg     = ortholog_data$species2_allGenes
symbols_bg     = get.symbol.from.homologID(homoIDs_bg,species1,species2,ortholog_data,species2)

# Which cell types are associated with genes deleted in humans, but present in mice?
homoIDs_target = ortholog_data$species2_present_species1_deleted
symbols_target = get.symbol.from.homologID(homoIDs_target,species1,species2,ortholog_data,species2)
full_results = bootstrap.enrichment.test(sct_data=ctd,hits=symbols_target,bg=symbols_bg,reps=1000,annotLevel=2)
print(ewce.plot(full_results$results,mtc_method="BH"))

# Which cell types are associated with genes duplicated in humans, but singletons in mice?
homoIDs_target = ortholog_data$species2_onceOnly_species1_dup
symbols_target = get.symbol.from.homologID(homoIDs_target,species1,species2,ortholog_data,species2)
full_results = bootstrap.enrichment.test(sct_data=ctd,hits=symbols_target,bg=symbols_bg,reps=1000,annotLevel=2)
print(ewce.plot(full_results$results,mtc_method="BH"))

# Which cell types are associated with genes duplicated in mice, but singletons in human?
homoIDs_target = ortholog_data$species1_onceOnly_species2_dup
symbols_target = get.symbol.from.homologID(homoIDs_target,species1,species2,ortholog_data,species2)
full_results = bootstrap.enrichment.test(sct_data=ctd,hits=symbols_target,bg=symbols_bg,reps=1000,annotLevel=2)
print(ewce.plot(full_results$results,mtc_method="BH"))

# Which cell types are associated with genes duplicated in mice and humans?
homoIDs_target = ortholog_data$species2_dup_species1_dup
symbols_target = get.symbol.from.homologID(homoIDs_target,species1,species2,ortholog_data,species2)
full_results = bootstrap.enrichment.test(sct_data=ctd,hits=symbols_target,bg=symbols_bg,reps=1000,annotLevel=2)
print(ewce.plot(full_results$results,mtc_method="BH"))


NathanSkene/One2One documentation built on July 14, 2021, 7:48 a.m.