Package org.broad.igv.data.seg

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


        return ds;
    }

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

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

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

        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

        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

        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

        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

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

        dataset = new SegmentedAsciiDataSet(genome);

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

View Full Code Here

            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

Related Classes of org.broad.igv.data.seg.SegmentedAsciiDataSet

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.