cytoscape-automation icon indicating copy to clipboard operation
cytoscape-automation copied to clipboard

Evaluating functions applied to table columns

Open AlexanderPico opened this issue 3 years ago • 2 comments

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 avatar Apr 22 '21 23:04 AlexanderPico

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 avatar Apr 22 '21 23:04 AlexanderPico

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...

AlexanderPico avatar Apr 23 '21 00:04 AlexanderPico