// GBIF occurrence
CREATE (occurrence478678909:Occurrence { name: "gbif478678909", catalogNumber: "NMV D 73979" }),
(occurrence478678909)-[:HASNAME]->(name1:Name { name: "Diporiphora magna Storr, 1974"}),
// has code
(sample1:Sample { name: "NMV D 73979" }),
(occurrence478678909)-[:HASCODE]->(sample1),
// data provided by
(dataset1:Dataset { name: "Museum Victoria provider for OZCAM"})<-[:SOURCE]-(occurrence478678909),
// INDSC
(occurrence488924228:Occurrence { name: "gbif488924228", catalogNumber: "HQ699055" }),
// data provided by
(dataset2:Dataset { name: "Geographically tagged INSDC sequences"})<-[:SOURCE]-(occurrence488924228),
// Sequence
(HQ699055:Sequence { accession:"HQ699055", catalogueNumber: "NMVD73979" }),
(HQ699055)-[:SAMEAS]->(occurrence488924228),
(HQ699055)-[:HASCODE]->(sample2:Sample { name: "NMVD73979" }),
(HQ699055)-[:PUBLISHEDIN]->(pub1:Publication { name: "PMID 21166790" }),
(HQ699055)-[:HASNAME]->(name2:Name { name: "Diporiphora magna"}),
// mapping samples
(occurrence478678909)-[:HASCODE]->(sample2)
MATCH (o1:Occurrence)-[:HASCODE]-(Sample)-[:HASCODE]-(Sequence)-[:SAMEAS]-(o2:Occurrence)
WITH o1, collect(o2.name) AS os
RETURN o1.name , os
Get publication linked to sequence and add it to GBIF record form data provider
MATCH (o1:Occurrence)-[:HASCODE]-(Sample)-[:HASCODE]-(s1:Sequence)
WITH o1, s1
MATCH (s1)-[:PUBLISHEDIN]-(p1:Publication)
RETURN o1.name, s1.accession, p1.name
In this example we get the publication linked to the sequence and link it to the voucher specimen provider. This is a way to build a list of publications using provider collections.
MATCH (d1:Dataset)-[:SOURCE]-(o1:Occurrence)-[:HASCODE]-(Sample)-[:HASCODE]-(s1:Sequence)
WITH d1, o1, s1
MATCH (s1)-[:PUBLISHEDIN]-(p1:Publication)
RETURN d1.name, s1.accession, p1.name