Open dosumis opened 4 years ago
From: https://wiki.flybase.org/wiki/FlyBase:Links_to_and_from_FlyBase
Notes: Use 4 for key and Column 3 for text to link on.
Take2:
MATCH (f:Feature)<-[]-(ep:Class)-[dbx:hasDbXref]->(s:Site { short_form: 'FlyLight'})
WITH f, ep MATCH (ep)<-[:INSTANCEOF]-(i:Individual)
<-[]-(channel:Individual)-[irw:in_register_with]->(t:Individual)
WITH distinct f.short_form AS `#FlyBase ID`,
collect(i.short_form)[0] AS DBURL, ep.label AS DBID, t.label as template
RETURN `#FlyBase ID`, 'VFB' as DBNAME, DBID, DBURL ORDER BY `#FlyBase ID`
-- | -- | -- | -- "FBtp0057296" | "VFB" | "P{GMR10A06-GAL4} expression pattern" | "VFB_00020468" "FBtp0057297" | "VFB" | "P{GMR10A07-GAL4} expression pattern" | "VFB_00023198"
Query could be optimised(?)
Or use individual name ?
Latest:
MATCH (f:Feature)<-[]-(ep:Class)-[dbx:hasDbXref]->(s:Site)
WHERE (s.short_form = 'FlyLight') OR (s.short_form = 'FlyLightSplit')
WITH f, ep MATCH (ep)<-[:INSTANCEOF]-(i:Individual)
<-[]-(channel:Individual)-[irw:in_register_with]->(t:Individual)
WITH distinct f.short_form AS `#FlyBase ID`,
collect(i.short_form)[0] AS DBURL, ep.label AS epl, t.label as template
RETURN `#FlyBase ID`, DBURL, 'VFB' AS DBNAME,
epl + ' in ' + replace(
replace(template, ' template - Court2018_c', ''),
'JFRC2_template_c',
'adult brain') + ' on Virtual Fly Brain' AS DBID ORDER BY `#FlyBase ID`
Note replace hack is necessary for template because a longer match pattern bridging to template:anatomy classification does not complete.
=>
-- | -- | -- "FBtp0057296" | "VFB_00020468" | "P{GMR10A06-GAL4} expression pattern in adult brain on Virtual Fly Brain" "FBtp0057297" | "VFB_00023198" | "P{GMR10A07-GAL4} expression pattern in adult brain on Virtual Fly Brain" "FBtp0057299" | "VFB_00020592" | "P{GMR10A09-GAL4} expression pattern in adult brain on Virtual Fly Brain"
One query => Image linkout for transgene expression patterns & splits, adult brain & VNS, conforming to linkout spec. Single, arbitrary image is chosen for each.
Ways we might improve:
Script for generating linkout.tsv https://gist.github.com/dosumis/9e2551acd3daa2f2343c6ee169ee71a7
The following query produces a standard FLyBase linkout table with 1-2 links per FB construct.
=>
FlyBase ID | DBNAME | DBID
-- | -- | -- "FBtp0057296" | "VFB" | "VFB_00020468" "FBtp0057297" | "VFB" | "VFB_00023198" "FBtp0057299" | "VFB" | "VFB_00020592" ...
Link recipe: https://virtualflybrain.org/reports/VFB_00068899
Thumbnail link recipe: https://virtualflybrain.org/reports/VFB_00068899/thumbnail.png