cytoscape / cytoscape-automation

Collection of scripts that include programmatic io and control of Cytoscape
Creative Commons Zero v1.0 Universal
81 stars 58 forks source link

Evaluating functions applied to table columns #66

Open AlexanderPico opened 3 years ago

AlexanderPico commented 3 years ago

Original use case: https://github.com/cytoscape/cytoscape-tutorials/issues/54

A script app solution could be generalized in a few different ways, starting from this original use case:

  1. Qiime2 label split: split the "Label" column on ; and create columns for taxonomic fields, i.e., anticipating standard Qiime2 output. Executed by app menu item, no options needed.
  2. split & pick: split string by user-selected character; then return a user-selected list member(s) to populate new column(s). Executed by right-click on column header and then specifying two values with defaults.
  3. lapply: provide an R function or even a code chunk to execute on each cell in a column; populate new column with output. Executed by right-click on column header and then specifying R function or code chunk.
  4. tidyr & dplyr: support separate, unite, filter, and mutate applied to one or more columns. Executed by right-clicking on output column (e.g., a newly created empty column) or input column (in the case of separate), then providing param values.

Maybe an app for each of the above?

AlexanderPico commented 3 years ago

lapply would need to import a couple common packages probably, e.g., stringr.

Perhaps it could support custom package installation if :: syntax is used?

AlexanderPico commented 3 years ago

Hmm... Need to think about this some more. Some of these ideas might stretch the script app idea too far. They should perform simple pre-written functions and integrated simply into the GUI (e.g., Apps menu and maybe certain context menus). Prompting users with input dialogs, etc. would break the simplicity of wrapping scripts in a template java app. But then again, maybe some script apps can be more sophisticated...