New Biology Content in the Wolfram Language

Keiko Hirayama, Lina Marcela Ruiz Galvis, Carlos Muñoz Amezcua

Wolfram|Alpha Scientific Content Group

(RowDefault[, (Spacer1), , (Spacer1), ])  #WolframTechConf

Outline

(Canvas[(CanvasFrame)])

Overview of taxonomy data

Species data in the Wolfram Language

New Species data is based on NCBI (National Center for Biotechnology Information) Taxonomy Database

Provides scientific/common names, hierarchical relation information of near ~2 million taxa

More detailed secondary rank taxa information is available

EntityValue[(Entity[(RowWithSeparator[ , "elephants", (EntitySublabel["animal"])]), Entity["TaxonomicSpecies","Elephantidae::2jfrp"], "Entity[\"TaxonomicSpecies\", \"Elephantidae::2jfrp\"]", "taxonomic species"]),(EntityProperty["primary taxonomic sequence", EntityProperty["TaxonomicSpecies","PrimaryTaxonomicSequence"], "EntityProperty[\"TaxonomicSpecies\", \"PrimaryTaxonomicSequence\"]"])]

EntityValue[(Entity[(RowWithSeparator[ , "elephants", (EntitySublabel["animal"])]), Entity["TaxonomicSpecies","Elephantidae::2jfrp"], "Entity[\"TaxonomicSpecies\", \"Elephantidae::2jfrp\"]", "taxonomic species"]),(EntityProperty["taxonomic sequence", EntityProperty["TaxonomicSpecies","TaxonomicSequence"], "EntityProperty[\"TaxonomicSpecies\", \"TaxonomicSequence\"]"])]

EntityValue[(Entity[(RowWithSeparator[ , "elephants", (EntitySublabel["animal"])]), Entity["TaxonomicSpecies","Elephantidae::2jfrp"], "Entity[\"TaxonomicSpecies\", \"Elephantidae::2jfrp\"]", "taxonomic species"]),"TaxonomyGraph"]

A list of species belong to a given taxonomic branch can be retrieved

EntityValue[(Entity[(RowWithSeparator[ , "elephants", (EntitySublabel["animal"])]), Entity["TaxonomicSpecies","Elephantidae::2jfrp"], "Entity[\"TaxonomicSpecies\", \"Elephantidae::2jfrp\"]", "taxonomic species"]),(EntityProperty["species list", EntityProperty["TaxonomicSpecies","SpeciesList"], "EntityProperty[\"TaxonomicSpecies\", \"SpeciesList\"]"])]

Overview of taxonomy data

EntityClass

Implicitly defined entity class queries are supported to group organisms by their properties such as ecological, geological, or other biological characteristics

EntityValue[EntityClass["TaxonomicSpecies",{(EntityProperty["phyletic groups", EntityProperty["TaxonomicSpecies","PhyleticGroups"], "EntityProperty[\"TaxonomicSpecies\", \"PhyleticGroups\"]"])->(Entity["fish", Entity["SpeciesPhyleticGroup","Fish"], "Entity[\"SpeciesPhyleticGroup\", \"Fish\"]", "species phyletic group"]),(EntityProperty["perception channels", EntityProperty["Animal","PerceptionChannels"], "EntityProperty[\"Animal\", \"PerceptionChannels\"]"])->(Entity["magnetic signal", Entity["SpeciesSensoryChannel","MagneticSignal"], "Entity[\"SpeciesSensoryChannel\", \"MagneticSignal\"]", "species sensory channel"])}],"Image","Dataset"]

Various paraphyletic species groups are supported

(Entity["badgers, otters and weasels", Entity["Species","Family:Mustelidae"], "Entity[\"Species\", \"Family:Mustelidae\"]", "species specification"])//InputForm

