Skip to content

Commit

Permalink
v1.0.7
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
psalguerog committed Apr 5, 2021
1 parent 80ba4ec commit dda2cc5
Show file tree
Hide file tree
Showing 7 changed files with 11,993 additions and 11,427 deletions.
50 changes: 49 additions & 1 deletion DlgFEAnalysis.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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++) {
Expand Down Expand Up @@ -172,6 +192,34 @@ else if(dfltParams.dataType.equals(DataType.TRANS))
//
// Internal Functions
//
private void clearAllFeatures(TreeView aux) {
TreeItem<String> rootItem = aux.getRoot();
ObservableList<TreeItem<String>> lst = rootItem.getChildren();
for(TreeItem ti : lst) {
CheckBoxTreeItem<String> item = (CheckBoxTreeItem<String>) ti;
ObservableList<TreeItem<String>> sublst = item.getChildren();
for(TreeItem subti : sublst) {
CheckBoxTreeItem<String> subitem = (CheckBoxTreeItem<String>) subti;
subitem.setSelected(false);
}
item.setSelected(false);
}
}

private void checkAllFeatures(TreeView aux) {
TreeItem<String> rootItem = aux.getRoot();
ObservableList<TreeItem<String>> lst = rootItem.getChildren();
for(TreeItem ti : lst) {
CheckBoxTreeItem<String> item = (CheckBoxTreeItem<String>) ti;
ObservableList<TreeItem<String>> sublst = item.getChildren();
for(TreeItem subti : sublst) {
CheckBoxTreeItem<String> subitem = (CheckBoxTreeItem<String>) subti;
subitem.setSelected(true);
}
item.setSelected(true);
}
}

private void onDataTypeChange() {
ArrayList<String> lstTest = new ArrayList<>();
ArrayList<String> lstBkgnd = new ArrayList<>();
Expand Down
53 changes: 52 additions & 1 deletion DlgGSEAnalysis.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -157,7 +162,9 @@ else if(dfltParams.dataType.equals(DataType.TRANS))

btnSets.setOnAction((event) -> { getSetsFile(); });

// setup
// setup
// setup database categories

chkMulti.selectedProperty().addListener((ObservableValue<? extends Boolean> ov, Boolean oldValue, Boolean newValue) -> {
if(newValue){
lblRank2.setDisable(false);
Expand Down Expand Up @@ -222,13 +229,57 @@ 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<HashMap> result = dialog.showAndWait();
if(result.isPresent())
return(new Params(result.get()));
}
return null;
}

//hyperlink funtions
private void clearAllFeatures(TreeView aux) {
TreeItem<String> rootItem = aux.getRoot();
ObservableList<TreeItem<String>> lst = rootItem.getChildren();
for(TreeItem ti : lst) {
CheckBoxTreeItem<String> item = (CheckBoxTreeItem<String>) ti;
ObservableList<TreeItem<String>> sublst = item.getChildren();
for(TreeItem subti : sublst) {
CheckBoxTreeItem<String> subitem = (CheckBoxTreeItem<String>) subti;
subitem.setSelected(false);
}
item.setSelected(false);
}
}

private void checkAllFeatures(TreeView aux) {
TreeItem<String> rootItem = aux.getRoot();
ObservableList<TreeItem<String>> lst = rootItem.getChildren();
for(TreeItem ti : lst) {
CheckBoxTreeItem<String> item = (CheckBoxTreeItem<String>) ti;
ObservableList<TreeItem<String>> sublst = item.getChildren();
for(TreeItem subti : sublst) {
CheckBoxTreeItem<String> subitem = (CheckBoxTreeItem<String>) subti;
subitem.setSelected(true);
}
item.setSelected(true);
}
}

private void onDataTypeChange(ChoiceBox cb, Label lbl, TextField txt, Button btn) {
ArrayList<String> lst = new ArrayList<>();
cb.getSelectionModel().clearSelection();
Expand Down
17 changes: 11 additions & 6 deletions dialogs/FEAParams.fxml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import javafx.geometry.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<AnchorPane id="AnchorPane" maxWidth="800.0" prefHeight="625.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">

<AnchorPane id="AnchorPane" maxWidth="800.0" prefHeight="601.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Label fx:id="lblMsg" alignment="CENTER" layoutX="5.0" layoutY="506.0" prefWidth="461.0" textFill="ORANGERED" AnchorPane.bottomAnchor="-12.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" />
<Pane prefHeight="60.0" prefWidth="474.0" style="-fx-border-color: lightgray; -fx-border-radius: 5;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="60.0">
Expand Down Expand Up @@ -67,9 +70,9 @@
<Label fx:id="lblProjectName" alignment="CENTER" prefHeight="15.0" prefWidth="510.0" text="..." AnchorPane.leftAnchor="10.0" AnchorPane.rightAnchor="10.0" AnchorPane.topAnchor="9.0" />
</children>
</AnchorPane>
<Pane layoutY="430.0" maxWidth="350.0" minWidth="350.0" prefHeight="155.0" prefWidth="350.0" style="-fx-border-color: lightgray; -fx-border-radius: 5;" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="430.0">
<Pane layoutY="419.0" maxWidth="350.0" minWidth="350.0" prefHeight="170.0" prefWidth="350.0" style="-fx-border-color: lightgray; -fx-border-radius: 5;" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="419.0">
<children>
<Label layoutX="10.0" layoutY="135.0" prefHeight="14.0" prefWidth="350.0" text="You may select one or more features from a single source" textFill="DARKGRAY">
<Label layoutX="10.0" layoutY="133.0" prefHeight="34.0" prefWidth="211.0" text="You may select one or more features from&#10;a single source" textFill="DARKGRAY">
<font>
<Font size="11.0" />
</font>
Expand All @@ -85,14 +88,16 @@
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
</GridPane>
<Hyperlink fx:id="lnkCheckAll" layoutX="283.0" layoutY="145.0" text="Check All" />
<Hyperlink fx:id="lnkClearAll" layoutX="221.0" layoutY="145.0" text="Clear All" />
</children>
</Pane>
<Label layoutX="10.0" layoutY="420.0" styleClass="textDlgSection" stylesheets="@../Style.css" text="Annotation Feature(s)" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="420.0">
<Label layoutX="10.0" layoutY="409.0" styleClass="textDlgSection" stylesheets="@../Style.css" text="Annotation Feature(s)" AnchorPane.leftAnchor="10.0" AnchorPane.topAnchor="409.0">
<font>
<Font size="16.0" />
</font>
</Label>
<Pane layoutX="380.0" layoutY="430.0" maxWidth="420.0" minWidth="420.0" prefHeight="155.0" prefWidth="420.0" style="-fx-border-color: lightgray; -fx-border-radius: 5;" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="430.0">
<Pane layoutX="380.0" layoutY="419.0" maxWidth="420.0" minWidth="420.0" prefHeight="170.0" prefWidth="420.0" style="-fx-border-color: lightgray; -fx-border-radius: 5;" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="419.0">
<children>
<GridPane layoutX="10.0" layoutY="20.0" prefHeight="125.0" prefWidth="400.0">
<children>
Expand Down Expand Up @@ -126,7 +131,7 @@
</rowConstraints>
</GridPane>
</children></Pane>
<Label layoutX="389.0" layoutY="420.0" styleClass="textDlgSection" stylesheets="@../Style.css" text="Analysis Parameters" AnchorPane.leftAnchor="389.0" AnchorPane.topAnchor="420.0">
<Label layoutX="389.0" layoutY="409.0" styleClass="textDlgSection" stylesheets="@../Style.css" text="Analysis Parameters" AnchorPane.leftAnchor="389.0" AnchorPane.topAnchor="409.0">
<font>
<Font size="16.0" />
</font>
Expand Down
2 changes: 2 additions & 0 deletions dialogs/GSEAParams.fxml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import java.lang.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>

<AnchorPane id="AnchorPane" prefHeight="775.0" prefWidth="745.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Pane layoutY="697.0" prefHeight="50.0" prefWidth="800.0" style="-fx-border-color: lightgray; -fx-border-radius: 5;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="697.0">
Expand Down
Loading

0 comments on commit dda2cc5

Please sign in to comment.