Graphical model and algorithm for detecting DNA structural variation