public void centerBP(int bpX, int bpY) { if (currentZoom != null && getMatrix() != null) { MatrixZoomData zd = getMatrix().getZoomData(currentZoom); HiCGridAxis xAxis = zd.getXGridAxis(); HiCGridAxis yAxis = zd.getYGridAxis(); int binX = xAxis.getBinNumberForGenomicPosition(bpX); int binY = yAxis.getBinNumberForGenomicPosition(bpY); center(binX, binY); } }
public void centerFragment(int fragmentX, int fragmentY) { if (currentZoom != null) { MatrixZoomData zd = getMatrix().getZoomData(currentZoom); HiCGridAxis xAxis = zd.getXGridAxis(); HiCGridAxis yAxis = zd.getYGridAxis(); int binX; int binY; try { binX = xAxis.getBinNumberForFragment(fragmentX); //noinspection SuspiciousNameCombination binY = yAxis.getBinNumberForFragment(fragmentY); center(binX, binY); } catch (RuntimeException error) { superAdapter.launchGenericMessageDialog( error.getMessage(), "Error", JOptionPane.ERROR_MESSAGE); } } }