From dda2cc5009fdca2c0312fde5e006950c02438f9b Mon Sep 17 00:00:00 2001 From: psalguerog <59012739+psalguerog@users.noreply.github.com> Date: Mon, 5 Apr 2021 18:24:51 +0200 Subject: [PATCH] v1.0.7 Analyses - Fixed DFI for Single Time series - Fixed DEA for Single Time series - FEA now has the option to select all the features in one click General -RBPs feature now are showed in Transcript View -GO annotation has been updated (February 01 2021). -Miscellaneous changes. --- DlgFEAnalysis.java | 50 +- DlgGSEAnalysis.java | 53 +- dialogs/FEAParams.fxml | 17 +- dialogs/GSEAParams.fxml | 2 + resources/go.obo | 22016 +++++++++++++++++++------------------ scripts/DEA_TimeCourse.R | 279 +- scripts/DFI_TimeCourse.R | 1003 +- 7 files changed, 11993 insertions(+), 11427 deletions(-) diff --git a/DlgFEAnalysis.java b/DlgFEAnalysis.java index 755c254..fa64e13 100644 --- a/DlgFEAnalysis.java +++ b/DlgFEAnalysis.java @@ -6,6 +6,7 @@ package tappas; import javafx.beans.value.ObservableValue; +import javafx.collections.ObservableList; import javafx.scene.control.*; import javafx.stage.FileChooser; import javafx.stage.Window; @@ -28,6 +29,7 @@ public class DlgFEAnalysis extends DlgBase { Label lblBkgndSelection; TextField txtName, txtSigValue, txtSamplingCnt; ChoiceBox cbCompare, cbMethod, cbUseWOCat; + Hyperlink lnkClearAll, lnkCheckAll; TextField txtTestFile, txtBkgndFile; Button btnTestFile, btnBkgndFile; RadioButton rbGenes, rbProteins, rbTrans; @@ -65,6 +67,9 @@ public Params showAndWait(Params dfltParams) { cbMethod = (ChoiceBox) scene.lookup("#cbMethod"); cbUseWOCat = (ChoiceBox) scene.lookup("#cbUseWOCat"); TreeView tvf = (TreeView) scene.lookup("#tvFeatures"); + + lnkClearAll = (Hyperlink) scene.lookup("#lnkClearAll"); + lnkCheckAll = (Hyperlink) scene.lookup("#lnkCheckAll"); Label lblSamplingCnt = (Label) scene.lookup("#lblSamplingCnt"); // setup dialog @@ -110,7 +115,22 @@ else if(dfltParams.dataType.equals(DataType.TRANS)) txtSamplingCnt.setDisable(samdis1); }); onDataTypeChange(); - + + // setup database categories + lnkClearAll.setOnAction((event) -> { + if(tvf.isDisable()) + clearAllFeatures(tvf); + else + clearAllFeatures(tvf); + }); + + lnkCheckAll.setOnAction((event) -> { + if(tvf.isDisable()) + checkAllFeatures(tvf); + else + checkAllFeatures(tvf); + }); + // set test list int idx = Params.getTestListIndexFromID(dfltParams.testList.name()); for(int i = 0; i < cbTestLists.getItems().size(); i++) { @@ -172,6 +192,34 @@ else if(dfltParams.dataType.equals(DataType.TRANS)) // // Internal Functions // + private void clearAllFeatures(TreeView aux) { + TreeItem rootItem = aux.getRoot(); + ObservableList> lst = rootItem.getChildren(); + for(TreeItem ti : lst) { + CheckBoxTreeItem item = (CheckBoxTreeItem) ti; + ObservableList> sublst = item.getChildren(); + for(TreeItem subti : sublst) { + CheckBoxTreeItem subitem = (CheckBoxTreeItem) subti; + subitem.setSelected(false); + } + item.setSelected(false); + } + } + + private void checkAllFeatures(TreeView aux) { + TreeItem rootItem = aux.getRoot(); + ObservableList> lst = rootItem.getChildren(); + for(TreeItem ti : lst) { + CheckBoxTreeItem item = (CheckBoxTreeItem) ti; + ObservableList> sublst = item.getChildren(); + for(TreeItem subti : sublst) { + CheckBoxTreeItem subitem = (CheckBoxTreeItem) subti; + subitem.setSelected(true); + } + item.setSelected(true); + } + } + private void onDataTypeChange() { ArrayList lstTest = new ArrayList<>(); ArrayList lstBkgnd = new ArrayList<>(); diff --git a/DlgGSEAnalysis.java b/DlgGSEAnalysis.java index e9c6475..372de47 100644 --- a/DlgGSEAnalysis.java +++ b/DlgGSEAnalysis.java @@ -6,6 +6,7 @@ package tappas; import javafx.beans.value.ObservableValue; +import javafx.collections.ObservableList; import javafx.scene.control.*; import javafx.stage.FileChooser; import javafx.stage.Window; @@ -28,6 +29,7 @@ public class DlgGSEAnalysis extends DlgBase { Button btnRLFile1, btnRLFile2, btnSets; RadioButton rbGenes, rbProteins, rbTrans, rbFeatures, rbSets; ChoiceBox cbRankedLists1, cbRankedLists2, cbMethods; +// Hyperlink lnkClearAll, lnkCheckAll; TreeViewFeatures tvFeatures; CheckBox chkMulti; @@ -67,6 +69,9 @@ public Params showAndWait(Params dfltParams) { txtSets = (TextField) scene.lookup("#txtSets"); btnSets = (Button) scene.lookup("#btnSets"); TreeView tvf = (TreeView) scene.lookup("#tvFeatures"); + +// lnkClearAll = (Hyperlink) scene.lookup("#lnkClearAll"); +// lnkCheckAll = (Hyperlink) scene.lookup("#lnkCheckAll"); // set default values paramId = dfltParams.paramId; @@ -157,7 +162,9 @@ else if(dfltParams.dataType.equals(DataType.TRANS)) btnSets.setOnAction((event) -> { getSetsFile(); }); - // setup + // setup + // setup database categories + chkMulti.selectedProperty().addListener((ObservableValue ov, Boolean oldValue, Boolean newValue) -> { if(newValue){ lblRank2.setDisable(false); @@ -222,6 +229,20 @@ else if(dfltParams.dataType.equals(DataType.TRANS)) params = validate(dialog); return params; }); + +// lnkClearAll.setOnAction((event) -> { +// if(tvf.isDisable()) +// clearAllFeatures(tvf); +// else +// clearAllFeatures(tvf); +// }); +// +// lnkCheckAll.setOnAction((event) -> { +// if(tvf.isDisable()) +// checkAllFeatures(tvf); +// else +// checkAllFeatures(tvf); +// }); Optional result = dialog.showAndWait(); if(result.isPresent()) @@ -229,6 +250,36 @@ else if(dfltParams.dataType.equals(DataType.TRANS)) } return null; } + + //hyperlink funtions + private void clearAllFeatures(TreeView aux) { + TreeItem rootItem = aux.getRoot(); + ObservableList> lst = rootItem.getChildren(); + for(TreeItem ti : lst) { + CheckBoxTreeItem item = (CheckBoxTreeItem) ti; + ObservableList> sublst = item.getChildren(); + for(TreeItem subti : sublst) { + CheckBoxTreeItem subitem = (CheckBoxTreeItem) subti; + subitem.setSelected(false); + } + item.setSelected(false); + } + } + + private void checkAllFeatures(TreeView aux) { + TreeItem rootItem = aux.getRoot(); + ObservableList> lst = rootItem.getChildren(); + for(TreeItem ti : lst) { + CheckBoxTreeItem item = (CheckBoxTreeItem) ti; + ObservableList> sublst = item.getChildren(); + for(TreeItem subti : sublst) { + CheckBoxTreeItem subitem = (CheckBoxTreeItem) subti; + subitem.setSelected(true); + } + item.setSelected(true); + } + } + private void onDataTypeChange(ChoiceBox cb, Label lbl, TextField txt, Button btn) { ArrayList lst = new ArrayList<>(); cb.getSelectionModel().clearSelection(); diff --git a/dialogs/FEAParams.fxml b/dialogs/FEAParams.fxml index 1351212..6c4647f 100644 --- a/dialogs/FEAParams.fxml +++ b/dialogs/FEAParams.fxml @@ -1,10 +1,13 @@ + + - + + - + - -