Package org.broad.igv.feature

Examples of org.broad.igv.feature.Mutation


        synchronized Iterator<Mutation> getFeatures(String trackKey, String chr, int start, int end) throws IOException {
            if (currentRange == null || !currentRange.contains(chr, start, end)) {
                Iterator<Feature> features = tribbleFeatureSource.getFeatures(chr, start, end);

                while (features.hasNext()) {
                    Mutation feat = (Mutation) features.next();
                    String thisKey = feat.getSampleId();
                    List<Mutation> keyFeatures = featureMap.get(thisKey);
                    if (keyFeatures == null) {
                        keyFeatures = new ArrayList<Mutation>();
                        featureMap.put(thisKey, keyFeatures);
                    }
View Full Code Here


    public boolean handleDataClick(TrackClickEvent te) {

        Feature f = getFeatureAtMousePosition(te);
        if (f != null && f instanceof Mutation) {

            final Mutation mut = (Mutation) f;
            final MouseEvent me = te.getMouseEvent();
            System.out.println("Submitting");
            LongRunningTask.submit(new NamedRunnable() {
                public String getName() {
                    return "Call OMA";
                }

                public void run() {

                    StringBuffer buf = new StringBuffer();
                    buf.append("<html>");

                    final String omaURL = mut.getOMAUrl();
                    if (omaURL != null) {
                        System.out.println("Running");
                        String omaText = getOMAText(mut, omaURL);
                        if (omaText != null) {
                            buf.append(omaText);
                            buf.append("<p>----------------------------------</p>");
                        }
                    }

                    buf.append(mut.getFullDescription());
                    buf.append("</html>");


                    final TooltipTextFrame tf = new TooltipTextFrame(MutationTrack.this.getName(), buf.toString());
                    Point p = me.getComponent().getLocationOnScreen();
View Full Code Here

        MutationFeatureSource.MutationDataManager mgr = new MutationFeatureSource.MutationDataManager(new ResourceLocator(path), genome);
        Iterator<Mutation> mutations =  mgr.getFeatures(sample, chr, start, end);

        int mutationCount = 0;
        while(mutations.hasNext()) {
            Mutation m = mutations.next();
            assertEquals(chr, m.getChr());

            if(m.getStart() >= start && m.getEnd() <= end) {
                mutationCount++;
            }
        }

        // There are 2 mutations for this sample in this interval
View Full Code Here

                attributes.put(key, value);
            }
        }


        Mutation mut = new Mutation(sampleId, chr, start, end, type);
        mut.setAttributes(attributes);

        if (refAlleleColumn > 0) {
            mut.setRefAllele(tokens[refAlleleColumn].trim());
        }
        if (tumorAllele1Column > 0) {
            mut.setAltAllele1(tokens[tumorAllele1Column].trim());
        }
        if (tumorAllele2Column > 0) {
            mut.setAltAllele2(tokens[tumorAllele2Column].trim());
        }

        return mut;
    }
View Full Code Here

TOP

Related Classes of org.broad.igv.feature.Mutation

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.