Examples of BasicFeature


Examples of org.broad.igv.feature.BasicFeature

        int end = 26848;

        List<Feature> features = getGeneFeatures(filepath, chr, start, end);
        assertEquals(2, features.size());

        BasicFeature gene = null, tRNA = null;
        for (Feature feat : features) {
            if (((BasicFeature) feat).getType().equals("gene")) {
                gene = (BasicFeature) feat;
            } else if (((BasicFeature) feat).getType().equals("tRNA")) {
                tRNA = (BasicFeature) feat;
            }
        }

        assertEquals(gene.getIdentifier(), tRNA.getAttributes().get("Parent"));

        assertEquals(1, tRNA.getExonCount());
        Exon exon = tRNA.getExons().get(0);
        assertEquals(tRNA.getIdentifier(), exon.getAttributes().get("Parent"));
        assertWholeExonNonCoding(exon);
View Full Code Here

Examples of org.broad.igv.feature.BasicFeature

        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

Examples of org.broad.igv.feature.BasicFeature

        List<Feature> features = getGeneFeatures(filepath, chr, start, end);
        assertEquals(3, features.size());

        for (Feature feat : features) {
            BasicFeature bf = (BasicFeature) feat;
            if (bf.getType().equals("mRNA")) {
                assertEquals(8, bf.getExonCount());
                for (Exon exon : bf.getExons()) {
                    assertEquals(bf.getIdentifier(), exon.getAttributes().get("Parent"));
                    assertWholeExonCoding(exon);
                }
            }
        }
    }
View Full Code Here

Examples of org.broad.igv.feature.BasicFeature

                features.add(iter.next());
            }

            assertEquals(1, features.size());

            BasicFeature feature = (BasicFeature) features.get(0);
            List<Exon> exons = feature.getExons();
            assertEquals(2, exons.size());

            Exon firstExon = exons.get(0);
            assertTrue(firstExon.isNonCoding());
            assertEquals(11783, firstExon.getStart());
View Full Code Here

Examples of org.broad.igv.feature.BasicFeature

        AbstractFeatureReader bfr = AbstractFeatureReader.getFeatureReader(bedFile, new IGVBEDCodec());
        Iterator<BasicFeature> iter = bfr.query(chr, start, end);
        int countInterval = 0;
        while (iter.hasNext()) {
            BasicFeature feature = iter.next();
            Assert.assertTrue(feature.getEnd() >= start && feature.getStart() <= end);
            Assert.assertTrue(expectedNames.contains(feature.getName()));
            countInterval++;
        }

        assertEquals(expectedCount, countInterval);
View Full Code Here

Examples of org.broad.igv.feature.BasicFeature

        AbstractFeatureReader bfr = AbstractFeatureReader.getFeatureReader(bedFile, new IGVBEDCodec());
        Iterator<BasicFeature> iter = bfr.query(chr, start, end);
        int countInterval = 0;
        while (iter.hasNext()) {
            BasicFeature feature = iter.next();
            Assert.assertTrue(feature.getEnd() >= start && feature.getStart() <= end);
            Assert.assertTrue(expectedNames.contains(feature.getName()));
            countInterval++;
        }

        assertEquals(expectedCount, countInterval);
    }
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.