Package org.broad.igv.track

Examples of org.broad.igv.track.GFFFeatureSource


public class GFFTest{//} extends AbstractHeadlessTest{


    private List<Feature> getFeatures(String filePath) throws Exception{

        GFFFeatureSource src =  new GFFFeatureSource(TribbleFeatureSource.getFeatureSource(new ResourceLocator(filePath), null));

        List<Feature> features = new ArrayList<Feature>();
        Iterator<Feature> iter = src.getFeatures("chr1", 0, Integer.MAX_VALUE);
        while(iter.hasNext()) features.add(iter.next());

        return features;
    }
View Full Code Here


    @Test
    public void testGetNameGTF() throws Exception {
        String path = TestUtils.DATA_DIR + "gtf/transcript_id.gtf";
        String expName = "YAL069W";

        GFFFeatureSource src = new GFFFeatureSource(TribbleFeatureSource.getFeatureSource(new ResourceLocator(path), null));

        Iterator<Feature> iter = src.getFeatures("I", 0, Integer.MAX_VALUE);
        while (iter.hasNext()) {
            BasicFeature bf = (BasicFeature) iter.next();
            assertEquals(expName, bf.getName());
        }
View Full Code Here

        String path = TestUtils.DATA_DIR + "gff/gffWithFasta.gff";
        final ResourceLocator locator = new ResourceLocator(path);

        TribbleFeatureSource tribbleFeatureSource = TribbleFeatureSource.getFeatureSource(locator, genome);
        FeatureSource source = new GFFFeatureSource(tribbleFeatureSource);

        int featureCount = 0;
        Iterator<Feature> iter = source.getFeatures("chr7", 0, Integer.MAX_VALUE);
        while (iter.hasNext()) {
            BasicFeature bf = (BasicFeature) iter.next();
            featureCount++;
        }
        assertEquals(2, featureCount);
View Full Code Here

TOP

Related Classes of org.broad.igv.track.GFFFeatureSource

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.