berkeleybop / bbop-js

Cross-platform client and server JavaScript library, with a concentration on Solr, graphs, utilities, and convenience methods.
BSD 3-Clause "New" or "Revised" License
6 stars 5 forks source link

Sugiyama layout can error on some (likely valid) input #23

Closed kltm closed 10 years ago

kltm commented 10 years ago

While this issue affects usability, it is in a peripheral module when used in an extreme way.

kltm commented 10 years ago

Sadly, no file attachments for github :(

kltm commented 10 years ago

Can generate JS in go-mme by trying to use the wizard for: "execution phase of apoptosis" over "goa_human".

kltm commented 10 years ago

David seems to have found another with the MME:

{"nodes": [{"id": "gomodel:mgi-5362b2ed0000016-GO-0072583-5362b2ed0000035"}, {"id": "gomodel:mgi-5362b2ed0000016-GO-0021923-5362b2ed0000025"}, {"id": "gomodel:mgi-5362b2ed0000016-GO-0021575-5362b2ed0000027"}, {"id": "gomodel:mgi-5362b2ed0000016-GO-0003674-5362b2ed0000023"}, {"id": "gomodel:mgi-5362b2ed0000016-GO-0061436-5362b2ed0000034"}, {"id": "gomodel:mgi-5362b2ed0000016-GO-0001889-5362b2ed0000041"}, {"id": "gomodel:mgi-5362b2ed0000016-GO-0007030-5362b2ed0000032"}, {"id": "gomodel:mgi-5362b2ed0000016-GO-0043588-5362b2ed0000040"}, {"id": "gomodel:mgi-5362b2ed0000016-GO-0048853-5362b2ed0000021"}, {"id": "gomodel:mgi-5362b2ed0000016-GO-0021869-5362b2ed0000022"}, {"id": "gomodel:mgi-5362b2ed0000016-GO-0048854-5362b2ed0000028"}, {"id": "gomodel:mgi-5362b2ed0000016-GO-2000179-5362b2ed0000024"}, {"id": "gomodel:mgi-5362b2ed0000016-GO-0007029-5362b2ed0000042"}, {"id": "gomodel:mgi-5362b2ed0000016-GO-0009913-5362b2ed0000033"}], "edges": [{"sub": "gomodel:mgi-5362b2ed0000016-GO-0072583-5362b2ed0000035", "obj": "gomodel:mgi-5362b2ed0000016-GO-2000179-5362b2ed0000024", "pred": "RO:0002411"}, {"sub": "gomodel:mgi-5362b2ed0000016-GO-0009913-5362b2ed0000033", "obj": "gomodel:mgi-5362b2ed0000016-GO-0061436-5362b2ed0000034", "pred": "BFO:0000050"}, {"sub": "gomodel:mgi-5362b2ed0000016-GO-0021869-5362b2ed0000022", "obj": "gomodel:mgi-5362b2ed0000016-GO-0048853-5362b2ed0000021", "pred": "BFO:0000050"}, {"sub": "gomodel:mgi-5362b2ed0000016-GO-0072583-5362b2ed0000035", "obj": "gomodel:mgi-5362b2ed0000016-GO-0009913-5362b2ed0000033", "pred": "RO:0002411"}, {"sub": "gomodel:mgi-5362b2ed0000016-GO-2000179-5362b2ed0000024", "obj": "gomodel:mgi-5362b2ed0000016-GO-0021923-5362b2ed0000025", "pred": "RO:0002213"}, {"sub": "gomodel:mgi-5362b2ed0000016-GO-0021575-5362b2ed0000027", "obj": "gomodel:mgi-5362b2ed0000016-GO-0048854-5362b2ed0000028", "pred": "BFO:0000050"}, {"sub": "gomodel:mgi-5362b2ed0000016-GO-0061436-5362b2ed0000034", "obj": "gomodel:mgi-5362b2ed0000016-GO-0043588-5362b2ed0000040", "pred": "BFO:0000050"}, {"sub": "gomodel:mgi-5362b2ed0000016-GO-0021923-5362b2ed0000025", "obj": "gomodel:mgi-5362b2ed0000016-GO-0021575-5362b2ed0000027", "pred": "BFO:0000050"}, {"sub": "gomodel:mgi-5362b2ed0000016-GO-2000179-5362b2ed0000024", "obj": "gomodel:mgi-5362b2ed0000016-GO-0021869-5362b2ed0000022", "pred": "RO:0002213"}, {"sub": "gomodel:mgi-5362b2ed0000016-GO-0048853-5362b2ed0000021", "obj": "gomodel:mgi-5362b2ed0000016-GO-0048854-5362b2ed0000028", "pred": "BFO:0000050"}, {"sub": "gomodel:mgi-5362b2ed0000016-GO-0072583-5362b2ed0000035", "obj": "gomodel:mgi-5362b2ed0000016-GO-0007029-5362b2ed0000042", "pred": "RO:0002411"}, {"sub": "gomodel:mgi-5362b2ed0000016-GO-0003674-5362b2ed0000023", "obj": "gomodel:mgi-5362b2ed0000016-GO-0072583-5362b2ed0000035", "pred": "BFO:0000050"}, {"sub": "gomodel:mgi-5362b2ed0000016-GO-0072583-5362b2ed0000035", "obj": "gomodel:mgi-5362b2ed0000016-GO-0007030-5362b2ed0000032", "pred": "RO:0002411"}]}
kltm commented 10 years ago

I'm wondering if this has to do with the single separate node away from the rest of the complicated graph? Perhaps causing an additional partition to be created without a corresponding edge partition?

kltm commented 10 years ago

Worked back to minimal test case!

     var bad = {
     "nodes":
     [
         {"id": "d"},
         {"id": "b"},
         {"id": "a"},
         {"id": "c"}
     ],
     "edges":
     [
         {"sub": "d",
          "obj": "c"},
         {"sub": "c",
          "obj": "a"},
         {"sub": "d",
          "obj": "b"}
     ]
     };
kltm commented 10 years ago

New case, remarkably like the old one:

var bad = {
    "nodes": [
    {"id": "d"},
    {"id": "e"},
    {"id": "b"},
    {"id": "a"},
    {"id": "c"}
    ],
    "edges": [
    {"sub": "d",
     "obj": "c"},
    {"sub": "c",
     "obj": "a"},
    {"sub": "e",
     "obj": "d"},
    {"sub": "d",
     "obj": "b"}
    ]
};