dtree_set

Decision tree page setup

Synopsis

dtree_set

Arguments:

ds: dataset name

tm: optional time delay control option, in seconds, float as string

dtree: optional name of applying decision tree

code: optional code of applying decision tree

actsym: optional, add gene symbols from filter to active symbols ,

recommended in form actsym=1

instr: optional modifier Decision Tree modifying actions

in JSON string representation

Return value:

{ dictionary
kind: kind of dataset, "ws" or "xl"
"total-counts": count of items in dataset
[ list
[0] count of variants, int
[1] optional count of transcript variants, int
[2] optional count of transcripts, int
]
"point-counts": point counts of items
"code": code of decision tree, string
"points":
"cond-atoms": atomic conditions
{ dictionary
point no, int: [ list of Condition descriptor ]
}
"err-atoms": optional atomic errors
{ dictionary
point no int:
{ atom idx int: string }
}
"labels": [ list of string ] - defined state labels

"error": optional diagnostics for first error, string
"line": optional line no for first error, int
"pos": optional line position for first error, int

"dtree-name: optional name of current decision tree, string
"eval-status": status of decision tree evaluation
"ok" if evaluation is correct, other string otherwise
hash: hash code associated with current tree code, string
dtree-list: names of all decision trees available for dataset
dtree-sol-version: indicator of state for decision trees
rq_id": unique request id, for use in secondary requests, string
}

Description

The request is the principal one for organizing Decision tree work page for all datasets.

If dtree argument is set, decision tree with this name should be registered on the server side as solution item. Otherwise the argument code must contain decision tree code.

If instr argument is set (see details in Decision Tree modifying actions) and instruction is of type "DTREE", request modifies decision tree solution item: create, update or delete item with given name.

If instr argument is set and instruction is of other types ("INSTR", "POINT" or "ATOM"), the code of decision tree is being modified in request, and returning property code contains result of modifications. See Decision Tree modifying actions for details.

Returning properties:

code: Decision tree is defined by its code written in a dialect of Python. Returning property code contains actual state of it.

points: Decision tree splits into sequence of decision tree points. Each point sontrols one or more lines in Python code, possibly with comment lines. Property points contain information on them, see Decision Tree Point descriptor for details.

point-counts: Another portion of information for points, in form of list of Decision Tree Point Count descriptor. Information can be incomplete, since evaluation of counts might be heavy procedure. Input argument tm controls the timeout in this case. To receive from server rest of counts the client needs to start series of delayed request dtree_counts using property rq-id as input argument. See details of this mechanism here

cond-atoms: Point of kind "If" contains one or many decision tree atomic conditions, or in short form "atoms". Atoms are active zones in user interface: the user can change atomic condition and it causes modification of decision tree of kind "ATOM"

Atoms are indexed by pair of integers: index of point and index in list of point atoms, so property cond-atoms is organized as dictionary with integer keys(indexes of points of type "If") and values as list of Condition descriptor structures.

err-atoms: Presents only if some atomic conditions in the tree are broken. Only essential indexes are filled with error messages.

labels: The property contains all state labels defined on decision tree, it might be used for rendering purposes.

error, line, pos: in case of errors in code of decision tree, these tree properties refer first error in the code, it might be used in rendering or work with code of decision tree

eval-status: property is either "ok" or evaluation error report

dtree-list: names of all decision trees available for dataset, this properties supports work with decision tree as solution item

Comments

The request is partial analogue to ds_stat. Both methods are principal for support main work pages for two mechanisms of filtration in the system.

Inside instruction atom can be in an improper state, and there is error message in err-atoms for this case, and the Front End needs to show them. In some cases (usually if property name is not supported in dataset, or has improper type) the atom can be blocked. Only deletion of such atom is a proper operation. For blocked atoms the correspondent coindition in cond-atoms starts (leading element of top list) with "error" instruction, see details here.

See also

dtree_counts

dtree_stat

Decision tree points counters evaluation with delays

Decision Tree Syntax Reference