Kamada Kawai Algorithm as java code scripts to run without GUI (on HPC)

35 views
Skip to first unread message

Hassan Alsayhah

unread,
Jun 19, 2024, 1:50:46 PM6/19/24
to cytoscape-app-dev

Hello,

I am currently working on benchmarking the performance of a Cytoscape app implementation against another algorithm. To achieve this, I need to automate the processing scripts used by Cytoscape to run Kamada Kawai algorithm without relying on its GUI, especially for deployment on Compute Canada.

My attempts to obtain the implementation directly from the Cytoscape apps source code have been unsuccessful. Even when granted access to the app source code, extracting the relevant implementation  is complex. Could you please provide guidance or direct me to resources that offer the Java code scripts necessary for this purpose?

Thank you in advance.

Alsayhah

Christopher Churas

unread,
Jun 19, 2024, 2:16:18 PM6/19/24
to cytoscap...@googlegroups.com
Hi,

Others, please chime in if they know of a better option, but you could try to use this container 
https://github.com/cytoscape/docker-cytoscape-desktop and see if you could get it into an apptainer (formerly singularity) 
and then use py4cytoscape to interact with Cytoscape. Course that assumes your cluster has apptainer (formerly singularity) 

chris

--
You received this message because you are subscribed to the Google Groups "cytoscape-app-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cytoscape-app-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cytoscape-app-dev/8bed5b54-6c04-4d6f-8454-357f08e740f4n%40googlegroups.com.

Hassan Alsayhah

unread,
Jun 19, 2024, 2:53:57 PM6/19/24
to cytoscap...@googlegroups.com
Thank you for replying. 

I think there is a potential that this would work, but I am worried that this would affect the benchmark as my objective is to assess the algorithm process only making sure to not include any other processes (e.g. 
preprocessing and postprocessing) during the run. 

Scooter Morris

unread,
Jun 19, 2024, 11:00:51 PM6/19/24
to cytoscape-app-dev
Hi Alsayhah,

I'm not sure it would effect your benchmark if you only time to perform the layout -- that is, the time in your python from beginning to end of the execution.  Of course, this would really depend on the size of the network, etc.  As far as the implementation, I think it's a relatively straightforward implementation of the Kamada Kawai algorithm.  If you strip out all of the calls to CyNetworkView and View, etc., you should be able to mock everything else.  The relevant code is at: impl/layout-cytoscape-impl/src/main/java/csapps/layout/algorithms/bioLayout/BioLayoutKKAlgorithmTask.java

-- scooter

Hassan Alsayhah

unread,
Aug 18, 2024, 4:44:39 AM8/18/24
to cytoscape-app-dev

Hi Morris,

Thank you for your earlier response—it was very helpful. I was able to strip out the irrelevant parts and implemented a simple version of the missing classes. However, I'm encountering a logical error that I haven't been able to resolve. It seems like the network is collapsing in on itself during the layout process. I attempted to update the anti-collision scalar based on the layout pass, but that didn't resolve the issue. I've tried several other approaches as well, but without success.

Do you have any suggestions or insights that might help solve this problem? My code is in the attached file. 

-Alsayhah

BioLayoutKKAlgorithmTask.java
Reply all
Reply to author
Forward
0 new messages