Examples of ReferenceFrame


Examples of edu.cmu.cs.stage3.alice.core.ReferenceFrame

  public Class getValueClass() {
    return Number.class;
  }
  protected abstract SpatialRelation getSpatialRelation();
  protected Object getValue( Transformable subjectValue, Transformable objectValue ) {
    ReferenceFrame asSeenByValue = asSeenBy.getReferenceFrameValue();
    return new Double( subjectValue.getSpatialRelationDistance( getSpatialRelation(), objectValue, asSeenByValue ) );
  }
View Full Code Here

Examples of edu.cmu.cs.stage3.alice.core.ReferenceFrame

public abstract class SubjectAsSeenByQuestion extends SubjectQuestion {
  public final ReferenceFrameProperty asSeenBy = new ReferenceFrameProperty( this, "asSeenBy", null );
  protected abstract Object getValue( Transformable subjectValue, ReferenceFrame asSeenByValue );
  protected Object getValue( Transformable subjectValue ) {
    ReferenceFrame asSeenByValue = asSeenBy.getReferenceFrameValue();
    return getValue( subjectValue, asSeenByValue );
  }
View Full Code Here

Examples of edu.cmu.cs.stage3.alice.core.ReferenceFrame

  protected abstract SpatialRelation getSpatialRelation();
  public Class getValueClass() {
    return Boolean.class;
  }
  protected Object getValue( Transformable subjectValue, Transformable objectValue ) {
    ReferenceFrame asSeenByValue = asSeenBy.getReferenceFrameValue();
    if( subjectValue.isInSpatialRelationTo( getSpatialRelation(), objectValue, asSeenByValue ) ) {
      return Boolean.TRUE;
    } else {
      return Boolean.FALSE;
    }
View Full Code Here

Examples of org.broad.igv.ui.panel.ReferenceFrame


        menuAction = new MenuAction("Scatter Plot ...") {
            @Override
            public void actionPerformed(ActionEvent e) {
                final ReferenceFrame defaultFrame = FrameManager.getDefaultFrame();
                String chr = defaultFrame.getChrName();
                int start = (int) defaultFrame.getOrigin();
                int end = (int) defaultFrame.getEnd();
                int zoom = defaultFrame.getZoom();
                ScatterPlotUtils.openPlot(chr, start, end, zoom);
            }
        };
        menuItems.add(MenuAndToolbarUtils.createMenuItem(menuAction));
View Full Code Here

Examples of org.broad.igv.ui.panel.ReferenceFrame

        return false;
    }

    public Feature getFeatureAtMousePosition(TrackClickEvent te) {
        MouseEvent e = te.getMouseEvent();
        final ReferenceFrame referenceFrame = te.getFrame();
        if (referenceFrame != null) {
            double location = referenceFrame.getChromosomePosition(e.getX());
            List<Feature> features = getAllFeatureAt(location, e.getY(), referenceFrame);
            return (features != null && features.size() > 0) ? features.get(0) : null;
        } else {
            return null;
        }
View Full Code Here

Examples of org.broad.igv.ui.panel.ReferenceFrame

        super.setDisplayMode(mode);
    }

    @Override
    public void load(RenderContext context) {
        ReferenceFrame frame = context.getReferenceFrame();
        PackedFeatures packedFeatures = packedFeaturesMap.get(frame.getName());
        String chr = context.getChr();
        int start = (int) context.getOrigin();
        int end = (int) context.getEndLocation();
        if (packedFeatures == null || !packedFeatures.containsInterval(chr, start, end)) {
            try {
                context.getReferenceFrame().getEventBus().unregister(FeatureTrack.this);
            } catch (IllegalArgumentException e) {
                //Don't care
            }
            loadFeatures(frame.getChrName(), (int) frame.getOrigin(), (int) frame.getEnd(), context);
        }
    }
View Full Code Here

Examples of org.broad.igv.ui.panel.ReferenceFrame

        // TODO -- do right thing if in geneListView
        if (FrameManager.isGeneListMode()) {
            MessageUtils.showMessage("To sort in gene list mode right-click the header of a gene panel.");
        } else {
            ReferenceFrame frame = FrameManager.getDefaultFrame();
            RegionOfInterest roi = new RegionOfInterest(frame.getChrName(), (int) frame.getOrigin(), (int) frame.getEnd(), "");
            IGV.getInstance().sortByRegionScore(roi, RegionScoreType.SCORE, frame);
        }
    }
View Full Code Here

Examples of org.broad.igv.ui.panel.ReferenceFrame

    void openTimeSeriesPlot(TrackClickEvent trackClickEvent) {

        if (trackClickEvent == null) return;

        ReferenceFrame referenceFrame = trackClickEvent.getFrame();
        if (referenceFrame == null) return;

        String chr = referenceFrame.getChrName();
        double position = trackClickEvent.getChromosomePosition();

        XYSeriesCollection data = new XYSeriesCollection();
        List<Color> colors = new ArrayList();
        for (SoftReference<PeakTrack> ref : PeakTrack.instances) {
View Full Code Here

Examples of org.broad.igv.ui.panel.ReferenceFrame

     * Rescale as necessary, and tell components to repaint
     * @param e
     */
    @Subscribe
    public void receiveDataLoaded(DataLoadedEvent e){
        ReferenceFrame frame = e.context.getReferenceFrame();
        rescale(frame);
        frame.getEventBus().post(new ViewChange.Result());
    }
View Full Code Here

Examples of org.broad.igv.ui.panel.ReferenceFrame

    @BeforeClass
    public static void setup() throws IOException {
        Map<String, List<Feature>> allFeatures = loadTestFeatures();

        frame = new ExomeReferenceFrame(new ReferenceFrame("test"), allFeatures);
        frame.jumpTo(new Locus("chr6", 1, 100));
    }
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.