parameters - cytoscape/cytoscape-web GitHub Wiki
List of Parameter objects that denote parameters to display to the user.
{
"displayName": "Algorithm", // Key of the parameter, used as the label
"description": "Choose to use Louvain or newer Leiden algorithm", // Tooltip or hint
"type": "text", // Other values: "dropDown", "radio", "checkBox", "nodeColumn", "edgeColumn", "file", "accessToken"
"valueList": ["louvain", "leiden"], // Applicable when type="dropDown"
"defaultValue": "louvain", // Default or selected value
"validationType": "string|number|digits", // Data type is only used for text field or data type. It is ignored for other input types.
"columnTypeFilter": "number|list|<cx2 type>", //Only for node or edge column type.
//Can be one of the cx2 supported datatype, number(for long or integer) or list(for any list type)
"validationHelp": "Must be set to louvain or leiden",
"validationRegex": "louvain|leiden", // Ignored for certain types
"minValue": null, // Applies to numeric textBox
"maxValue": null, // Applies to numeric textBox
"supportedFileExtensions": null | ["csv","tsv"] // Applies to file only set to [] or null to allow files of any type otherwise list
}Key of the parameter, used as the label
Tooltip or hint describing the parameter with more detail.
Defines UI component to show to the user.
-
text- Text box -
dropDown- Dropdown box with values extracted from valueList and selected value set to defaultValue -
radio- Radio button group with values set to valueList and defaultValue selected otherwise no selection -
checkBox- checkbox with value checked if defaultValue istrue- When sending the result back, set value to
trueif checked orfalse|nullif not checked
- When sending the result back, set value to
-
nodeColumn- Dropdown that provides a list of node columns from currently selected network. defaultValue value should be used to set the default selection. columnTypeFilter should be applied to limit what columns are in this list. -
edgeColumn- Dropdown that provides a list of edge columns from currently selected network. defaultValue value should be used to set the default selection. columnTypeFilter should be applied to limit what columns are in this list. -
file- Provide a button allowing user to specify path to a file. -- DO NOT USE. EXPERIMENTAL NOT IMPLEMENTED AND MAY CHANGE -
accessTokenSpecial parameter not displayed to user that lets application pass URL of NDEx server and token the app can use to perform operations on the NDEx account on behalf of the user. If set, only display name needs to be set. -- DO NOT USE. EXPERIMENTAL NOT IMPLEMENTED AND MAY CHANGE -
ndexUUID- NDEx URL with UUID of currently selected network(s) otherwise empty list or null. -- DO NOT USE. EXPERIMENTAL NOT IMPLEMENTED AND MAY CHANGE
Values are used to populate UI components of type dropDown or radio
Default value to set for UI components and what they mean differs depending on type value
-
text- Set the value of the text box to this -
checkBox- If this value istrueit means the UI should check the box, otherwise leave box unchecked -
dropDown- If possible, UI should set the the selected value to this -
radio- If possible, UI should set radio value to this -
nodeColumnoredgeColumn- If possible, UI should set this as selected column
Only used for UI component of type text and can be set to one of the following:
-
numberAllow only floating point numbers or numbers with decimals (24.5, 12, -1234.23433). Can be limited by maxValue and minValue. -
digitsAllow only digits that are wholenumbers ie (1,2,3,34,-1,-10). A (-) at the start is allowed to denote negative numbers. Can be limited by maxValue and minValue. -
stringAllow ASCI characters. Can be limited by validationRegex.
Filters what node/edge columns should be displayed in UI component. Can be the following:
- Any CX2 data type
-
number- Any type of numberlong,integer, ordouble -
wholenumber- Any whole numberlongorinteger -
list- Any list type -
list_of_number- Any list type of numberlist_of_long,list_of_integer, orlist_of_double -
list_of_wholenumber- Any list of whole numberlist_of_longorlist_of_integer
Only used for UI component of type nodeColumn or edgeColumn
Only used for UI component of type text and is the message to display if validation fails.
Can be set to regex to verify text matches.
Only used for UI component of type text when validationType is set to string
Minimum value allowed in text field. If less, then validationHelp should be displayed to user.
Only used for UI component of type text when validationType is set to number or digits
Maximum value allowed in text field. If exceeded, then validationHelp should be displayed to user.
Only used for UI component of type text when validationType is set to number or digits
Denotes allowed file extensions for file input parameter. If null or empty list then files of any type are
allowed. Only used for UI component of type file.
Original example:
{
"displayName": "Configuration Model",
"description": "Configuration model which must be one of following:: RB, RBER, CPM, Suprise, Significance, Default",
"type": "text",
"valueList": null,
"defaultValue": "Default",
"validationType": "string",
"columnTypeFilter": null,
"validationHelp": "Must be one of following: RB, RBER, CPM, Suprise, Significance, Default",
"validationRegex": "RB|RBER|CPM|Suprise|Significance|Default",
"minValue": null,
"maxValue": null
}