Search in sources :

Example 1 with KnnViewFrame

use of edu.ucsf.rbvi.clusterMaker2.internal.treeview.KnnViewFrame in project clusterMaker2 by RBVI.

the class KnnView method startup.

protected void startup() {
    CyProperty cyProperty = manager.getService(CyProperty.class, "(cyPropertyName=cytoscape3.props)");
    // Get our data model
    dataModel = new KnnViewModel(monitor, myNetwork, myView, manager);
    // Set up the global config
    setConfigDefaults(new PropertyConfig(cyProperty, globalConfigName(), "ProgramConfig"));
    // Set up our configuration
    PropertyConfig documentConfig = new PropertyConfig(cyProperty, getShortName(), "DocumentConfig");
    dataModel.setDocumentConfig(documentConfig);
    // Create our view frame
    KnnViewFrame frame = new KnnViewFrame(this, appName);
    // Set the data model
    frame.setDataModel(dataModel);
    frame.setLoaded(true);
    frame.addWindowListener(this);
    frame.setVisible(true);
    geneSelection = frame.getGeneSelection();
    geneSelection.addObserver(this);
    arraySelection = frame.getArraySelection();
    arraySelection.addObserver(this);
    manager.registerService(this, RowsSetListener.class, new Properties());
}
Also used : KnnViewFrame(edu.ucsf.rbvi.clusterMaker2.internal.treeview.KnnViewFrame) CyProperty(org.cytoscape.property.CyProperty) KnnViewModel(edu.ucsf.rbvi.clusterMaker2.internal.treeview.model.KnnViewModel) PropertyConfig(edu.ucsf.rbvi.clusterMaker2.internal.treeview.PropertyConfig) Properties(java.util.Properties)

Example 2 with KnnViewFrame

use of edu.ucsf.rbvi.clusterMaker2.internal.treeview.KnnViewFrame in project clusterMaker2 by RBVI.

the class BiclusterView method startup.

protected void startup() {
    CyProperty cyProperty = manager.getService(CyProperty.class, "(cyPropertyName=cytoscape3.props)");
    /*
		Map<Integer, List<String>> clusterNodes = getBiclusterNodes();
		Map<Integer, List<String>> clusterAttrs = getBiclusterAttributes();
		
		
		ArrayList<String> nodeArrayL = new ArrayList<String>();
		for(Integer key:clusterNodes.keySet()){
			List<String> bicluster =  clusterNodes.get(key);
			for(String node:bicluster){
				nodeArrayL.add(node);
			}			
		}
		
		// ModelUtils.createAndSetLocal(myNetwork, myNetwork, ClusterManager.NODE_ORDER_ATTRIBUTE, 
    //             nodeArrayL, List.class, String.class);
		
		ArrayList<String> attrArrayL = new ArrayList<String>();
		for(Integer key:clusterAttrs.keySet()){
			List<String> bicluster =  clusterAttrs.get(key);
			for(String attr:bicluster){
				attrArrayL.add(attr);
			}			
		}
		// ModelUtils.createAndSetLocal(myNetwork, myNetwork, ClusterManager.ARRAY_ORDER_ATTRIBUTE, 
		// 		attrArrayL, List.class, String.class);
		*/
    /*
		//Using the overlapping and reordering for node and array order attributes
		mergeBiclusters(clusterNodes,clusterAttrs);
		ModelUtils.createAndSetLocal(myNetwork, myNetwork, ClusterManager.NODE_ORDER_ATTRIBUTE, 
                rowList, List.class, String.class);
		ModelUtils.createAndSetLocal(myNetwork, myNetwork, ClusterManager.ARRAY_ORDER_ATTRIBUTE, 
				colList, List.class, String.class);
		*/
    // Get our data model
    // FIXME: Can't use the KnnViewModel because it's going to
    // fill in all of the data for each cell and we only want to
    // fill in the data for the cells within the bicluster
    dataModel = new KnnViewModel(monitor, myNetwork, myView, manager);
    // Set up the global config
    setConfigDefaults(new PropertyConfig(cyProperty, globalConfigName(), "ProgramConfig"));
    // Set up our configuration
    PropertyConfig documentConfig = new PropertyConfig(cyProperty, getShortName(), "DocumentConfig");
    dataModel.setDocumentConfig(documentConfig);
    // Create our view frame
    KnnViewFrame frame = new KnnViewFrame(this, appName);
    // Set the data model
    frame.setDataModel(dataModel);
    frame.setLoaded(true);
    frame.addWindowListener(this);
    frame.setVisible(true);
    geneSelection = frame.getGeneSelection();
    geneSelection.addObserver(this);
    arraySelection = frame.getArraySelection();
    arraySelection.addObserver(this);
    manager.registerService(this, RowsSetListener.class, new Properties());
}
Also used : KnnViewFrame(edu.ucsf.rbvi.clusterMaker2.internal.treeview.KnnViewFrame) CyProperty(org.cytoscape.property.CyProperty) KnnViewModel(edu.ucsf.rbvi.clusterMaker2.internal.treeview.model.KnnViewModel) PropertyConfig(edu.ucsf.rbvi.clusterMaker2.internal.treeview.PropertyConfig) Properties(java.util.Properties)

Aggregations

KnnViewFrame (edu.ucsf.rbvi.clusterMaker2.internal.treeview.KnnViewFrame)2 PropertyConfig (edu.ucsf.rbvi.clusterMaker2.internal.treeview.PropertyConfig)2 KnnViewModel (edu.ucsf.rbvi.clusterMaker2.internal.treeview.model.KnnViewModel)2 Properties (java.util.Properties)2 CyProperty (org.cytoscape.property.CyProperty)2