otter=EntityList@EntityClass["TaxonomicSpecies",{(EntityProperty["phyletic groups", EntityProperty["TaxonomicSpecies","PhyleticGroups"], "EntityProperty[\"TaxonomicSpecies\", \"PhyleticGroups\"]"])->(Entity["otter", Entity["SpeciesPhyleticGroup","Otter"], "Entity[\"SpeciesPhyleticGroup\", \"Otter\"]", "species phyletic group"])}]

graph=HighlightGraph[GraphUnion[Sequence@@EntityValue[otter,"TaxonomyGraph"],GraphLayout->"RadialEmbedding",PlotTheme->"Minimal"],otter]

Analyze species

Ecological properties

EntityValue[(EntityPropertyClass["ecological properties", EntityPropertyClass["TaxonomicSpecies","EcologicalProperties"], "EntityPropertyClass[\"TaxonomicSpecies\", \"EcologicalProperties\"]"]),"Properties"]

ConservationStatus information for over 70k species (including latest extinct/endangered/threatened species information)

EntityList@EntityClass["TaxonomicSpecies",{(EntityProperty["phyletic groups", EntityProperty["TaxonomicSpecies","PhyleticGroups"], "EntityProperty[\"TaxonomicSpecies\", \"PhyleticGroups\"]"])->(Entity["mammal", Entity["SpeciesPhyleticGroup","Mammal"], "Entity[\"SpeciesPhyleticGroup\", \"Mammal\"]", "species phyletic group"]),(EntityProperty["biomes", EntityProperty["TaxonomicSpecies","Biomes"], "EntityProperty[\"TaxonomicSpecies\", \"Biomes\"]"])->(Entity["marine biome", Entity["Biome","MarineBiome"], "Entity[\"Biome\", \"MarineBiome\"]", "biome"]),(EntityProperty["conservation status", EntityProperty["TaxonomicSpecies","ConservationStatus"], "EntityProperty[\"TaxonomicSpecies\", \"ConservationStatus\"]"])->(Entity["Extinct", Entity["SpeciesConservationStatus","Extinct"], "Entity[\"SpeciesConservationStatus\", \"Extinct\"]", "species conservation status"])}]

For terrestrial mammals, retrieve dataset on conservation status and biomes:

