VirtualFlyBrain / VFB_neo4j

A python package for writing schema-compliant content to VFB neo4J DBs
Apache License 2.0
0 stars 1 forks source link

Add stock nodes to prod - pulled from FlyBase #31

Open dosumis opened 7 years ago

dosumis commented 7 years ago
SELECT s.uniquename AS stock_fbid, 
s.description AS stock_name, 
f.uniquename AS feature_fbid,
f.name as feature_name
FROM stock s
JOIN stock_genotype sg on s.stock_id=sg.stock_id     
JOIN feature_genotype fg ON fg.genotype_id = sg.genotype_id
JOIN feature f ON f.feature_id = fg.feature_id 
WHERE s.is_obsolete is False
limit 3;
stock_fbid stock_name feature_fbid
FBst0000002 w[*]; betaTub60D[2] Kr[If-1]/CyO FBal0000021
FBst0000002 w[*]; betaTub60D[2] Kr[If-1]/CyO FBal0005583
FBst0000002 w[*]; betaTub60D[2] Kr[If-1]/CyO FBba0000025

Stock IDs can be used for linkouts to FlyBase via the usual recipe.

Neo Schema

(:Feature)-[:has_stock]->(:Stock { label : "w[*]; betaTub60D[2] Kr[If-1]/CyO" )

Stock node must have self_xref: FlyBase to drive linkouts.

stock centre ID is stored in stock.name, but FlyBase warns that this is not completely reliable for stock centers apart from Bloomington.

jcolomb commented 7 years ago

s.description will work only for BDSC flies. you need to use the flybase name to be consistent over different stock centers, but then you have to work the name which comes on the form of a list of: @flybasealleleid:fballelename@ (note that it is using insertion name and not allele name for insertions, note that unknown allele comes in simple text (w[¨*];) without any "@") you may check Rflybase

dosumis commented 7 years ago

You can use the feature_relation table to look up insertion /transposon names from alleles. This should => you a closer match to names used in stock centers.

jcolomb commented 7 years ago

Yep this should work. I would give better names for fly stock list in the lab. Thanks for the tip.

By the way, both flybase and stock centers use cryptic names for RNAi lines...

Dr. Julien Colomb

Neurobiology #openscience

http://orcid.org/0000-0002-3127-5520

Schillerpromenade 4 12049 Berlin 0049 30 46721825

On 12 Jul 2017, at 12:23, David Osumi-Sutherland notifications@github.com wrote:

You can use the feature_relation table to look up insertion /transposon names from alleles. This should => you a closer match to names used in stock centers.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/VirtualFlyBrain/VFB_neo4j/issues/31#issuecomment-314720504, or mute the thread https://github.com/notifications/unsubscribe-auth/AByiuwb_9yj1q8K5D0GDadbiLS_WUHCfks5sNJ6wgaJpZM4NLcyH.

dosumis commented 7 years ago

The feature_relation table also => links to genes. This would, presumably, help for RNAi lines.

dosumis commented 7 years ago

(RNA -> RNAi)