Skip to content
Stephan Saalfeld edited this page Nov 30, 2015 · 4 revisions

##Storage

The CRAG store stores candidate_assignments, segmentation_assignments, edges, segment_type, and history

candidate_assignments, segmentation_assignments are lookup tables with two columns segmentA_id, segmentB_id

segment_type specifies arbitrary types of segments, currently user_merge, default. user_merge means that this segment cannot be split.

edges store edges in the graph between segments, they have three columns segmentA_id, segmentB_id, type. type is either adjacency or separation. Adjacencies are defined over fragments, separations are defined over segments (fragments are segments).

##Protocol

###Graph editing

Actions are either graph operations or sets of graph operations (transactions).

  • create new segments, use ids previously requested
{"type": "add_segments",
 "data": {"ids": [0, 1, 2], "types": ["default", "user_merge"]}
}
  • remove segments
{"type": "remove_segments",
 "data": {"ids": [0, 1, 2]}
}
  • create new edges
{"type": "add_edges",
 "data": {"segmentsA": [0,2], "segmentsB": [1,3], "types": ["adjacency", "separation"]}
}
  • remove specific edges between segments
{"type": "remove_edges",
 "data": {"segmentsA": [0, 2], "segmentsB": [1, 3]}
}
  • remove all edges incident to the given segments
{"type": "remove_all_edges",
 "data": {"segments": [0, 1, 2, 3]}
}
  • create new segmentation assignments (directed, from child to parent)
{"type": "add_segmentation_assignments",
 "data": {"segmentsA": [0, 2], "segmentsB": [1, 3]}
}
  • remove segmentation assignments (directed, from child to parent)
{"type": "remove_segmentation_assignments",
 "data": {"segmentsA": [0, 2], "segmentsB": [1, 3]}
}
  • remove all segmentation assignments of the given nodes
{"type": "remove_all_segmentation_assignments",
 "data": {"segments": [0, 2]}
}
  • create new candidate assignments (directed, from child to parent)
{"type": "add_candidate_assignments",
 "data": {"segmentsA": [0, 2], "segmentsB": [1, 3]}
}
  • remove candidate assignments (directed, from child to parent)
{"type": "remove_candidate_assignments",
 "data": {"segmentsA": [0, 2], "segmentsB": [1, 3]}
}
  • remove all candidate assignments of the given nodes
{"type": "remove_all_candidate_assignments",
 "data": {"segments": [0, 2]}
}
  • remove specific edges between segments
{"type": "remove_edges",
 "data": {"segmentsA": [0, 2], "segmentsB": [1, 3]}
}
  • remove all edges incident to the given segments
{"type": "remove_all_edges",
 "data": {"segments": [0, 1, 2, 3]}
}
  • transaction
{"type": "transaction",
 "data": {"operations": [<operations>]}
}

###Queries

  • get all segmentation assignments for a set of fragments
{"type": "get_segmentation_assignments",
 "data": {"segments": [0, 1, 2, 3]}
}
{"type": "segmentation_assignments",
 "data": {"segmentsA": [3, 1, 2, 0], "segmentsB": [4, 4, 4, 5]}
}
  • get the parent candidates for a set of segments
{"type": "get_candidate_assignment_parents",
 "data": {"segments": [0, 1, 2, 3]}
}
{"type": "candidate_assignment_parents",
 "data": {"segmentsA": [3, 1, 2, 3, 0], "segmentsB": [4, 4, 4, 5, 5]}
}
  • get the DAG of all candidate ancestors of the given segments
{"type": "get_candidate_assignment_ancestors",
 "data": {"segments": [0, 1, 2, 3]}
}
{"type": "candidate_assignment_ancestors",
 "data": {"segmentsA": [3, 1, 2, 3, 0, 4, 5, 5], "segmentsB": [4, 4, 4, 5, 5, 6, 7, 8]}
}
  • get all child candidate assignments for a set of segments
{"type": "get_candidate_assignment_children",
 "data": {"segments": [4, 5]}
}
{"type": "candidate_assignment_children",
 "data": {"segmentsA": [3, 1, 2, 3, 0], "segmentsB": [4, 4, 4, 5, 5]}
}
  • get the DAG of all candidate descendents of the given segments
{"type": "get_candidate_assignment_descendents",
 "data": {"segments": [7, 8]}
}
{"type": "candidate_assignment_descendents",
 "data": {"segmentsA": [3, 1, 2, 3, 0, 4, 5, 5], "segmentsB": [4, 4, 4, 5, 5, 6, 7, 8]}
}
Clone this wiki locally