dataset=EntityValue[EntityClass["TaxonomicSpecies",{(EntityProperty["phyletic groups", EntityProperty["TaxonomicSpecies","PhyleticGroups"], "EntityProperty[\"TaxonomicSpecies\", \"PhyleticGroups\"]"])->(Entity["mammal", Entity["SpeciesPhyleticGroup","Mammal"], "Entity[\"SpeciesPhyleticGroup\", \"Mammal\"]", "species phyletic group"])}],{"TerrestrialBiomes","ConservationStatus"},"Dataset"][Select[FreeQ[#,_Missing]&]];

biome=Flatten[Thread[#ConservationStatus->#TerrestrialBiomes]&/@Normal@Values[dataset]]/.e_Entity:>e["Name"]/.r_Rule:>Reverse@r;

Use classifier functions to associate biomes with the likelihood of species having threatening status:

c=Classify[biome,Method->"LogisticRegression"]

p[biome_]:=c[biome,{"Probability","Near Threatened"}];

GeoRegionValuePlot[#["Polygon"]->p[#["Name"]]&/@EntityList["Biome"],PlotStyle->EdgeForm[None],GeoLabels->True]

Hosts and associated diseases

EntityList@EntityClass["TaxonomicSpecies",{(EntityProperty["hosts", EntityProperty["TaxonomicSpecies","Hosts"], "EntityProperty[\"TaxonomicSpecies\", \"Hosts\"]"])->(Entity[(RowWithSeparator[ , "muskmelon", (EntitySublabel["plant"])]), Entity["TaxonomicSpecies","CucumisMelo::kfj8m"], "Entity[\"TaxonomicSpecies\", \"CucumisMelo::kfj8m\"]", "taxonomic species"])}]

EntityValue[EntityValue["Virus","SampleEntities"],"AssociatedHumanDiseases","NonMissingEntityAssociation"]//Dataset

Network illustrating host-pathogen association:

Analyze species

Biological properties

EntityValue[(EntityPropertyClass["biological properties", EntityPropertyClass["TaxonomicSpecies","BiologicalProperties"], "EntityPropertyClass[\"TaxonomicSpecies\", \"BiologicalProperties\"]"]),"Properties"]

Nucleotide sequence length and chromosomes information from NCBI

EntityValue[EntityClass["TaxonomicSpecies",{(EntityProperty["nucleotide sequence length", EntityProperty["TaxonomicSpecies","NucleotideSequenceLength"], "EntityProperty[\"TaxonomicSpecies\", \"NucleotideSequenceLength\"]"])->TakeLargest[5]}],(EntityProperty["nucleotide sequence length", EntityProperty["TaxonomicSpecies","NucleotideSequenceLength"], "EntityProperty[\"TaxonomicSpecies\", \"NucleotideSequenceLength\"]"]),"Dataset"]

EntityValue[EntityClass["TaxonomicSpecies",{(EntityProperty["number of chromosomes", EntityProperty["TaxonomicSpecies","NumberOfChromosomes"], "EntityProperty[\"TaxonomicSpecies\", \"NumberOfChromosomes\"]"])->TakeLargest[5]}],(EntityProperty["number of chromosomes", EntityProperty["TaxonomicSpecies","NumberOfChromosomes"], "EntityProperty[\"TaxonomicSpecies\", \"NumberOfChromosomes\"]"]),"Dataset"]

Reference genome sequence

EntityValue[EntityValue["TaxonomicSpecies","SampleEntities"],"RefSeqGenomeAccessionNumber","NonMissingEntityAssociation"]//Dataset

Retrieve genome sequence in FASTA format:

Hyperlink["https://www.ncbi.nlm.nih.gov/assembly/"<>"GCF_000005845.2"]

URLExecute["https://api.ncbi.nlm.nih.gov/datasets/v1alpha/genome/accession/GCF_000005845.2/download?include_annotation_type=PROT_FASTA","ncbi_dataset/data/GCF_000005845.2/GCF_000005845.2_ASM584v2_genomic.fna"]

Analyze species

Geographic properties

EntityValue[(EntityPropertyClass["geographic properties", EntityPropertyClass["TaxonomicSpecies","GeographicProperties"], "EntityPropertyClass[\"TaxonomicSpecies\", \"GeographicProperties\"]"]),"Properties"]

Lookup animals by habitat

EntityList@EntityClass["TaxonomicSpecies",{(EntityProperty["phyletic groups", EntityProperty["TaxonomicSpecies","PhyleticGroups"], "EntityProperty[\"TaxonomicSpecies\", \"PhyleticGroups\"]"])->(Entity["otter", Entity["SpeciesPhyleticGroup","Otter"], "Entity[\"SpeciesPhyleticGroup\", \"Otter\"]", "species phyletic group"]),(EntityProperty["biomes", EntityProperty["TaxonomicSpecies","Biomes"], "EntityProperty[\"TaxonomicSpecies\", \"Biomes\"]"])->(Entity["freshwater biome", Entity["Biome","FreshwaterBiome"], "Entity[\"Biome\", \"FreshwaterBiome\"]", "biome"])}]

Lookup animals by observation locations (over 1.3 million data points)

Country, Ocean, AdministrativeDivision, City, Island, Lake, Mountain, Park, Volcano, Waterfall

EntityValue[EntityClass["TaxonomicSpecies",{(EntityProperty["phyletic groups", EntityProperty["TaxonomicSpecies","PhyleticGroups"], "EntityProperty[\"TaxonomicSpecies\", \"PhyleticGroups\"]"])->(Entity["mammal", Entity["SpeciesPhyleticGroup","Mammal"], "Entity[\"SpeciesPhyleticGroup\", \"Mammal\"]", "species phyletic group"]),(EntityProperty["observation locations", EntityProperty["TaxonomicSpecies","ObservationLocations"], "EntityProperty[\"TaxonomicSpecies\", \"ObservationLocations\"]"])->(Entity["Bali Sea", Entity["Ocean","BaliSea"], "Entity[\"Ocean\", \"BaliSea\"]", "ocean"])}],"Image","Dataset"]

oceans=(Entity[(RowWithSeparator[ , "dugong", (EntitySublabel["animal"])]), Entity["TaxonomicSpecies","DugongDugon::8b266"], "Entity[\"TaxonomicSpecies\", \"DugongDugon::8b266\"]", "taxonomic species"])["ObservationOceans"]

GeoGraphics[{FaceForm[Red],Polygon[oceans]}]

Analyze observed migratory patterns

observationData=Normal@EntityValue[(Entity[(RowWithSeparator[ , "monarch butterfly", (EntitySublabel["animal"])]), Entity["TaxonomicSpecies","Species:AnosiaPlexippus"], "Entity[\"TaxonomicSpecies\", \"Species:AnosiaPlexippus\"]", "taxonomic species"]),EntityProperty["Animal","ObservationLocationsByDate"]];

observationData=CloudGet@CloudObject[(HyperlinkURL["https://www.wolframcloud.com/obj/8895da31-110a-433f-a201-e55d5855ee23", https://www.wolframcloud.com/obj/8895da31-110a-433f-a201-e55d5855ee23])];

Manipulate[GeoGraphics[{Red,PointSize[Medium],Point/@Union@Flatten@Cases[observationData,Rule[DateObject[{_,month,_},__],pos_]:>pos]},GeoRange->"World"],{month,1,12,1},SynchronousInitialization->False]

Analyze species

Lookup animals by food habits

Predator information is available

EntityValue[EntityClass["TaxonomicSpecies",{(EntityProperty["observation locations", EntityProperty["TaxonomicSpecies","ObservationLocations"], "EntityProperty[\"TaxonomicSpecies\", \"ObservationLocations\"]"])->(Entity["Illinois, United States", Entity["AdministrativeDivision",{"Illinois","UnitedStates"}], "Entity[\"AdministrativeDivision\", {\"Illinois\", \"UnitedStates\"}]", "administrative division"]),(EntityProperty["predators", EntityProperty["Animal","Predators"], "EntityProperty[\"Animal\", \"Predators\"]"])->(Entity[(RowWithSeparator[ , "Cooper's hawk", (EntitySublabel["animal"])]), Entity["TaxonomicSpecies","AccipiterCooperii::532m2"], "Entity[\"TaxonomicSpecies\", \"AccipiterCooperii::532m2\"]", "taxonomic species"])}],"Image","Dataset"]

Illustrate the food chain

pr=Flatten[Thread[#]&/@Normal@EntityValue[EntityClass["TaxonomicSpecies",{(EntityProperty["observation locations", EntityProperty["TaxonomicSpecies","ObservationLocations"], "EntityProperty[\"TaxonomicSpecies\", \"ObservationLocations\"]"])->(Entity["Grand Canyon National Park", Entity["Park","GrandCanyonNationalPark::hh6j8"], "Entity[\"Park\", \"GrandCanyonNationalPark::hh6j8\"]", "park"])}],(EntityProperty["predators", EntityProperty["Animal","Predators"], "EntityProperty[\"Animal\", \"Predators\"]"]),"NonMissingEntityAssociation"]];

ef[el_,___]:={Arrowheads[{{.01,.52}}],Arrow[el]}
LayeredGraphPlot[Select[pr,MemberQ[First/@pr,#[[2]]]&]/.r_Rule:>Reverse@r/.e_Entity:>e["Image"],]

Summary

A curated collection of computable species data is accessible in the Wolfram Language:

•  Species dataset is being updated to support ~2 million taxa encompassing the latest tree of life

•  More complex lookups are possible to explore ecological, geological as well as biological characteristics of variety of organisms