Package org.broad.igv.lists

Examples of org.broad.igv.lists.GeneList



    private void loadGMT(ResourceLocator locator) throws IOException {
        List<GeneList> lists = GeneListManager.getInstance().loadGMTFile(locator.getPath());
        if (lists.size() == 1) {
            GeneList gl = lists.get(0);
            IGV.getInstance().setGeneList(gl, true);
        } else {
            MessageUtils.showMessage("Loaded " + lists.size() + " gene lists.");
        }
    }
View Full Code Here


                } else {
                    message = message + res.getMessage() + "\n";
                    showMessage = true;
                }
            }
            GeneList geneList = new GeneList("", loci, false);
            IGV.getInstance().getSession().setCurrentGeneList(geneList);
        }

        IGV.getInstance().resetFrames();
View Full Code Here

            contentPanel.add(dp);
        }
        add(contentPanel, BorderLayout.CENTER);

        if (FrameManager.isGeneListMode()) {
            GeneList gl = IGV.getInstance().getSession().getCurrentGeneList();
            String name = gl.getDisplayName();
            JLabel label = new JLabel(name, JLabel.CENTER);
            Border border = BorderFactory.createLineBorder(Color.lightGray);
            label.setBorder(border);
            add(label, BorderLayout.NORTH);
        }
View Full Code Here

     * Test that when we view a gene list it displays correctly
     */
    @Test
    public void testGeneListView(){
        List<String> loci = Arrays.asList("chr1:10000-20000", "chr2:30000-40000");
        GeneList geneList = new GeneList("", loci, false);

        IGV.getInstance().getSession().setCurrentGeneList(geneList);
        IGV.getInstance().resetFrames();
        IGV.getInstance().waitForNotify(5000);

View Full Code Here

    public void testGeneListView(){

        int paneSize = 300;

        List<String> loci = Arrays.asList("chr1:10000-20000", "chr2:30000-40000");
        GeneList geneList = new GeneList("", loci, false);
        FrameManager.resetFrames(geneList);
        List<ReferenceFrame> frameList = FrameManager.getFrames();

        //Simulate doing layout
        for(int ff = 0; ff < loci.size(); ff++){
View Full Code Here

            for (int i = 0; i < loci.size(); i++) {
                frames.get(i).jumpTo(new Locus(loci.get(i)));
            }
            repaint();
        } else {
            GeneList geneList = new GeneList("", loci, false);
            getSession().setCurrentGeneList(geneList);
            resetFrames();
        }

    }
View Full Code Here

                StringBuffer listName = new StringBuffer();
                for (String s : loci) {
                    listName.append(s + "   ");
                }

                GeneList geneList = new GeneList(listName.toString(), loci, false);
                currentSession.setCurrentGeneList(geneList);

                Comparator<String> geneListComparator = new Comparator<String>() {
                    @Override
                    public int compare(String n0, String n1) {
View Full Code Here

     */
    private GeneList getNewSeedGeneList() {
        String[] genes = seedGenesText.getText().toUpperCase().split("[\\r\\n]{1,2}");
        boolean updated = !Arrays.equals(seedGeneList.getLoci().toArray(), genes);
        if (updated) {
            return new GeneList(null, Arrays.asList(genes));
        } else {
            return seedGeneList;
        }
    }
View Full Code Here

    private void retrieveNetworkButtonActionPerformed(ActionEvent e) {
        updateNetwork();
    }

    private void updateNetwork() {
        GeneList newSeedGeneList = getNewSeedGeneList();
        boolean updated = newSeedGeneList != seedGeneList;
        if (updated) {
            seedGeneList = newSeedGeneList;
            loadcBioData();
        }
View Full Code Here

        String name = getAttribute(element, SessionAttribute.NAME.getText());

        String txt = element.getTextContent();
        String[] genes = txt.trim().split("\\s+");
        GeneList gl = new GeneList(name, Arrays.asList(genes));
        GeneListManager.getInstance().addGeneList(gl);
        session.setCurrentGeneList(gl);

        // Adjust frames
        processFrames(element);
View Full Code Here

TOP

Related Classes of org.broad.igv.lists.GeneList

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.