crested.tl.modisco.find_pattern

Contents

crested.tl.modisco.find_pattern#

crested.tl.modisco.find_pattern(pattern_id, pattern_dict)#

Find the index of a pattern by its ID.

Parameters:
  • pattern_id (str) – The ID of the pattern to find.

  • pattern_dict (dict) – A dictionary containing pattern data.

Return type:

int | None

Returns:

The index of the pattern if found, otherwise None.

Notes

The instances of each merged pattern contain every ID folded into it, including its own representative and class-representative IDs, so a single scan of instances matches representatives, class representatives, and instance members alike. Instance IDs are unique across merged patterns.