Package htsjdk.tribble

Examples of htsjdk.tribble.BasicFeature


        Assert.assertEquals(loc.getStop(), read.getAlignmentStart());
    }

    @Test
    public void testCreationFromFeature() {
        final Feature feature = new BasicFeature("chr1", 1, 5);
        final GenomeLoc loc = genomeLocParser.createGenomeLoc(feature);
        Assert.assertEquals(loc.getContig(), feature.getChr());
        Assert.assertEquals(loc.getStart(), feature.getStart());
        Assert.assertEquals(loc.getStop(), feature.getEnd());
    }
View Full Code Here


    }

    public void initializeTests() {
        final List<Feature> handPickedFeatures = new ArrayList<Feature>();

        handPickedFeatures.add(new BasicFeature(contig, 1, 1));
        handPickedFeatures.add(new BasicFeature(contig, 2, 5));
        handPickedFeatures.add(new BasicFeature(contig, 4, 4));
        handPickedFeatures.add(new BasicFeature(contig, 6, 6));
        handPickedFeatures.add(new BasicFeature(contig, 9, 10));
        handPickedFeatures.add(new BasicFeature(contig, 10, 10));
        handPickedFeatures.add(new BasicFeature(contig, 10, 11));
        handPickedFeatures.add(new BasicFeature(contig, 13, 20));

        createTestsForFeatures(handPickedFeatures);

        // test in the present of a large spanning element
        {
            List<Feature> oneLargeSpan = new ArrayList<Feature>(handPickedFeatures);
            oneLargeSpan.add(new BasicFeature(contig, 1, 30));
            createTestsForFeatures(oneLargeSpan);
        }

        // test in the presence of a partially spanning element
        {
            List<Feature> partialSpanStart = new ArrayList<Feature>(handPickedFeatures);
            partialSpanStart.add(new BasicFeature(contig, 1, 6));
            createTestsForFeatures(partialSpanStart);
        }

        // test in the presence of a partially spanning element at the end
        {
            List<Feature> partialSpanEnd = new ArrayList<Feature>(handPickedFeatures);
            partialSpanEnd.add(new BasicFeature(contig, 10, 30));
            createTestsForFeatures(partialSpanEnd);
        }

        // no data at all
        final GenomeLoc loc = genomeLocParser.createGenomeLoc(contig, 5, 5);
View Full Code Here

TOP

Related Classes of htsjdk.tribble.BasicFeature

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.