crested.pl.patterns.selected_instances

crested.pl.patterns.selected_instances#

crested.pl.patterns.selected_instances(pattern_dict, idcs)#

Plot the patterns specified by the indices in idcs from the pattern_dict.

Parameters:
  • pattern_dict (dict) – A dictionary containing pattern data. Each key corresponds to a pattern ID, and the value is a nested structure containing contribution scores and metadata for the pattern. Refer to the output of crested.tl.modisco.process_patterns.

  • idcs (list[int]) – A list of indices specifying which patterns to plot. The indices correspond to keys in the pattern_dict.

Return type:

None

Examples

>>> pattern_indices = [0, 1, 2]
>>> crested.pl.patterns.selected_instances(pattern_dict, pattern_indices)
../../../_images/pattern_selected_instances.png