Package org.broad.igv.feature

Examples of org.broad.igv.feature.RegionOfInterest


        }


        @Override
        public void mouseMoved(MouseEvent e) {
            RegionOfInterest roi = getRegionOfInterest(e.getX());
            if (roi != null) {
                setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
                setToolTipText(roi.getTooltip());
                if (selectedRegion != roi) {
                    selectedRegion = roi;
                    IGV.getInstance().repaintDataPanels();
                }
View Full Code Here


            }
        }

        private void showPopup(MouseEvent e) {

            RegionOfInterest roi = getRegionOfInterest(e.getX());
            if (roi != null) {

                getPopupMenu(RegionOfInterestPanel.this, roi, frame).show(e.getComponent(), e.getX(), e.getY());
            }
View Full Code Here

        // TODO -- do right thing if in geneListView
        if (FrameManager.isGeneListMode()) {
            MessageUtils.showMessage("To sort in gene list mode right-click the header of a gene panel.");
        } else {
            ReferenceFrame frame = FrameManager.getDefaultFrame();
            RegionOfInterest roi = new RegionOfInterest(frame.getChrName(), (int) frame.getOrigin(), (int) frame.getEnd(), "");
            IGV.getInstance().sortByRegionScore(roi, RegionScoreType.SCORE, frame);
        }
    }
View Full Code Here

                    if (data.length >= 2) {
                        try {
                            String name = data.length > 3 ? data[3] : null;
                            int start = Integer.parseInt(data[1]) - coordConvention;
                            int end = data.length > 2 ? Integer.parseInt(data[2]) : start + 1;
                            RegionOfInterest regionOfInterest = new RegionOfInterest(data[0], start, end, name);
                            mainFrame.addRegionOfInterest(regionOfInterest);
                        } catch (NumberFormatException numberFormatException) {
                            log.error("Error importing regions of interest", numberFormatException);
                        }
                    }
View Full Code Here

    protected JPopupMenu getPopupMenu(final HeaderPanel parent, final ReferenceFrame frame) {

        int start = (int) frame.getOrigin();
        int end = (int) frame.getEnd();
        final RegionOfInterest roi = new RegionOfInterest(frame.getChrName(), start, end, "");

        JPopupMenu popupMenu = new RegionMenu(roi, frame, "Panel: " + frame.getName());


        // Zoom items
View Full Code Here

        ReferenceFrame frame = null;
        final int zoom = 0;
        final String chr = "chr20";
        final int start = Integer.parseInt("14104912") - 1;
        final int end = Integer.parseInt("36031032");
        RegionOfInterest roi = new RegionOfInterest(chr, start, end, "");

        IGV.sortByRegionScore(tracks, roi, type, frame);
        return checkIsSorted(tracks, roi, type, zoom, frame);
    }
View Full Code Here

        Collection<RegionOfInterest> regions = IGV.getInstance().getSession().getAllRegionsOfInterest();
        assertEquals(1, regions.size());

        ArrayList<RegionOfInterest> regionsAL = (ArrayList<RegionOfInterest>) regions;
        RegionOfInterest region = regionsAL.get(0);
        assertEquals("chr1", region.getChr());
        assertEquals(49, region.getStart());
        assertEquals(1000, region.getEnd());
        assertEquals(descstr, region.getDescription());

    }
View Full Code Here

                            if (start == end) {
                                ++end;
                            }

                            // Create a Region of Interest
                            RegionOfInterest regionOfInterest =
                                    new RegionOfInterest(
                                            chromosomeName,
                                            start,
                                            end,
                                            null);
                            // TODO -- get this ugly reference out of here
View Full Code Here

     */
    public void sortByRegionScore(RegionOfInterest region,
                                  final RegionScoreType type,
                                  final ReferenceFrame frame) {

        final RegionOfInterest r = region == null ? new RegionOfInterest(frame.getChrName(), (int) frame.getOrigin(),
                (int) frame.getEnd() + 1, frame.getName()) : region;

        // Create a rank order of samples.  This is done globally so sorting is consistent across groups and panels.
        final List<String> sortedSamples = sortSamplesByRegionScore(r, type, frame);

View Full Code Here

        String chromosome = getAttribute(element, SessionAttribute.CHROMOSOME.getText());
        String start = getAttribute(element, SessionAttribute.START_INDEX.getText());
        String end = getAttribute(element, SessionAttribute.END_INDEX.getText());
        String description = getAttribute(element, SessionAttribute.DESCRIPTION.getText());

        RegionOfInterest region = new RegionOfInterest(chromosome, new Integer(start), new Integer(end), description);
        IGV.getInstance().addRegionOfInterest(region);

        NodeList elements = element.getChildNodes();
        process(session, elements, additionalInformation, rootPath);
    }
View Full Code Here

TOP

Related Classes of org.broad.igv.feature.RegionOfInterest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.