Save an xml file into Resource directory and Apply Force-Directed Layout in the network.

33 views
Skip to first unread message

pritam saha

unread,
Jul 4, 2021, 6:31:52 PMJul 4
to cytoscape-app-dev

Hello Everyone, 

  1. I am trying to edit an XML file that is in the resource directory and save it there. I am not able to find any particular method to do it. 
  2. I am trying to apply a Force-Directed Layout to my network. I can use a grid layout algorithm for the network. The code which I am using is given below: https://github.com/cannin/causalpath_cytoscape_app/blob/41c8be4f5467e52ef2287562563fec10c3036e0a/casualpath-cytoscape-app/src/main/java/org/cytoscape/sample/internal/utils/CyNetworkUtils.java#L81

     I am not able to figure out what should be the command for applying this algorithm. 


Please help me out on these two issues.


Thanks,

Pritam Saha



 

churas...@gmail.com

unread,
Jul 8, 2021, 1:48:01 PMJul 8
to cytoscape-app-dev
Hi,

For question #1 are you asking about saving properties for your app? If so, this might be helpful: 

For question #2 the value after 'layout' is the name of the layout algorithm. In the example code you linked to, try replacing 'grid' with 'force-directed'

hope this helps,

chris

pritam saha

unread,
Jul 8, 2021, 3:07:08 PMJul 8
to cytoscape-app-dev
Thanks, Chris for your help. 

For question #1, I was trying to edit the XML file which contains some style for the app. I will try the answer you have shared.

For question # 2, It worked. Thank you for the command.

Regards,
Pritam 

Christopher Churas

unread,
Jul 8, 2021, 4:36:24 PMJul 8
to cytoscap...@googlegroups.com
Hi,

Oh you mean the xml file relating to styles. Here is some information about importing and exporting style xml files in Cytoscape:

For programmatic ways to load styles look at this section in the cookbook:

chris



--
You received this message because you are subscribed to a topic in the Google Groups "cytoscape-app-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cytoscape-app-dev/0O5_SSXcIo8/unsubscribe.
To unsubscribe from this group and all its topics, 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/f662f867-3abf-4a7e-a5c3-f4499dc96cc6n%40googlegroups.com.

pritam saha

unread,
Jul 8, 2021, 5:11:43 PMJul 8
to cytoscape-app-dev
Thank you again Chris for the resources. 

I have also found the same link for programmatically loading the style. and have been able to start with it 

Regards,

Pritam 
Reply all
Reply to author
Forward
0 new messages