Skip to content

Commit 99aa2a3

Browse files
committed
Bug fix: output may be empty
1 parent 83a567a commit 99aa2a3

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/main/java/org/reactome/cytoscape/pathway/FactorGraphBatchAnalyzer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ protected void runFactorGraphAnalysis() {
8888
List<FactorGraph> failedFGs = new ArrayList<FactorGraph>();
8989
boolean isAborted = false;
9090
for (FactorGraph fg : factorGraphs) {
91+
// if (!fg.getName().contains("71737"))
92+
// continue;
93+
System.out.println("Handling " + fg.getName() + " (" + count + "/" + factorGraphs.size() + ")");
9194
progressPane.setText("Analyzing " + fg.getName() +
9295
" (" + count + "/" + factorGraphs.size() + ")");
9396
// Since progressPane is used by other process, show the progress in the title

src/main/java/org/reactome/cytoscape/util/PlugInUtilities.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,9 @@ private static Collection<FileChooserFilter> getAnalysisResultFilters() {
285285
*/
286286
public static double calculateCombinedPValue(List<Double> pvalues,
287287
List<List<Double>> values) throws MathException {
288+
if (pvalues.size() == 0) {
289+
return Double.MAX_VALUE; // Nothing to do. Mark this as the largest pvalue.
290+
}
288291
// Have to make sure no 0 in the pvalues list in order to make the implementation in MathUtility work
289292
List<Double> pvalueCopy = new ArrayList<Double>();
290293
for (Double pvalue : pvalues) {

0 commit comments

Comments
 (0)