cytoscape / py4cytoscape

Python library for calling Cytoscape Automation via CyREST
https://Py4Cytoscape.readthedocs.io
Other
69 stars 15 forks source link

importing NNF files? #128

Closed AthinaGav closed 8 months ago

AthinaGav commented 8 months ago

I am having trouble creating a nested network by importing an .nnf file. The documentation lists two ways of creating nested networks, manually or with NNF files (http://manual.cytoscape.org/en/stable/Nested_Networks.html) NNF is listed under the supported formats and explained in detail (http://manual.cytoscape.org/en/stable/Supported_Network_File_Formats.html#nnf).

I have therefore created an nnf file following these instructions. However, there are no specific instructions on how to import it. So I tried: File --> Import --> Network from File

But in that case, the Import Network from Table dialog pops up, which doesn't work with the NNF format, since i can not specify that there is a network column.

I also tried from py4cytoscape with p4c.import_network_from_file(nnf_file) and I had an error message: _CyError: In commandspost(): Task Cancelled. Could not validate Tunable inputs: The network cannot be created without selecting the source and target columns.

Could you advise on how to proceed? I am attaching an example NNF file from my data in case the format is the issue. sample_concat_network.nnf.txt

bdemchak commented 8 months ago

Hi, Athina ... thanks for your question. This particular GitHub project is about the py4cytoscape Python interface to Cytoscape. To submit the question to the Cytoscape group, you would use cytoscape.org to "Report a bug". You can also submit on BioStars or Stack Overflow. I'll submit the question to cytoscape.org on your behalf. The developers won't see it, though, until Jan 4, when they meet again.

bdemchak commented 8 months ago

Hi, Athina -- Apparently the NNF feature has been removed, and its presence in the Cytoscape manual is a mistake. The manual should have been updated to remove it. That said, you should be able to get similar (if not better) functionality by using grouped nodes: https://manual.cytoscape.org/en/stable/Creating_Networks.html ... see the Grouping Nodes section toward the end.

Also, for styling and other grouping topics, search the manual for "Compound".

Best of luck!