@@ -162,7 +162,6 @@ private void disposeContentPanel() {
162
162
heatMapPanel .showContentPanel (null );
163
163
}
164
164
165
-
166
165
public List <String > getGenes () {
167
166
return getContentPanel ().getGenes ();
168
167
}
@@ -508,6 +507,7 @@ private void runGeneMANIA() {
508
507
return ;
509
508
}
510
509
510
+ EnrichmentMap map = getContentPanel ().getEnrichmentMap ();
511
511
QueryGeneManiaTask queryTask = queryGeneManiaTaskFactory .create (getContentPanel ().getGenes ());
512
512
513
513
// Get list of organisms from GeneMANIA
@@ -550,12 +550,12 @@ public void taskFinished(ObservableTask task) {
550
550
@ Override
551
551
public void allFinished (FinishStatus finishStatus ) {
552
552
if (finishStatus == FinishStatus .getSucceeded ())
553
- onGeneManiaQueryFinished (queryTask .getResult (), getContentPanel () );
553
+ onGeneManiaQueryFinished (queryTask .getResult (), map );
554
554
}
555
555
});
556
556
}
557
557
558
- private void onGeneManiaQueryFinished (GMSearchResult res , HeatMapContentPanel contentPanel ) {
558
+ private void onGeneManiaQueryFinished (GMSearchResult res , EnrichmentMap map ) {
559
559
CyNetwork net = null ;
560
560
561
561
if (res != null && res .getNetwork () != null && res .getGenes () != null
@@ -565,17 +565,15 @@ private void onGeneManiaQueryFinished(GMSearchResult res, HeatMapContentPanel co
565
565
if (net == null ) {
566
566
invokeOnEDT (() -> {
567
567
JOptionPane .showMessageDialog (
568
- SwingUtilities .getWindowAncestor (contentPanel ),
568
+ SwingUtilities .getWindowAncestor (getContentPanel () ),
569
569
"The GeneMANIA search returned no results." ,
570
570
"No Results" ,
571
571
JOptionPane .INFORMATION_MESSAGE
572
572
);
573
573
});
574
574
} else {
575
575
// Update the model
576
- EnrichmentMap map = contentPanel .getEnrichmentMap ();
577
576
map .addAssociatedNetworkID (net .getSUID ());
578
-
579
577
emManager .addAssociatedAppAttributes (net , map , AssociatedApp .GENEMANIA );
580
578
// TODO
581
579
// // Modify GeneMANIA's style
@@ -604,6 +602,7 @@ private void runString() {
604
602
return ;
605
603
}
606
604
605
+ EnrichmentMap map = getContentPanel ().getEnrichmentMap ();
607
606
QueryStringTask queryTask = queryStringTaskFactory .create (getContentPanel ().getGenes ());
608
607
609
608
// Get list of organisms from STRING App
@@ -646,28 +645,26 @@ public void taskFinished(ObservableTask task) {
646
645
@ Override
647
646
public void allFinished (FinishStatus finishStatus ) {
648
647
if (finishStatus == FinishStatus .getSucceeded ())
649
- onStringQueryFinished (queryTask .getResult (), getContentPanel () );
648
+ onStringQueryFinished (queryTask .getResult (), map );
650
649
}
651
650
});
652
651
}
653
652
654
- private void onStringQueryFinished (Long netId , HeatMapContentPanel contentPanel ) {
653
+ private void onStringQueryFinished (Long netId , EnrichmentMap map ) {
655
654
CyNetwork net = netId != null ? networkManager .getNetwork (netId ) : null ;
656
655
657
656
if (net == null ) {
658
657
invokeOnEDT (() -> {
659
658
JOptionPane .showMessageDialog (
660
- SwingUtilities .getWindowAncestor (contentPanel ),
659
+ SwingUtilities .getWindowAncestor (getContentPanel () ),
661
660
"The STRING protein query returned no results." ,
662
661
"No Results" ,
663
662
JOptionPane .INFORMATION_MESSAGE
664
663
);
665
664
});
666
665
} else {
667
666
// Update the model
668
- EnrichmentMap map = contentPanel .getEnrichmentMap ();
669
667
map .addAssociatedNetworkID (net .getSUID ());
670
-
671
668
emManager .addAssociatedAppAttributes (net , map , AssociatedApp .STRING );
672
669
// TODO
673
670
// // Modify GeneMANIA's style
0 commit comments