Examples of RegionOfInterest


Examples of org.broad.igv.feature.RegionOfInterest

                int[] selectedRows = regionTable.getSelectedRows();
                if (selectedRows != null && selectedRows.length > 0
                        && regions.size() >= selectedRows.length//dhmay: this is hacky. Bad things can happen with clear regions
                {
                    RegionOfInterest firstStartRegion = null;
                    RegionOfInterest lastEndRegion = null;

                    Set<String> selectedChrs = new HashSet<String>();

                    //Figure out which region has the first start and which has the last end
                    for (int selectedRowIndex : selectedRows) {
                        int selectedModelRow = regionTableRowSorter.convertRowIndexToModel(selectedRowIndex);
                        RegionOfInterest region = regions.get(selectedModelRow);
                        selectedChrs.add(region.getChr());
                        if (firstStartRegion == null || region.getStart() < firstStartRegion.getStart())
                            firstStartRegion = region;
                        if (lastEndRegion == null || region.getEnd() > lastEndRegion.getEnd())
                            lastEndRegion = region;
                    }

                    //If there are multiple chromosomes represented in the selection, do nothing.
                    //Because what would we do? Maybe a status message should be displayed somehow, but a
View Full Code Here

Examples of org.broad.igv.feature.RegionOfInterest

                JOptionPane.showMessageDialog(IGV.getMainFrame(),
                        "Regions cannot be created in the All Chromosomes view.",
                        "Error", JOptionPane.INFORMATION_MESSAGE);
            } else {
                Range r = FrameManager.getDefaultFrame().getCurrentRange();
                RegionOfInterest newRegion = new RegionOfInterest(r.getChr(), r.getStart(), r.getEnd(), "");
                IGV.getInstance().getSession().addRegionOfInterestWithNoListeners(newRegion);
            }
            updateButtonsEnabled();
        }
View Full Code Here

Examples of org.broad.igv.feature.RegionOfInterest

                    for (RegionOfInterest roi : selectedRegions) {
                        loci.add(roi.getLocusString());
                    }
                } else {
                    //Need to preserve current zoom, iff checkbox not selected and only choosing 1
                    RegionOfInterest roi = selectedRegions.get(0);
                    Range range = FrameManager.getDefaultFrame().getCurrentRange();
                    int length = range.getLength();
                    int start = roi.getCenter() - length / 2;
                    int end = start + length;
                    //Shift so we don't go below 0
                    if(start < 0){
                        end += Math.abs(start);
                        start = 0;
                    }
                    loci.add(new RegionOfInterest(roi.getChr(), start, end, roi.getDescription()).getLocusString());
                }
                GeneList geneList = new GeneList("Regions of Interest", loci, false);
                IGV.getInstance().getSession().setCurrentGeneList(geneList);
                IGV.getInstance().resetFrames();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.