prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#>
prefix rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix sio: <http://semanticscience.org/resource/>
prefix id: <http://purl.jp/bio/4/id/>
prefix dc: <http://purl.org/dc/terms/>
prefix xkos: <http://rdf-vocabulary.ddialliance.org/xkos#>

select distinct  ?o1 ?ol1  ?o1_TO_o2 ?o2 ?ol2 ?o2_TO_o1


where{
  graph <http://nikkaji.biosciencedbc.jp/IOBC_1_2_0.ttl>{
  FILTER (?StartingPoint_TO_o1 != rdfs:subClassOf &&
          ?StartingPoint_TO_o1 != skos:broader &&
          ?StartingPoint_TO_o1 != skos:exactMatch &&
          ?StartingPoint_TO_o1 != skos:prefLabel &&
          ?StartingPoint_TO_o1 != dc:subject &&
          ?StartingPoint_TO_o1 != rdfs:seeAlso &&
          ?StartingPoint_TO_o1 != rdfs:label &&
          ?StartingPoint_TO_o1 != rdf:type &&
          ?StartingPoint_TO_o1 != dc:identifier &&
          ?StartingPoint_TO_o1 != dc:subject &&
          ?StartingPoint_TO_o1 != skos:altLabel &&
          ?StartingPoint_TO_o1 != rdfs:label &&
          ?StartingPoint_TO_o1 != skos:narrower
         )

  FILTER(?StartingPoint = id:200906057747871335)
         {?StartingPoint ?StartingPoint_TO_o1 ?o1.} #OPTIONAL {?o1 ?o1_TO_StartingPoint ?StartingPoint .}
         {?StartingPoint skos:prefLabel ?ol0.}
         {?StartingPoint dc:subject ?sub0.}
OPTIONAL {?StartingPoint rdfs:seeAlso ?als0.}
         {?o1 skos:prefLabel ?ol1 .}
         {?o1 dc:subject ?sub1.}
OPTIONAL {?o1 rdfs:seeAlso ?als1.}


# second step
  FILTER (?o2 != ?StartingPoint)
  FILTER (?o1_TO_o2 != rdfs:subClassOf &&
          ?o1_TO_o2 != skos:broader &&
          ?o1_TO_o2 != skos:exactMatch &&
          ?o1_TO_o2 != skos:prefLabel &&
          ?o1_TO_o2 != dc:subject &&
          ?o1_TO_o2 != rdfs:seeAlso &&
          ?o1_TO_o2 != rdfs:label &&
          ?o1_TO_o2 != rdf:type &&
          ?o1_TO_o2 != dc:identifier &&
          ?o1_TO_o2 != dc:subject &&
          ?o1_TO_o2 != skos:altLabel &&
          ?o1_TO_o2 != rdfs:label &&
          ?o1_TO_o2 != skos:narrower
         )

         {?o1 ?o1_TO_o2 ?o2 .} OPTIONAL {?o2 ?o2_TO_o1 ?o1 .}
         {?o2 skos:prefLabel ?ol2 .}
         {?o2 dc:subject ?sub2.}
OPTIONAL {?o2 rdfs:seeAlso ?als2.}

}
}
o1 ol1 o1_TO_o2 o2 ol2 o2_TO_o1
http://purl.jp/bio/4/id/200906011041194349
"coagulation and fibrinolytic system"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906001829592935
"blood coagulation factor"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906007992200929
"Fibrinous degeneration"@en
http://semanticscience.org/resource/SIO_000132
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906007992200929
"Fibrinous degeneration"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906009955428408
"Fibrinoid necrosis"@en
http://semanticscience.org/resource/SIO_000132
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906009955428408
"Fibrinoid necrosis"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906063041616600
"fibrinolytic system"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906011041194349
"coagulation and fibrinolytic system"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906063041616600
"fibrinolytic system"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906011041194349
"coagulation and fibrinolytic system"@en
http://semanticscience.org/resource/SIO_000028
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906025397017736
"Fibrin thrombus"@en
http://semanticscience.org/resource/SIO_000132
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906025397017736
"Fibrin thrombus"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906032703220199
"Serofibrinous inflammation"@en
http://semanticscience.org/resource/SIO_000132
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906032703220199
"Serofibrinous inflammation"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906047698491151
"serofibrinous labyrinthitis"@en
http://semanticscience.org/resource/SIO_000132
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906047698491151
"serofibrinous labyrinthitis"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906011041194349
"coagulation and fibrinolytic system"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906063041616600
"fibrinolytic system"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906011041194349
"coagulation and fibrinolytic system"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906063041616600
"fibrinolytic system"@en
http://semanticscience.org/resource/SIO_000068
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906069225487762
"Hyperinosemia"@en
http://semanticscience.org/resource/SIO_000132
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906069225487762
"Hyperinosemia"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/201106059013116260
"fibrin gel"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906009845672176
"FBN1 gene"@en
http://semanticscience.org/resource/SIO_000655
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906009845672176
"FBN1 gene"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906081496419240
"Tacho Comb"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906087009977788
"Fibrinopeptide A【human】"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/200906087009977788
"Fibrinopeptide A [human]"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/201106080348948570
"FBN2 gene"@en
http://semanticscience.org/resource/SIO_000655
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://www.w3.org/2004/02/skos/core#related http://purl.jp/bio/4/id/201106080348948570
"FBN2 gene"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906011041194349
"coagulation and fibrinolytic system"@en
http://semanticscience.org/resource/SIO_000028 http://purl.jp/bio/4/id/200906063041616600
"fibrinolytic system"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906011041194349
"coagulation and fibrinolytic system"@en
http://semanticscience.org/resource/SIO_000028 http://purl.jp/bio/4/id/200906095157928489
"blood coagulation"@en
http://semanticscience.org/resource/SIO_000068
http://purl.jp/bio/4/id/200906011041194349
"coagulation and fibrinolytic system"@en
http://semanticscience.org/resource/SIO_000028 http://purl.jp/bio/4/id/200906063041616600
"fibrinolytic system"@en
http://semanticscience.org/resource/SIO_000068
http://purl.jp/bio/4/id/200906063041616600
"fibrinolytic system"@en
http://semanticscience.org/resource/SIO_000068 http://purl.jp/bio/4/id/200906011041194349
"coagulation and fibrinolytic system"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906063041616600
"fibrinolytic system"@en
http://semanticscience.org/resource/SIO_000068 http://purl.jp/bio/4/id/200906011041194349
"coagulation and fibrinolytic system"@en
http://semanticscience.org/resource/SIO_000028
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000657 http://purl.jp/bio/4/id/200906009845672176
"FBN1 gene"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000657 http://purl.jp/bio/4/id/200906009845672176
"FBN1 gene"@en
http://semanticscience.org/resource/SIO_000655
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000657 http://purl.jp/bio/4/id/201106080348948570
"FBN2 gene"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000657 http://purl.jp/bio/4/id/201106080348948570
"FBN2 gene"@en
http://semanticscience.org/resource/SIO_000655
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000062 http://purl.jp/bio/4/id/200906007992200929
"Fibrinous degeneration"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000062 http://purl.jp/bio/4/id/200906007992200929
"Fibrinous degeneration"@en
http://semanticscience.org/resource/SIO_000132
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000062 http://purl.jp/bio/4/id/200906009955428408
"Fibrinoid necrosis"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000062 http://purl.jp/bio/4/id/200906009955428408
"Fibrinoid necrosis"@en
http://semanticscience.org/resource/SIO_000132
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000062 http://purl.jp/bio/4/id/200906025397017736
"Fibrin thrombus"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000062 http://purl.jp/bio/4/id/200906025397017736
"Fibrin thrombus"@en
http://semanticscience.org/resource/SIO_000132
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000062 http://purl.jp/bio/4/id/200906032703220199
"Serofibrinous inflammation"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000062 http://purl.jp/bio/4/id/200906032703220199
"Serofibrinous inflammation"@en
http://semanticscience.org/resource/SIO_000132
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000062 http://purl.jp/bio/4/id/200906047698491151
"serofibrinous labyrinthitis"@en
http://semanticscience.org/resource/SIO_000132
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000062 http://purl.jp/bio/4/id/200906047698491151
"serofibrinous labyrinthitis"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000062 http://purl.jp/bio/4/id/200906069225487762
"Hyperinosemia"@en
http://www.w3.org/2004/02/skos/core#related
http://purl.jp/bio/4/id/200906061070012729
"fibrin"@en
http://semanticscience.org/resource/SIO_000062 http://purl.jp/bio/4/id/200906069225487762
"Hyperinosemia"@en
http://semanticscience.org/resource/SIO_000132