Search in sources :

Example 1 with CutoffParam

use of org.baderlab.csplugins.enrichmentmap.view.control.io.ViewParams.CutoffParam in project EnrichmentMapApp by BaderLab.

the class ControlPanelMediator method getAllViewParams.

public Map<Long, ViewParams> getAllViewParams() {
    Map<Long, ViewParams> map = new HashMap<>();
    getControlPanel().getAllControlPanels().forEach((suid, panel) -> {
        CutoffParam cuttofParam = panel.getPValueRadio().isSelected() ? CutoffParam.P_VALUE : CutoffParam.Q_VALUE;
        Double pVal = panel.getPValueSliderPanel() != null ? panel.getPValueSliderPanel().getValue() : null;
        Double qVal = panel.getQValueSliderPanel() != null ? panel.getQValueSliderPanel().getValue() : null;
        Double sCoeff = panel.getSimilaritySliderPanel() != null ? panel.getSimilaritySliderPanel().getValue() : null;
        Set<AbstractDataSet> uncheckedDataSets = panel.getUncheckedDataSets();
        Set<String> filteredDataSets = uncheckedDataSets.stream().map(AbstractDataSet::getName).collect(Collectors.toSet());
        EMStyleOptions options = createStyleOptions(panel.getNetworkView());
        boolean pubReady = panel.getPublicationReadyCheck().isSelected();
        ViewParams params = new ViewParams(suid, cuttofParam, pVal, qVal, sCoeff, filteredDataSets, options.getChartOptions(), pubReady);
        map.put(suid, params);
    });
    return map;
}
Also used : EMStyleOptions(org.baderlab.csplugins.enrichmentmap.style.EMStyleOptions) ViewParams(org.baderlab.csplugins.enrichmentmap.view.control.io.ViewParams) HashMap(java.util.HashMap) AbstractDataSet(org.baderlab.csplugins.enrichmentmap.model.AbstractDataSet) CutoffParam(org.baderlab.csplugins.enrichmentmap.view.control.io.ViewParams.CutoffParam)

Aggregations

HashMap (java.util.HashMap)1 AbstractDataSet (org.baderlab.csplugins.enrichmentmap.model.AbstractDataSet)1 EMStyleOptions (org.baderlab.csplugins.enrichmentmap.style.EMStyleOptions)1 ViewParams (org.baderlab.csplugins.enrichmentmap.view.control.io.ViewParams)1 CutoffParam (org.baderlab.csplugins.enrichmentmap.view.control.io.ViewParams.CutoffParam)1