Examples of Locus


Examples of org.broad.igv.feature.Locus

        assertConsistent();
    }

    @Test
    public void testJumpTo_00() throws Exception{
        Locus locus = new Locus("chr1", 1000, 2000);
        frame.jumpTo(locus);

        assertEquals(locus.getChr(), frame.getChrName());
        assertEquals(locus.getStart(), frame.getOrigin(), 1.0);
        assertEquals(locus.getEnd(), frame.getEnd(), 1.0);
        assertConsistent();
    }
View Full Code Here

Examples of org.broad.igv.feature.Locus

        assertConsistent();
    }

    @Test
    public void testJumpTo_01() throws Exception{
        Locus locus = new Locus("chr1", 1000, 2000);
        frame.jumpTo(locus);
        double oldLocScale = frame.getScale();
        int oldZoom = frame.getZoom();
        int oldMidPoint = frame.getMidpoint();
        double oldCenter = frame.getCenter();

        int delta = 12344;
        frame.jumpTo(locus.getChr(), locus.getStart() + delta, locus.getEnd() + delta);

        assertEquals(oldLocScale, frame.getScale());
        assertEquals(oldZoom, frame.getZoom());
        assertEquals(oldMidPoint, frame.getMidpoint());
View Full Code Here

Examples of org.broad.igv.feature.Locus

        for(int ii=0; ii < loci.size(); ii++){
            ReferenceFrame frame = frameList.get(ii);
            ReferenceFrameTest.assertConsistent(frame);

            Locus locus = Locus.fromString(loci.get(ii));

            assertEquals(locus.getChr(), frame.getChrName());
            assertEquals(locus.getStart() - 1, frame.getOrigin(), 0.5);
            assertEquals(locus.getEnd(), frame.getEnd(), 0.5);
        }
    }
View Full Code Here

Examples of org.broad.igv.feature.Locus


        IGV.getInstance().goToLocus("EGFR");
        FeatureTrack posTrack = (FeatureTrack) PosNegFeatureTracks.get(0);
        FeatureTrack negTrack = (FeatureTrack) PosNegFeatureTracks.get(1);
        Feature expFeature = new Locus("chr7", 55054248, 55054301);

        ReferenceFrame frame = FrameManager.getDefaultFrame();
        List<Feature> posFeats = posTrack.getFeatures(frame.getChrName(), (int) frame.getOrigin(), (int) frame.getEnd());

        assertEquals(1, posFeats.size());
View Full Code Here

Examples of org.broad.igv.feature.Locus

        int lastStart = genome.getChromosome(chr).getLength() - 4 * halfwidth;
        int[] starts = new int[]{500, 5000, 15000, start, 500000, lastStart};
        int[] ends = new int[]{600, 10000, 20000, end, 600000, lastStart + 2 * halfwidth};
        for (int ii = 0; ii < starts.length; ii++) {
            frame.jumpTo(new Locus(chr, starts[ii], ends[ii]));
            int actEnd = (int) frame.getEnd();

            manager.load(context, renderOptions, false);

            assertManagerHasInterval(manager, chr, starts[ii], actEnd);
View Full Code Here

Examples of org.broad.igv.feature.Locus

        frame.setBounds(0, end - start);
        RenderContextImpl context = new RenderContextImpl(null, null, frame, null);

        for (int pp = 0; pp < numPans; pp++) {
            shift = pp * panInterval;
            Locus locus = new Locus(chr, start + shift, end + shift);
            frame.jumpTo(locus);

            manager.load(context, renderOptions, false);

            assertManagerHasInterval(manager, chr, locus.getStart(), locus.getEnd());
        }

        return manager.getLoadedInterval(frame.getCurrentRange());

    }
View Full Code Here

Examples of org.broad.igv.feature.Locus

        assertEquals(startingNumTracks + 2, tracks.size());

        String startLocString = "chr1:151666494-151666594";

        String midLocString = "chr1:153148479-153148579";
        Locus midLocus = Locus.fromString(midLocString);

        String destLocString = "chr1:155232055-155232155";
        Locus destLocus = Locus.fromString(destLocString);


        AlignmentTrack alTrack = (AlignmentTrack) tracks.get(1);
        AlignmentDataManager dataManager = (alTrack).getDataManager();
View Full Code Here

Examples of org.broad.igv.feature.Locus

    public void goToLociList(List<String> loci) {

        List<ReferenceFrame> frames = FrameManager.getFrames();
        if (frames.size() == loci.size()) {
            for (int i = 0; i < loci.size(); i++) {
                frames.get(i).jumpTo(new Locus(loci.get(i)));
            }
            repaint();
        } else {
            GeneList geneList = new GeneList("", loci, false);
            getSession().setCurrentGeneList(geneList);
View Full Code Here

Examples of org.broad.igv.feature.Locus

        if (exomeTrack == null) return false;

        ExomeReferenceFrame exomeFrame = new ExomeReferenceFrame(defaultFrame, exomeTrack);

        Locus locus = new Locus(defaultFrame.getChrName(), (int) defaultFrame.getOrigin(), (int) defaultFrame.getEnd());
        exomeFrame.jumpTo(locus);
        defaultFrame = exomeFrame;
        frames.clear();
        frames.add(defaultFrame);
        exomeMode = true;
View Full Code Here

Examples of org.broad.igv.feature.Locus

    }

    private static boolean switchToGenomeMode() {
        ReferenceFrame refFrame = new ReferenceFrame(defaultFrame);

        Locus locus = new Locus(defaultFrame.getChrName(), (int) defaultFrame.getOrigin(), (int) defaultFrame.getEnd());
        refFrame.jumpTo(locus);
        defaultFrame = refFrame;
        frames.clear();
        frames.add(defaultFrame);
        exomeMode = false;
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.