mmc.hc_defs()

mmochi.hierarchy.hc_defs(marker_list, pos=[], neg=[], other=[], POS='pos', NEG='neg', OTHER=None, UNDEFINED='any', any_of=[], any_ofs_connector='&', n=1, ANY_OPTIONS=['pos', 'any'])

Helper function for defining simple or complex gating strategies for high-confidence thresholding.

Parameters:
  • marker_list (List[str]) – All the markers in the group, usually set by the Classification node above. Markers can also have “_lo” or “_hi” appended to them to specify multiple thresholds on the same marker in the same node.

  • pos (Union[List[str], str] (default: [])) – List of markers that must be positive

  • neg (Union[List[str], str] (default: [])) – List of markers that must be negative

  • other (Union[List[str], str] (default: [])) – List of markers that must be other

  • POS (str (default: 'pos')) – Default value describing pos (should usually not be altered)

  • NEG (str (default: 'neg')) – Default value describing neg (should usually not be altered)

  • OTHER (str (default: None)) – String or list of strings containing the value(s) to write for each marker in “other”.

  • UNDEFINED (str (default: 'any')) – Default value describing any undefined markers (should usually not be altered)

  • any_of (Union[List[str], List[List[str]]] (default: [])) – Used to define more complex gating. Can be represented as a list of markers (a single grouping) or a list of these lists (multiple pairings), where some of the markers must meet a specified condition. By default one member of the list must be positive and list of lists are connected by logical ‘or’s

  • any_ofs_connector (str (default: '&')) – In the case of any_of being a list of lists, whether to join them with an “&” for ‘and’ or a ‘|’ for ‘or’ to create complex gating, “&” for “at least 1 of [CCR7,SELL] AND at least 1 of [TCF7, MAL]” ‘|’ for “at least 1 of [CD19, CD20] OR at least 2 of [JCHAIN, CD138, CD34]”

  • n (Union[List[int], int] (default: 1)) – When using “any_of”, how many in the group must match the threshold (e.g. n=2 is “at least 2 of”), when any_of is a list of lists, this can become a list of ints the same length

  • ANY_OPTIONS (Union[List[List[str]], List[str]] (default: ['pos','any'])) – Default values describing when the condition is statisfied and alternative (should ususally not be altered). The alternative string is the filler when those markers are not part of the condition. e.g. for “any two positive” you would use [‘pos’,’any’] for “only two positive” you would use [‘pos’,’neg’] Like other options, if any_of is a list of lists, this can also become a list of lists.