Examples of SegmentedAsciiDataSet


Examples of org.broad.igv.data.seg.SegmentedAsciiDataSet

    private SegmentedAsciiDataSet loadSegFile() throws Exception {
        String filePath = TestUtils.DATA_DIR + "seg/canFam2_hg18.seg";
        ResourceLocator locator = new ResourceLocator(filePath);
        SegmentedReader reader = new SegmentedReader(locator);
        SegmentedAsciiDataSet ds = reader.loadFromFile();

        assertEquals(18, ds.getChromosomes().size());

        return ds;
    }
View Full Code Here

Examples of org.broad.igv.data.seg.SegmentedAsciiDataSet

        return ds;
    }

    @Test
    public void testLoadSegFile() throws Exception {
        SegmentedAsciiDataSet ds = loadSegFile();
        assertNotNull(ds);
        assertFalse(ds.getChromosomes().isEmpty());
    }
View Full Code Here

Examples of org.broad.igv.data.seg.SegmentedAsciiDataSet

        assertFalse(ds.getChromosomes().isEmpty());
    }

    @Test
    public void testLoadSegDB() throws Exception {
        SegmentedAsciiDataSet ds = loadSegDB();
        assertNotNull(ds);
        assertFalse(ds.getChromosomes().isEmpty());
    }
View Full Code Here

Examples of org.broad.igv.data.seg.SegmentedAsciiDataSet

        ResourceLocator locator = new ResourceLocator(url);
        String tableName = "canFam2";

        SegmentedReader reader = new SegmentedReader(locator);
        DBProfile.DBTable table = DBProfile.DBTable.build(locator, tableName);
        SegmentedAsciiDataSet ds = reader.loadFromDB(table);

        return ds;
    }
View Full Code Here

Examples of org.broad.igv.data.seg.SegmentedAsciiDataSet

        return ds;
    }

    @Test
    public void compareFileDB() throws Exception {
        SegmentedAsciiDataSet fileDS = loadSegFile();
        SegmentedAsciiDataSet dbDS = loadSegDB();

        assertEquals(fileDS.getChromosomes(), dbDS.getChromosomes());
        assertEquals(fileDS.getSampleNames(), dbDS.getSampleNames());
    }
View Full Code Here

Examples of org.broad.igv.data.seg.SegmentedAsciiDataSet

        locator.setPassword("nottherealpassword");
        String tableName = "CNV";
        DBProfile.DBTable table = DBProfile.DBTable.build(locator, tableName);

        SegmentedReader reader = new SegmentedReader(locator);
        SegmentedAsciiDataSet ds = reader.loadFromDB(table);

    }
View Full Code Here

Examples of org.broad.igv.data.seg.SegmentedAsciiDataSet

        this.genome = genome;
    }

    @Override
    protected SegmentedAsciiDataSet processResultSet(ResultSet rs) throws SQLException {
        SegmentedAsciiDataSet dataset = new SegmentedAsciiDataSet(genome);
        while (rs.next()) {

            String sample = rs.getString("Sample");
            String chr = rs.getString("chr");
            int start = rs.getInt("start");
            int end = rs.getInt("end");
            float value = rs.getFloat("value");
            String description = rs.getString("description");
            dataset.addSegment(sample, chr, start, end, value, description);

        }
        dataset.sortLists();
        return dataset;
    }
View Full Code Here

Examples of org.broad.igv.data.seg.SegmentedAsciiDataSet

     *
     * @return
     */
    public SegmentedAsciiDataSet loadFromFile() {

        dataset = new SegmentedAsciiDataSet(genome);

        if (birdsuite) {
            dataset.setTrackType(TrackType.CNV);
        }

View Full Code Here

Examples of org.broad.igv.data.seg.SegmentedAsciiDataSet

            dataset.sortLists();
            return dataset;
        }

        private int readHeader(ResultSet rs) throws SQLException {
            dataset = new SegmentedAsciiDataSet(genome);
            /*sampleColumn = 0;
            chrColumn = 1;
            startColumn = 2;
            endColumn = 3;*/
            dataColumn = rs.getMetaData().getColumnCount() - 1;
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.