Function Repository Resource:

TaxonomyCommonAncestor

Source Notebook

Find a common ancestor across taxa

Contributed by: Keiko Hirayama

ResourceFunction["TaxonomyCommonAncestor"][{species1,species2,}]

gives the common ancestor for specified speciesi entities.

ResourceFunction["TaxonomyCommonAncestor"][{species1,species2,},"Graph"]

visualizes the taxonomy graph highlighting the common ancestor for specified speciesi entities.

Details and Options

ResourceFunction["TaxonomyCommonAncestor"] finds the common ancestor on the evolutionary tree of organisms.
Vertices of the graph represent hierarchically organized taxa arranged based on taxonomic ranks.
Any "TaxonomicSpecies" entities can be used.
The number of species listed should be in the range between 2 and 100.
ResourceFunction["TaxonomyCommonAncestor"][{species1,species2,},"Graph"] takes the same options as Graph.

Examples

Basic Examples (2) 

Find a common ancestor for two specified species:

In[1]:=
ResourceFunction[
 "TaxonomyCommonAncestor"][{Entity["TaxonomicSpecies", "Anisoptera::32b96"], Entity["TaxonomicSpecies", "Coleoptera::2k86r"]}]
Out[1]=

Locate a common ancestor on the taxonomy graph:

In[2]:=
ResourceFunction[
 "TaxonomyCommonAncestor"][{Entity["TaxonomicSpecies", "Mammuthus::j5m56"], Entity["TaxonomicSpecies", "LoxodontaAfricana::qtsb3"]}, "Graph"]
Out[2]=

Scope (1) 

Find a common ancestor for multiple organisms:

In[3]:=
ResourceFunction[
 "TaxonomyCommonAncestor"][{Entity["TaxonomicSpecies", "HomoSapiens::4pydj"], Entity["TaxonomicSpecies", "FelisCatus::ddvt3"], Entity["TaxonomicSpecies", "Folivora::45r48"], Entity["TaxonomicSpecies", "Chiroptera::8zx62"], Entity["TaxonomicSpecies", "OrcinusOrca::t9226"]}]
Out[3]=

Options (1) 

Specify the layout of a graph:

In[4]:=
ResourceFunction[
 "TaxonomyCommonAncestor"][{Entity["TaxonomicSpecies", "AcinonyxJubatus::22ksf"], Entity["TaxonomicSpecies", "GiraffaCamelopardalis::y5488"]}, "Graph", GraphLayout -> "RadialEmbedding"]
Out[4]=

Possible Issues (3) 

Trying to find a common ancestor for non-species entities returns a Missing value:

In[5]:=
ResourceFunction[
 "TaxonomyCommonAncestor"][{Entity["HorseBreed", "Barb"], Entity["HorseBreed", "Arabian"]}]
Out[5]=

Trying to find a common ancestor for taxa from different domains returns a Missing value:

In[6]:=
ResourceFunction[
 "TaxonomyCommonAncestor"][{Entity["TaxonomicSpecies", "SaccharomycesCerevisiae::d3j3g"], Entity["TaxonomicSpecies", "ClostridiumBotulinum::gnd25"]}]
Out[6]=

Trying to visualize a common ancestor for the list of larger number of species may take a long time:

In[7]:=
taxa = {Entity["TaxonomicSpecies", "EucinostomusArgenteus::399c6"], Entity["TaxonomicSpecies", "FistulariaPetimbaComplexSpType01::9kjdv"], Entity["TaxonomicSpecies", "PlatycephalusOrbitalis::n5t63"], Entity["TaxonomicSpecies", "PollimyrusPetricolus::9987f"], Entity["TaxonomicSpecies", "GarraRoseae::xwn5j"], Entity["TaxonomicSpecies", "AnodusOrinocensis::p5y53"], Entity["TaxonomicSpecies", "CopadichromisVirginalis::4q7hc"], Entity["TaxonomicSpecies", "HaplochromisPhytophagus::pg3tw"], Entity["TaxonomicSpecies", "ParacanthocobitisMackenziei::93dd4"], Entity["TaxonomicSpecies", "PhallocerosTupinamba::6dzgq"], Entity["TaxonomicSpecies", "AphyosemionAurantiacum::j35t5"], Entity["TaxonomicSpecies", "NeoclinusChihiroe::9trjs"], Entity["TaxonomicSpecies", "SufflamenVerres::phd9q"], Entity["TaxonomicSpecies", "PseudobagrusEmarginatus::vt4t7"], Entity["TaxonomicSpecies", "ChromisFieldi::rc8wv"], Entity["TaxonomicSpecies", "ParaliparisRosaceus::8h5dt"], Entity["TaxonomicSpecies", "SphyraenaFlavicauda::v996r"], Entity["TaxonomicSpecies", "ScarusCoeruleus::hx938"], Entity["TaxonomicSpecies", "ChlorophthalmusPectoralis::yn9b4"], Entity["TaxonomicSpecies", "BarbusRebeli::fp3xm"], Entity["TaxonomicSpecies", "SnyderinaYamanokami::3358k"], Entity["TaxonomicSpecies", "NemadactylusBergi::22q89"], Entity["TaxonomicSpecies", "LeiopotheraponUnicolor::ryz56"], Entity["TaxonomicSpecies", "ArgyrosomusCoronus::xbq7t"], Entity["TaxonomicSpecies", "VincentiaNovaehollandiae::6t786"], Entity["TaxonomicSpecies", "MeiacanthusBundoon::ck297"], Entity["TaxonomicSpecies", "EtheostomaPercnurum::t8gpq"], Entity["TaxonomicSpecies", "PaoSuvattii::248j4"], Entity["TaxonomicSpecies", "PseudojuloidesMesostigma::v229b"], Entity["TaxonomicSpecies", "SchizothoraxPlagiostomus::r6z3t"]};
In[8]:=
ResourceFunction["TaxonomyCommonAncestor"][taxa]
Out[8]=
In[9]:=
ResourceFunction["TaxonomyCommonAncestor"][taxa, "Graph"] // AbsoluteTiming
Out[9]=

Requirements

Wolfram Language 13.0 (December 2021) or above

Version History

  • 1.1.0 – 19 January 2024
  • 1.0.0 – 10 January 2024

Related Resources

License Information