-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy path270_lngSmf.gremlin
More file actions
46 lines (32 loc) · 1.18 KB
/
270_lngSmf.gremlin
File metadata and controls
46 lines (32 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
g.V().hasLabel ( 'Concept:Gene:Resource' )
.out ( 'enc' ).hasLabel ( 'Concept:Protein:Resource' )
.emit ()
.repeat ( both ( 'h_s_s', 'ortho', 'xref' ).simplePath() )
.times ( 3 )
.hasLabel ( 'Concept:Protein:Resource' )
.both ( 'is_a', 'ac_by' ).hasLabel ( 'Concept:Enzyme:Resource' )
.out ( 'ac_by', 'in_by' ).hasLabel ( 'Comp:Concept:Resource' )
.out ( 'cs_by', 'pd_by' ).hasLabel ( 'Concept:Resource:Transport' )
.repeat ( out ( 'part_of' ).simplePath() )
.emit ()
.times ( 3 )
.hasLabel ( 'Concept:Path:Resource' )
.repeat ( in ( 'part_of' ).simplePath () )
.emit ()
.times ( 3 )
.hasLabel ( 'Concept:Reaction:Resource' )
// Go back to other proteins in this reaction
// optional() is to achieve the same behaviour as in the Cypher and SPARQL queries
.optional (
emit ()
.repeat ( __.in ( 'cs_by', 'pd_by' ).simplePath () )
.times ( 3 )
.hasLabel ( 'Concept:Protein:Resource' )
.emit ()
.repeat ( both ( 'h_s_s', 'ortho', 'xref' ).simplePath () )
.times ( 2 )
.hasLabel ( 'Concept:Protein:Resource' )
.optional ( __.in ( 'enc' ) ) // Gene
)
.path ().by ( 'iri' )
.limit ( 100 )