{"id":10271,"date":"2023-05-15T21:52:40","date_gmt":"2023-05-16T02:52:40","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=10271"},"modified":"2023-08-24T11:59:43","modified_gmt":"2023-08-24T16:59:43","slug":"10271","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=10271","title":{"rendered":"Using Graph Database to Track Plant Hybridization"},"content":{"rendered":"<p>Graph databases are designed to both store data and record relationships between data elements. I wondered if this would be useful in tracking cross-breeding projects \u2013 essentially building \u201cfamily trees\u201d of the entity being cross-bred. The data model would have nodes with the hybrid with notes on it. Relationships for PARENT_M and PARENT_F (male and female parent of the hybrid) would be used to associate nodes.<\/p>\n<p>Graph databases have a concept of pathing \u2013 what nodes do we need to traverse to get from A to B \u2013 but to create a lineage for the plants, you need to know the starting point. Which is great if you want to play six degrees of separation and find a path between two known people, but not great if I just want to know what the lineage is of Tomato #198. To make pathing possible, I needed to add a common root node to all of heirloom seedstocks \u2013 PLANT0<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1126\" height=\"657\" class=\"wp-image-10272\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/08\/word-image-10271-1.png\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/08\/word-image-10271-1.png 1126w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/08\/word-image-10271-1-300x175.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/08\/word-image-10271-1-1024x597.png 1024w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/08\/word-image-10271-1-768x448.png 768w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/08\/word-image-10271-1-750x438.png 750w\" sizes=\"auto, (max-width: 1126px) 100vw, 1126px\" \/><\/p>\n<p>This allows me to take any plant and find the <em>paths<\/em> from PLANT0 to it<\/p>\n<pre>MATCH\r\np=(Tomato0:TOMATO\u00a0{name:\u00a0'PLANT0'})-[*]-&gt;(Tomato8:TOMATO{name:\u00a0'Tomato0000008'})\r\nRETURN\u00a0p<\/pre>\n<p>And visualize the genetic heritage of the hybrid.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1248\" height=\"561\" class=\"wp-image-10273\" src=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/08\/word-image-10271-2.png\" srcset=\"https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/08\/word-image-10271-2.png 1248w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/08\/word-image-10271-2-300x135.png 300w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/08\/word-image-10271-2-1024x460.png 1024w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/08\/word-image-10271-2-768x345.png 768w, https:\/\/www.rushworth.us\/lisa\/wp-content\/uploads\/2023\/08\/word-image-10271-2-750x337.png 750w\" sizes=\"auto, (max-width: 1248px) 100vw, 1248px\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Graph databases are designed to both store data and record relationships between data elements. I wondered if this would be useful in tracking cross-breeding projects \u2013 essentially building \u201cfamily trees\u201d of the entity being cross-bred. The data model would have nodes with the hybrid with notes on it. Relationships for PARENT_M and PARENT_F (male and &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1805,983,1896],"tags":[1899,1898,1897,1901],"class_list":["post-10271","post","type-post","status-publish","format-standard","hentry","category-business-homesteading","category-fruits-and-vegetables","category-neo4j","tag-genetics","tag-graph-database","tag-neo4j","tag-plant-hybridization"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/10271","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10271"}],"version-history":[{"count":4,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/10271\/revisions"}],"predecessor-version":[{"id":10277,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/10271\/revisions\/10277"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10271"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10271"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10271"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}