RBVI / stringApp

Cytoscape interface to STRING and STITCH
BSD 2-Clause "Simplified" License
10 stars 11 forks source link

stringApp 1.7.1 enrichment tables update / export issues #21

Closed Alxcho closed 2 years ago

Alxcho commented 2 years ago

Hi everyone,

There seems to be an issue with enrichment tables from stringApp (cytoscape 3.9.1 - windows10). The latest update improved some of this for manual use, but the issue remain when using cyREST to generate and export the STRING Publications and STRING Enrichment tables from several networks within the same cytoscape session. The tables do not always get updated properly when switching between networks, and they end up all jumbled up in the exported files.

stringApp seems confused about whether having different publications and enrichment tables for different networks, whether to reuse the same, whether to close some or just pile up new ones.

Closing the session file without restarting cytoscape seems to retain traces of the tables somewhere else than in the session file: the extra fantom tables sometimes still show up. Restarting cytoscape then reopening the same session file doesn't show extra enrichment/publication tables.

Also, a few stringApp commands are labelled as "show" but might in effect be closer to "toggle". Having a "hide" could be of use, maybe.

Thanks!

scaramonche commented 2 years ago

Hi, Thanks a lot for reporting the issue!

Could you please give me an example for the code you use to create and export the enrichment? Maybe there are some tricks that might help with your problem until we fix it in the next release.

Best wishes, Nadya

Alxcho commented 2 years ago

Hi Nadya, thanks for the reply, fixing this would be brilliant. I’m using the following sets of standard RCy3 commandsRun I gathered with (a few) trials (could be useful to have them in the doc by the way): commandsRun("string retrieve enrichment”) commandsRun("string show enrichment") commandsRun("string retrieve publications") commandsRun("string show publications") I export the tables using: commandsRun("table export outputFile=FILEPATH table=STRING Enrichment: filtered") commandsRun("table export outputFile=FILEPATH table=STRING Enrichment: PMID") I have tried to set commandSleep() before/after retrieving enrichments/publications, some numbers of “show” commands before and after, separating exports in different loops and the like, but never managed to get this sorted yet! The commandsRun(“string retrieve…”) returns some sort of SUID it seems, but I didn’t manage to find a way to use it. Thanks!

scaramonche commented 2 years ago

Hi Alxcho! Part of the issue is that the enrichment table names are not unique and the other is that the filtered table is special. The main two enrichment tables are STRING Enrichment: All and STRING Enrichment: PMID. All the tables are called the same, but internally we keep track of which table is associated with which network. For example, you can use the command table list to see all tables in Cytoscape and see for yourself. Therefore, it is crucial to use the SUID that you get after running enrichment instead of the non-unique table name. The SUID is a unique identifier that gets assigned to each new table. You can do that as follows for a table with SUID 835: table export outputFile=test_export.csv table="SUID:835" The filtered table is a more special case, since we don't create a filtered table for each network separately, but we create it on the fly when you change the current network. In that case timing might make a difference. I will look into that and see if we can create a filtered enrichment table for each network so that it can be exported easier via commands. Btw, it should also not matter if you show the enrichment panel or not, the tables will be there once you have run the retrieve enrichment/publications commands.

Alxcho commented 2 years ago

Hi Nadya! Thanks a lot for the suggestions, they did the trick! The code now does what it is supposed to do (...) and much faster, how wonderful. I'll be looking forward for the future updates for the filtered tables if any then. Gread day!

scaramonche commented 2 years ago

I am glad to hear! I will look into the filtered tables as well! Have a nice day, too!