Skip to content

Instantly share code, notes, and snippets.

@rdmpage
Last active August 29, 2015 14:07
Show Gist options
  • Select an option

  • Save rdmpage/df06ea64e784f6b58ff4 to your computer and use it in GitHub Desktop.

Select an option

Save rdmpage/df06ea64e784f6b58ff4 to your computer and use it in GitHub Desktop.
Getagged in Genbank but not GBIF

Sequence geotagged in Genbank, but not in GBIF

Example from http://iphylo.blogspot.co.uk/2012/02/linking-gbif-and-genbank.html where Genbank sequence EU443164 is geotagged and linked to a voucher specimen which GBIF does not know is geotagged.

// GBIF occurrence
CREATE (occurrence668551602:Occurrence { name: "gbif668551602", catalogNumber: "FMNH 257697" }),
(occurrence668551602)-[:HASNAME]->(name1:Name { name: "Eleutherodactylus ridens (Cope, 1866)"}),
// has code
(sample1:Sample { name: "FMNH 257697" }),
(occurrence668551602)-[:HASCODE]->(sample1),

// data provided by
(dataset1:Dataset { name: "Field Museum of Natural History (Zoology) Amphibian and Reptile Collection"})<-[:SOURCE]-(occurrence668551602),

// INDSC
(occurrence1000529812:Occurrence { name: "gbif1000529812", catalogNumber: "EU443164" }),

// data provided by
(dataset2:Dataset { name: "Geographically tagged INSDC sequences"})<-[:SOURCE]-(occurrence1000529812),


// Sequence
(EU443164:Sequence { accession:"EU443164", catalogueNumber: "FMNH 257697 (Field Museum of Natural
                     History, Chicago, Illinois, USA); field number AJC 02119" }),
(EU443164)-[:SAMEAS]->(occurrence1000529812),
(EU443164)-[:HASCODE]->(sample2:Sample { name: "FMNH 257697 (Field Museum of Natural History, Chicago, Illinois, USA); field number AJC 0211" }),
(EU443164)-[:PUBLISHEDIN]->(pub1:Publication { name: "PMID 18424088" }),
(EU443164)-[:HASNAME]->(name2:Name { name: "Pristimantis ridens"}),

(EU443164)-[:GEOTAG]->(point1:Point { name: "9.3167 N 78.9833 W"}),


// mapping samples
(occurrence668551602)-[:HASCODE]->(sample2)
MATCH (o1:Occurrence)-[:HASCODE]-(Sample)-[:HASCODE]-(Sequence)-[:SAMEAS]-(o2:Occurrence)
WITH o1, collect(o2.name) AS os
RETURN o1.name , os

Get geotag

MATCH (o1:Occurrence)-[:HASCODE]-(Sample)-[:HASCODE]-(s1:Sequence)
WITH o1, s1
MATCH (s1)-[:GEOTAG]-(p1:Point)
RETURN o1.name , s1.name, p1.name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment